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:
19 \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}
21 \ifentrytype{article}{}{%
22 \printtext{\bibstring{in}\intitlepunct}}}
23 % from http://tex.stackexchange.com/questions/12806/guidelines-for-customizing-biblatex-styles
25 [article,inbook,incollection,inproceedings,patent,thesis,unpublished,manual]
27 \\DeclareFieldFormat{journaltitle}{#1}
28 \\DeclareFieldFormat[article,periodical]{volume}{\mkbibemph{#1}}
29 \\DeclareFieldFormat{year}{(#1)}
30 \\DeclareNameAlias{default}{last-first}
31 \\DeclareFieldFormat{pages}{#1}
32 %\renewbibmacro{journal}{#1}%
33 % from http://tex.stackexchange.com/questions/6743/biblatex-changing-the-order-of-entries
34 \renewbibmacro*{journal+issuetitle}{%
35 % \setunit*{\addspace}%
36 % (\printfield{year})%
39 \usebibmacro{journal}%
48 % \setunit{\addspace}% DELETED
49 % \usebibmacro{issue+date}% DELETED
50 % \setunit{\addcolon\space}% DELETED
51 % \usebibmacro{issue}% DELETED
53 \renewbibmacro*{title}{%
58 test {\iffieldundef{title}}
60 test {\iffieldundef{subtitle}}
64 \printfield[titlecase]{title}%
65 \setunit{\subtitlepunct}%
66 \printfield[titlecase]{subtitle}}%
68 \printfield{titleaddon}}
69 \renewbibmacro*{publisher+location+date}{%
71 \printtext[parens]{\printlist{location}%
72 \iflistundef{publisher}
73 {\setunit*{\addcomma\space}}
74 {\setunit*{\addcolon\space}}%
75 \printlist{publisher}%
76 % \setunit*{\addcomma\space}%
85 \newcommand{\citep}[1]{\autocite{#1}}
86 \newcommand{\citet}[1]{\citeauthor{#1}\autocite{#1}}
89 enables my standard natbib workflow of \citep and \citet to work
90 properly too. Eventually I'll move to just using \autocite everywhere,
91 but for now, that's good enough.
93 [[!tag latex tech biblatex]]