From 0a0068c1fa567ef5e5fd09714e543d2a212369c4 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 18 Sep 2011 22:55:53 +0000 Subject: biblatex-nejm git-svn-id: svn://tug.org/texlive/trunk@24011 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/biblatex-nejm/nejm.bbx | 50 +++++++++++++++++++--- 1 file changed, 44 insertions(+), 6 deletions(-) (limited to 'Master/texmf-dist/tex/latex/biblatex-nejm/nejm.bbx') diff --git a/Master/texmf-dist/tex/latex/biblatex-nejm/nejm.bbx b/Master/texmf-dist/tex/latex/biblatex-nejm/nejm.bbx index 91e0948680f..00af201f37a 100644 --- a/Master/texmf-dist/tex/latex/biblatex-nejm/nejm.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-nejm/nejm.bbx @@ -17,14 +17,14 @@ %% 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 $ +%%$Id: nejm.bbx 28 2011-09-09 17:17:01Z marco $ +%%$Rev: 28 $ %%$Author: marco $ -%%$Date: 2011-09-07 13:29:51 +0200 (Mi, 07. Sep 2011) $ -\def\biblatexnejmversionbbx{v0.3} +%%$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 26 2011-09-07 11:29:51Z marco $ \biblatexnejmversionbbx: \biblatexnejmpackagenamebbx] +\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 @@ -42,6 +42,7 @@ firstinits = true , terseinits = true , sorting = none , + % language = nejm , } @@ -58,7 +59,44 @@ \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} @@ -169,7 +207,7 @@ } %no bibstring in in article: -\newbibmacro*{in:}{% +\renewbibmacro*{in:}{% \ifentrytype{article}% {\iftoggle{bbx:articlein}{\printtext{\bibstring{in}\intitlepunct}}{}}% {\printtext{\bibstring{in}\intitlepunct}}% -- cgit v1.2.3