1 [[!meta title="Biblatex format for AJHG"]]
3 I'm working on a paper on the genetic basis of lupus, which I'm
5 [American Journal of Human Genetics](http://www.cell.com/AJHG/), and
6 since I've recently switched to the wonderful
7 [biblatex](http://www.ctan.org/pkg/biblatex) and
8 [biber](http://biblatex-biber.sourceforge.net/) from the standard
9 bibtex, I've had to figure out how to customize the bibliography and
10 citation format to fit the
11 [standards of the journal](http://images.cell.com/images/EdImages/ajhg/AJHG_Information_for_Authors.pdf).
12 Luckily, there are lots of good examples on
13 [TeX's stackexchange](http://tex.stackechange.com), which enabled me
14 to figure out how to do all of this.
16 The following code in the preamble does almost all of the hard lifting:
18 \usepackage[backend=biber,hyperref=true,doi=false,url=false,isbn=false,maxbibnames=10,minbibnames=10,sorting=none,firstinits=true,autocite=superscript,style=numeric-comp]{biblatex}
20 \ifentrytype{article}{}{%
21 \printtext{\bibstring{in}\intitlepunct}}}
22 % from http://tex.stackexchange.com/questions/12806/guidelines-for-customizing-biblatex-styles
24 [article,inbook,incollection,inproceedings,patent,thesis,unpublished,manual]
26 \DeclareFieldFormat{journaltitle}{#1}
27 \DeclareFieldFormat[article,periodical]{volume}{\mkbibemph{#1}}
28 \DeclareFieldFormat{year}{(#1)}
29 \DeclareNameAlias{default}{last-first}
30 \DeclareFieldFormat{pages}{#1}
31 %\renewbibmacro{journal}{#1}%
32 % from http://tex.stackexchange.com/questions/6743/biblatex-changing-the-order-of-entries
33 \renewbibmacro*{journal+issuetitle}{%
34 % \setunit*{\addspace}%
35 % (\printfield{year})%
38 \usebibmacro{journal}%
47 % \setunit{\addspace}% DELETED
48 % \usebibmacro{issue+date}% DELETED
49 % \setunit{\addcolon\space}% DELETED
50 % \usebibmacro{issue}% DELETED
52 \renewbibmacro*{title}{%
57 test {\iffieldundef{title}}
59 test {\iffieldundef{subtitle}}
63 \printfield[titlecase]{title}%
64 \setunit{\subtitlepunct}%
65 \printfield[titlecase]{subtitle}}%
67 \printfield{titleaddon}}
68 \renewbibmacro*{publisher+location+date}{%
70 \printtext[parens]{\printlist{location}%
71 \iflistundef{publisher}
72 {\setunit*{\addcomma\space}}
73 {\setunit*{\addcolon\space}}%
74 \printlist{publisher}%
75 % \setunit*{\addcomma\space}%
82 \newcommand{\citep}[1]{\autocite{#1}}
83 \newcommand{\citet}[1]{\citeauthor{#1}\autocite{#1}}
85 enables my standard natbib workflow of \citep and \citet to work
86 properly too. Eventually I'll move to just using \autocite everywhere,
87 but for now, that's good enough.
89 [[!tag latex tech biblatex]]