Skip to content

Instantly share code, notes, and snippets.

@tilofrei
Last active May 13, 2019 02:39
Show Gist options
  • Save tilofrei/b8a6e5bb5f6676a7ab0b669f11ec1689 to your computer and use it in GitHub Desktop.
Save tilofrei/b8a6e5bb5f6676a7ab0b669f11ec1689 to your computer and use it in GitHub Desktop.
Biblatex style for the American Journal of Transplantation (similar to AMA style)
% Biblatex style for the American Journal of Transplantation (similar to AMA style)
% I used remus' suggestions as a template: https://tex.stackexchange.com/a/233423/115062
% To use this just include in your tex-file
% configuring package options
\usepackage[backend=bibtex, bibencoding=utf8, citestyle=numeric-comp, bibstyle=numeric, sorting=none, maxbibnames=6, minbibnames=3, doi=false, isbn=false, url=false, uniquename=false, uniquelist=false, firstinits=true, terseinits=true]{biblatex}
% BEGIN DEFINE CITATION STYLE
% first after last name
\DeclareNameAlias{default}{last-first}
% no punctuation inside names
\renewcommand*{\revsdnamepunct}{}
\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{{#1\isdot}}
\renewbibmacro{in:}{}
\DeclareFieldFormat{pages}{#1}
\renewcommand*{\bibpagespunct}{\addcolon}
\renewbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\setunit*{\addperiod\addspace}%
\iffieldundef{series}
{}
{\newunit
\printfield{series}%
\setunit{\addspace}}%
\usebibmacro{issue+date}%
\setunit{\addsemicolon\addspace}%
\printfield{volume}%
\setunit{\addcolon\space}%
\usebibmacro{issue}%
\newunit%
}
% Print only the year
\renewbibmacro*{issue+date}{%
\printfield{year}%
}
% Remove "and" from list of authors
\renewcommand*{\finalnamedelim}{\multinamedelim}
% Bibliography list without leading brackets
\DeclareFieldFormat{labelnumberwidth}{#1\adddot}
% Round brackets for in-line citations
\DeclareCiteCommand{\parencite}[\mkbibparens]
{\usebibmacro{cite:init}%
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}%
\usebibmacro{postnote}}
% END DEFINE CITATION STYLE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment