[Tex/LaTex] PLoS Comp Bio Biblatex style

biblatex

PLoS Comp Bio, I think similar to the other members of the PLoS family, has a simple citation/bibliography style. Citations are numbered [1], and the bibliography is formatted with little punctuation and no italics.

  1. Fine P, Clarkson J (1986) Individual versus public priorities in the determination of optimal vaccination policies. Am J Epidemiol 124:
    1012–1020.

They provide a bst style file but I'm trying to use biblatex because it supports \citet commands in numbered citation formats. I've tried hacking away at biblatex commands to get the right formatting but I'm struggling. If anyone knows of a biblatex style file for PloS (or similar) I'd be most interested.

Best Answer

Using biblatex instead of the journal's bst-based style probably isn't a good idea. That said none of the standard or contributed biblatex styles will give you this output. The document below demonstrates how you can obtain a custom style based on standard variants of numeric and authoryear.

\documentclass{article}
\usepackage{csquotes}
\usepackage[american]{babel}
\usepackage[citestyle=numeric,bibstyle=authoryear,sorting=none,
            firstinits,terseinits,dashed=false]{biblatex}
\usepackage[colorlinks]{hyperref}

% Name list format
\renewcommand*{\labelnamepunct}{\addspace}
\renewcommand*{\finalnamedelim}{%
  \ifbibliography{\addcomma\space}{\addspace\&\space}}
\renewcommand*{\revsdnamepunct}{}
\DeclareNameAlias{sortname}{last-first}

% No quotes or italics in titles
\DeclareFieldFormat{title}{#1}
\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,
                    thesis,unpublished]{title}{#1}
\DeclareFieldFormat{journaltitle}{#1}
\DeclareFieldFormat{issuetitle}{#1}
\DeclareFieldFormat{maintitle}{#1}

\renewbibmacro*{in:}{%
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}

% Remove page prefixes
\DeclareFieldFormat{pages}{#1}

% Only print journal volume
\renewbibmacro*{volume+number+eid}{%
  \setunit*{\addspace}%
  \printfield{volume}}

% Use colon for volume-pages delimiter
\renewcommand*{\bibpagespunct}{%
  \ifentrytype{article}{\addcolon\space}{\addcomma\space}}

% Add labelnumbers to bibliography
\DeclareFieldFormat{labelnumberwidth}{#1\adddot}
\defbibenvironment{bibliography}
  {\list
     {\printtext[labelnumberwidth]{%
      \printfield{prefixnumber}%
      \printfield{labelnumber}}}
     {\setlength{\labelwidth}{\labelnumberwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{\hss##1}}
  {\endlist}
  {\item}

% Omit authoryear disambiguation
\AtEveryBibitem{\clearfield{extrayear}}

\begin{filecontents}{\jobname.bib}
@article{glashow,
  author = {Glashow, Sheldon},
  title = {Partial symmetries of weak interactions},
  journaltitle = {Nucl~Phys},
  volume = {22},
  date = {1961},
  pages = {579--588}}
@article{weinberg,
  author = {Weinberg, Steven},
  title = {A model of leptons},
  journaltitle = {Phys~Rev~Lett},
  volume = {19},
  date = {1967},
  pages = {1264--1266}}
@book{companion,
  author = {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander},
  title = {The LaTeX Companion},
  edition = {1},
  publisher = {Addison-Wesley},
  location = {Reading MA},
  date = {1994},
  pagetotal = {528}}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\textcite{weinberg,glashow,companion}
\printbibliography
\end{document}

enter image description here

Some notes:

  • The default \revsdnamepunct corresponds to the comma printed between the last and first parts in a reversed name. It was introduced in 2.2. For older biblatex versions refer to this previous answer from lockstep.
  • You can format titles to sentence case. Refer to this post for details.
  • Journal title abbreviations might be better handled using the string entry type. Refer to the bib file in the biblatex documentation for some examples.