%% Copyright (C) 2011 by Marco Daniel %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c %% of this license or (at your option) any later version. %% The latest version of this license is in %% %% http://www.latex-project.org/lppl.txt %% %% and version 1.3c or later is part of all distributions of LaTeX %% version 2008/05/04 or later. %% %% This work has the LPPL maintenance status `maintained'. %% %% The Current Maintainer of this work is Marco Daniel. %% %% This work consists of the files nejm.bbx, nejm.cbx, biblatex-nejm.tex %% and biblatex-nejm.pdf %%$Id: nejm.bbx 28 2011-09-09 17:17:01Z marco $ %%$Rev: 28 $ %%$Author: marco $ %%$Date: 2011-09-09 19:17:01 +0200 (Fr, 09. Sep 2011) $ \def\biblatexnejmversionbbx{v0.4} \def\biblatexnejmpackagenamebbx{nejm.bbx} \def\biblatexnejmsvnbbx$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } \ProvidesFile{nejm.bbx}[\biblatexnejmsvnbbx$Id: nejm.bbx 28 2011-09-09 17:17:01Z marco $ \biblatexnejmversionbbx: \biblatexnejmpackagenamebbx] %use numeric.cbx as base %Warning if backend isn't biber \RequireBiber[2] %need style: \RequireBibliographyStyle{standard} %set options to biblatex \ExecuteBibliographyOptions { isbn = false , labelnumber = true , minnames = 3 , maxnames = 6 , firstinits = true , terseinits = true , sorting = none , % language = nejm , } %provide original option \providebool{bbx:subentry} \DeclareBibliographyOption{subentry}[true]{% \setbool{bbx:subentry}{#1}} \providetoggle{bbx:articledoi} \DeclareBibliographyOption{articledoi}[false]{% \settoggle{bbx:articledoi}{#1}} \providetoggle{bbx:articlein} \DeclareBibliographyOption{articlein}[false]{% \settoggle{bbx:articlein}{#1}} \providetoggle{bbx:printlang} \DeclareBibliographyOption{printlang}[false]{% \settoggle{bbx:printlang}{#1}} %specify language \DeclareListFormat{language}{% \iftoggle{bbx:printlang}{% \usebibmacro{list:delim}{% \ifbibstring{#1}% {\bibxstring{#1}}% {\ifbibstring{lang#1}% {\bibxstring{lang#1}}% {#1}}}% \ifbibstring{#1}% {\bibstring{#1}}% {\ifbibstring{lang#1}% {\bibstring{lang#1}}% {#1}}% \usebibmacro{list:andothers}% }{}% } %format date -- only year printed \@ifpackageloaded{babel}{% \edef\blx@tempa{\bbl@main@language}% }{% \edef\blx@tempa{\blx@languagename}% } \DefineBibliographyExtras{\blx@tempa}{% % \protected\def\mkbibdatelong#1#2#3{% \stripzeros{\thefield{#1}}% }% \protected\def\mkbibdateshort#1#2#3{% \mkdatezeros{\thefield{#1}}% }% } %Set environment \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} \defbibenvironment{shorthands} {\list {\printfield[shorthandwidth]{shorthand}} {\setlength{\labelwidth}{\shorthandwidth}% \setlength{\leftmargin}{\labelwidth}% \setlength{\labelsep}{\biblabelsep}% \addtolength{\leftmargin}{\labelsep}% \setlength{\itemsep}{\bibitemsep}% \setlength{\parsep}{\bibparsep}% \renewcommand*{\makelabel}[1]{\hss##1}}} {\endlist} {\item} %% \DeclareBibliographyDriver{set}{% \entryset {\ifbool{bbx:subentry} {\printfield[bibentrysetcount]{entrysetcount}% \setunit*{\addnbspace}} {}} {}% \newunit\newblock \usebibmacro{setpageref}% \finentry} %remove punctuation and space after initials -- require biber \renewrobustcmd*{\bibinitperiod}{} %separator printed before the pages field \renewcommand*{\bibpagespunct}{\addcolon} %no bracktes in thebibliography and add dot \DeclareFieldFormat{labelnumberwidth}{#1\adddot} %not formating pages \DeclareFieldFormat*{pages}{#1} %not formated journaltitle \DeclareFieldFormat*{journaltitle}{#1} %not formated title \DeclareFieldFormat*{title}{#1} %Set name format \DeclareNameAlias{default}{last-first} \DeclareNameAlias{sortname}{last-first} %Not needed?? \DeclareNameAlias{author}{last-first} \DeclareNameAlias{editor}{last-first} \DeclareNameAlias{translator}{last-first} %remove comma between familyname and firstname \renewbibmacro*{name:last-first}[4]{% \ifuseprefix {\usebibmacro{name:delim}{#3#1}% \usebibmacro{name:hook}{#3#1}% \ifblank{#3}{}{% \ifcapital {\mkbibnameprefix{\MakeCapital{#3}}\isdot} {\mkbibnameprefix{#3}\isdot}% \ifpunctmark{'}{}{\bibnamedelimc}}% \mkbibnamelast{#1}\isdot \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}% \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}}%remove \addcomma {\usebibmacro{name:delim}{#1}% \usebibmacro{name:hook}{#1}% \mkbibnamelast{#1}\isdot \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}% % \ifblank{#2#3}{}{\addcomma}%%commented \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}\isdot}% \ifblank{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}} %option articledoi -- no doi / eprint / url in article \newbibmacro*{doi+eprint+url-use}{% \iftoggle{bbx:doi}% {\printfield{doi}}% {}% \newunit\newblock \iftoggle{bbx:eprint}% {\usebibmacro{eprint}}% {}% \newunit\newblock \iftoggle{bbx:url}% {\usebibmacro{url+urldate}}% {}% } \renewbibmacro*{doi+eprint+url}{% \ifentrytype{article}% {% \iftoggle{bbx:articledoi}% {\usebibmacro{doi+eprint+url-use}}{}% }{\usebibmacro{doi+eprint+url-use} }% } %no bibstring in in article: \renewbibmacro*{in:}{% \ifentrytype{article}% {\iftoggle{bbx:articlein}{\printtext{\bibstring{in}\intitlepunct}}{}}% {\printtext{\bibstring{in}\intitlepunct}}% } %no number in ouput of bibliography \renewbibmacro*{volume+number+eid}{% \printfield{volume}% % \setunit*{\adddot}% % \printfield{number}% \setunit{\addcomma\space}% \printfield{eid}} %Order year;volume:page \renewbibmacro*{issue+date}{% \printtext{% \iffieldundef{issue} {\usebibmacro{date}} {\printfield{issue}% \setunit*{\addspace}% \usebibmacro{date}}}% \newunit} \renewbibmacro*{journal+issuetitle}{% \usebibmacro{journal}% \setunit*{\addspace}% \usebibmacro{issue+date}% \setunit*{\addsemicolon} \iffieldundef{series} {} {\newunit \printfield{series}% \setunit{\addspace}}% \usebibmacro{volume+number+eid}% \setunit{\addspace}% \setunit{\addcomma\space}% \usebibmacro{issue}% \newunit} \endinput