3

I use the package natbib with the bibliography style apa.

How I remove dot, comma and "and" after name and then change year position without bracket to the end of reference.

Maniatis, T., Fritsch, E. F., and Sambrook, J. (2001). Molecular Cloning: A Laboratory Manual.Cold Spring Harbor Laboratory, New York, 3rd edition.

I want to make format below :

Maniatis T, Fritsch EF, and Sambrook J. Molecular Cloning: A Laboratory Manual.Cold Spring Harbor Laboratory, New York, 3rd edition.2001

or please help me which package for vancouver style can be used for author year citation ? for example " biologi is bla bla (James et.al., 2009) "

5
  • 3
    natbib isn't able to format the bibliography in this way. To produce a special bibliography output I recommend the package biblatex. ctan.org/tex-archive/macros/latex/exptl/biblatex Commented May 11, 2011 at 18:06
  • Just to clarify Marco's comment: vancouver is a bibliography style intended for numeric citations, which means you won't be able to produce author-year citations with this style. (natbib only helps with the converse problem - you have an author-year style and you want numeric citations.)
    – Audrey
    Commented May 11, 2011 at 18:22
  • You could use the custombib package to create a .bst file which yields the required formatting; it works well together with natbib Commented May 12, 2011 at 0:23
  • @Audrey: Please turn your comment into an answer.
    – lockstep
    Commented Jun 18, 2011 at 18:55
  • @lockstep OK, but I'll credit the other comments. I also added a biblatex solution, which borrows some code from a previous answer you've given.
    – Audrey
    Commented Jun 20, 2011 at 15:49

1 Answer 1

4

vancouver is a bibliography style with numeric citations, which means you won't be able to produce author-year citations with this style. (natbib only helps with the converse problem, where you have an author-year style and you want numeric citations.)

It appears as though you're wanting vancouver's bibliography style, but author-year citations. To do this you can follow prettygully's advice and create a custom author-year style using custombib.

Alternatively, you can take Marco's recommendation and use biblatex. The built-in author-title and author-year styles get you most of the way there. The code below does the rest. To handle the author name punctuation/delimiters, I've taken the solution from lockstep.

\documentclass{article}
\usepackage[american]{babel}
\usepackage[bibstyle=authortitle,citestyle=authoryear,maxcitenames=2,%
  firstinits=true,terseinits=true,natbib=true]{biblatex}
\usepackage{filecontents}

\DeclareNameAlias{author}{last-first}

% ----- lockstep's solution for name delimiters/punctuation
\renewbibmacro*{name:last-first}[4]{%
  \ifuseprefix
    {\usebibmacro{name:delim}{#3#1}%
     \usebibmacro{name:hook}{#3#1}%
     \ifblank{#3}{}{%
       \ifcapital
         {\mkbibnameprefix{\MakeCapital{#3}}\isdot}
     {\mkbibnameprefix{#3}\isdot}%
       \ifpunctmark{'}{}{\bibnamedelimc}}%
     \mkbibnamelast{#1}\isdot
     \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
%      \ifblank{#2}{}{\addcomma\bibnamedelimd\mkbibnamefirst{#2}\isdot}}% DELETED
     \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}}% NEW
    {\usebibmacro{name:delim}{#1}%
     \usebibmacro{name:hook}{#1}%
     \mkbibnamelast{#1}\isdot
     \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
%      \ifblank{#2#3}{}{\addcomma}% DELETED
     \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}%
     \ifblank{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}}
% -----

% no "and" before final name in bibliography
%\renewcommand*{\finalnamedelim}{%
%  \ifbibliography% NEW
%    {\addcomma\space}% NEW
%    {\ifnumgreater{\value{liststop}}{2}{\finalandcomma}{}%
%        \addspace\bibstring{and}\space}}

\DefineBibliographyStrings{american}{%
  edition = {edition}}

\makeatletter

\AtEveryBibitem{%
  \savefield{edition}{\bbx@edition}%
  \clearfield{edition}}

\renewbibmacro*{publisher+location+date}{%
  \restorefield{edition}{\bbx@edition}% NEW
%  \printlist{location}% DELETED
%  \iflistundef{publisher} DELETED
%    {\setunit*{\addcomma\space}} DELETED
%    {\setunit*{\addcolon\space}}% DELETED
  \printlist{publisher}%
  \setunit*{\addcomma\space}% 
  \printlist{location}% NEW
  \setunit*{\addcomma\space}% NEW
  \printfield{edition}% NEW
  \setunit*{\addcomma\space}%
  \usebibmacro{date}%
  \newunit}

\makeatother

\begin{filecontents}{\jobname.bib}
@Book{clone,
  author = {Maniatis, T. and Fritsch, E. F. and Sambrook, J.},
  title = {Molecular Cloning: A Laboratory Manual},
  year = {2001},
  publisher = {Cold Spring Harbor Laboratory},
  location = {New York},
  edition = {3}}
@Book{companion,
  author = {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander},
  title = {The LaTeX Companion},
  edition = {1},
  publisher = {Addison-Wesley},
  location = {Reading, Mass.},
  date = {1994}}
@Article{gillies,
  author = {Gillies, Alexander},
  title = {Herder and the Preparation of Goethe's Idea of World Literature},
  journaltitle = {Publications of the English Goethe Society},
  volume = {9},
  date = {1933},
  pages = {46--67}}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
Text \citep{companion}. More text \citep{clone}. Even more text \citep{gillies}.
\printbibliography
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .