Contents

A latex bibliography style I like (Nature style in biblatex)

Contents

This isn’t really a specific question, but I needed to make a bibliography in latex with the following requirements:

  • The citations take up as little space as possible, so should probably be superscript
  • The citations should be correctly grouped (i.e. 1-3, 6 not 6, 2, 3, 1)
  • The bibliography can take up any amount of space
  • The citations should be linked to their bibliography entry (i.e. hyperref compatible)
  • bib entries contain unicode characters
  • I want the entries to look like the Elsevier standard, though Nature is also fine
  • I want DOIs, properly displayed and hyperlinked, not monospaced

The style=nature option supplied to biblatex in the preamble (see http://ctan.org/pkg/biblatex-nature) achieves most of this but you don’t get DOIs, there seemed to be some problems with unicode characters (particularly Polish names, see http://www.terminally-incoherent.com/blog/reference/latex-reference/) and there were some problems displaying URLs well

Rather than trying to hack together a biblatex.cfg based on the nature style which I didn’t understand/couldn’t be bothered to read through I instead was able to use a standard biblatex style with some options when loading the package:

\usepackage[style=numeric-comp,
maxcitenames=2,
maxnames = 5,
firstinits=true,
uniquename=init,
sorting=none,
url=false,
isbn=false,
eprint=false,
texencoding=utf8,
bibencoding=utf8,
autocite=superscript,
backend=biber
]{biblatex}

This gets pretty close, but I also needed to use the following biblatex.cfg (create this file in the same directory as the .tex file):

% Number in parenthesis
\renewbibmacro\*{volume+number+eid}{%
%  \setunit\*{\addcomma\space}% NEW
  \printfield{volume}%
%  \setunit\*{\adddot}% DELETED
%  \setunit\*{\addcomma\space}% NEW
  \iffieldundef{number}
    {}
    {\bibopenparen
     \printfield{number}%
     \bibcloseparen}
  \setunit{\addcomma\space}%
  \printfield{eid}}

% Field formats for the bibliography environment (get rid of square brackets)
\DeclareFieldFormat{labelnumberwidth}{#1\adddot}

%Get rid of in:
\renewbibmacro{in:}{}

%Get rid of pp.
\DeclareFieldFormat[article,inproceedings,incollection]{pages}{#1}

%Make volume number emboldened
\DeclareFieldFormat[article,inproceedings,incollection]{volume}{\textbf{#1}}

%Journal name in non-italics
%\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{journaltitle}{#1}

%No quotes around article name
\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {title}{#1\isdot}

%Bibliography in smaller font size, and unjustified
\renewcommand{\bibfont}{\normalfont\small\raggedright}

%Hyperlinks in serif font
\def\UrlFont{\normalfont}

%DOI lower case, normal font
\renewcommand\*{\mkbibacro}[1]{%
  \ifcsundef{\f@encoding/\f@family/\f@series/sc}
    {#1}
    {\MakeLowercase{#1}}}

%Colon after author names
\renewcommand{\labelnamepunct}{\addcolon\space}

Which got me what I wanted:

/images/bibliography.png