diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-nejm/nejm.bbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-nejm/nejm.bbx | 133 |
1 files changed, 124 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-nejm/nejm.bbx b/Master/texmf-dist/tex/latex/biblatex-nejm/nejm.bbx index 9e9d5807e41..91e0948680f 100644 --- a/Master/texmf-dist/tex/latex/biblatex-nejm/nejm.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-nejm/nejm.bbx @@ -1,26 +1,106 @@ -%copyright Marco Daniel -%%$Id: nejm.bbx 20 2011-09-01 11:18:48Z marco $ -%%$Rev: 20 $ +%% 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 26 2011-09-07 11:29:51Z marco $ +%%$Rev: 26 $ %%$Author: marco $ -%%$Date: 2011-09-01 13:18:48 +0200 (Do, 01. Sep 2011) $ -\def\biblatexnejmversionbbx{v0.2} +%%$Date: 2011-09-07 13:29:51 +0200 (Mi, 07. Sep 2011) $ +\def\biblatexnejmversionbbx{v0.3} \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 20 2011-09-01 11:18:48Z marco $ \biblatexnejmversionbbx: \biblatexnejmpackagenamebbx] +\ProvidesFile{nejm.bbx}[\biblatexnejmsvnbbx$Id: nejm.bbx 26 2011-09-07 11:29:51Z marco $ \biblatexnejmversionbbx: \biblatexnejmpackagenamebbx] %use numeric.cbx as base -\RequireBibliographyStyle{numeric} %Warning if backend isn't biber \RequireBiber[2] +%need style: +\RequireBibliographyStyle{standard} + %set options to biblatex \ExecuteBibliographyOptions { - minnames = 3 , - maxnames = 6 , + isbn = false , + labelnumber = true , + minnames = 3 , + maxnames = 6 , firstinits = true , terseinits = true , + sorting = none , } + +%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}} + + + +%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 @@ -38,6 +118,10 @@ %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]{% @@ -60,6 +144,37 @@ \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: +\newbibmacro*{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}% |