From 063ecd96e1e2da7bb615c89f3ec27fa0c99400d7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 7 Sep 2011 23:26:47 +0000 Subject: biblatex-nejm (7sep11) git-svn-id: svn://tug.org/texlive/trunk@23856 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/biblatex-nejm/nejm.bbx | 133 +++++++++++++++++++-- Master/texmf-dist/tex/latex/biblatex-nejm/nejm.cbx | 24 ++-- 2 files changed, 138 insertions(+), 19 deletions(-) (limited to 'Master/texmf-dist/tex/latex') 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}% diff --git a/Master/texmf-dist/tex/latex/biblatex-nejm/nejm.cbx b/Master/texmf-dist/tex/latex/biblatex-nejm/nejm.cbx index 3e2bb325c50..27f03652caf 100644 --- a/Master/texmf-dist/tex/latex/biblatex-nejm/nejm.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-nejm/nejm.cbx @@ -1,21 +1,25 @@ %copyright Marco Daniel -%%$Id: nejm.cbx 19 2011-09-01 11:15:52Z marco $ -%%$Rev: 19 $ +%%$Id: nejm.cbx 22 2011-09-06 18:48:21Z marco $ +%%$Rev: 22 $ %%$Author: marco $ -%%$Date: 2011-09-01 13:15:52 +0200 (Do, 01. Sep 2011) $ -\def\biblatexnejmversioncbx{v0.2} +%%$Date: 2011-09-06 20:48:21 +0200 (Di, 06. Sep 2011) $ +\def\biblatexnejmversioncbx{v0.3} \def\biblatexnejmpackagenamecbx{nejm.cbx} \def\biblatexnejmsvncbx$#1: #2 #3 #4-#5-#6 #7 #8${#4/#5/#6\space } -\ProvidesFile{nejm.bbx}[\biblatexnejmsvncbx$Id: nejm.cbx 19 2011-09-01 11:15:52Z marco $ \biblatexnejmversioncbx: \biblatexnejmpackagenamecbx] +\ProvidesFile{nejm.bbx}[\biblatexnejmsvncbx$Id: nejm.cbx 22 2011-09-06 18:48:21Z marco $ \biblatexnejmversioncbx: \biblatexnejmpackagenamecbx] -\RequireCitationStyle{numeric} +\RequireCitationStyle{numeric-comp} %cite without brackets \DeclareCiteCommand{\cite}%[\mkbibbrackets] - {\usebibmacro{prenote}} + {\usebibmacro{cite:init}% + \usebibmacro{prenote}} {\usebibmacro{citeindex}% - \usebibmacro{cite}} - {\multicitedelim} - {\usebibmacro{postnote}} + \usebibmacro{cite:comp}} + {} + {\usebibmacro{cite:dump}% + \usebibmacro{postnote}} + + \endinput -- cgit v1.2.3