diff options
author | Karl Berry <karl@freefriends.org> | 2018-03-19 21:49:24 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-03-19 21:49:24 +0000 |
commit | a198254d24ccfd63859b7ec9480d95775b087c4e (patch) | |
tree | 49bd922d8362e6398130515ef91e95c3550e3823 /Master/texmf-dist/tex/latex/biblatex-ext/ext-numeric-comp.cbx | |
parent | d1c302ed5a53246283181ec1ab9a537ec5a6959e (diff) |
biblatex-ext (19mar18)
git-svn-id: svn://tug.org/texlive/trunk@47029 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-ext/ext-numeric-comp.cbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-ext/ext-numeric-comp.cbx | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-ext/ext-numeric-comp.cbx b/Master/texmf-dist/tex/latex/biblatex-ext/ext-numeric-comp.cbx new file mode 100644 index 00000000000..131ae73da83 --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-ext/ext-numeric-comp.cbx @@ -0,0 +1,115 @@ +\ProvidesFile{ext-numeric-comp.cbx} + [2018/03/18 v0.1 extended biblatex numeric-comp citation style (MW)] + +\blx@inputonce{ext-biblatex-aux.def}{auxiliary code for ext-biblatex}{}{}{}{} + +\RequireCitationStyle{numeric-comp} + +\DeclareOuterCiteDelim{cite}{\bibopenbracket}{\bibclosebracket} +\DeclareOuterCiteDelimAlias{parencite}{cite} +\DeclareOuterCiteDelim{textcite}{}{} + +\DeclareInnerCiteDelim{textcite}{\bibopenbracket}{\bibclosebracket} + +\renewbibmacro*{textcite}{% + \iffieldequals{namehash}{\cbx@lasthash} + {\usebibmacro{cite:comp}} + {\usebibmacro{cite:dump}% + \ifbool{cbx:parens} + {\printtext{\csuse{extblx@citedelim@textcite@inner@close}}% + \global\boolfalse{cbx:parens}} + {}% + \iffirstcitekey + {} + {\textcitedelim}% + \usebibmacro{cite:init}% + \ifnameundef{labelname} + {\printfield[citetitle]{labeltitle}} + {\printnames{labelname}}% + \setunit*{\printdelim{namelabeldelim}}% + \printtext{\csuse{extblx@citedelim@textcite@inner@open}}% + \global\booltrue{cbx:parens}% + \ifnumequal{\value{citecount}}{1} + {\usebibmacro{prenote}} + {}% + \usebibmacro{cite:comp}% + \stepcounter{textcitecount}% + \savefield{namehash}{\cbx@lasthash}}} + +\DeclareCiteCommand{\cite}[\mkoutercitedelim] + {\usebibmacro{cite:init}% + \usebibmacro{prenote}} + {\usebibmacro{citeindex}% + \usebibmacro{cite:comp}} + {} + {\usebibmacro{cite:dump}% + \usebibmacro{postnote}} + +\DeclareCiteCommand{\parencite}[\mkouterparencitedelim] + {\usebibmacro{cite:init}% + \usebibmacro{prenote}} + {\usebibmacro{citeindex}% + \usebibmacro{cite:comp}} + {} + {\usebibmacro{cite:dump}% + \usebibmacro{postnote}} + +\DeclareCiteCommand{\smartcite}[\iffootnote\mkouterparencitedelim\mkbibfootnote] + {\usebibmacro{cite:init}% + \usebibmacro{prenote}} + {\usebibmacro{citeindex}% + \usebibmacro{cite:comp}} + {} + {\usebibmacro{cite:dump}% + \usebibmacro{postnote}} + +\DeclareCiteCommand{\supercite}[\mkbibsuperscript] + {\usebibmacro{cite:init}% + \let\multicitedelim=\supercitedelim + \iffieldundef{prenote} + {} + {\BibliographyWarning{Ignoring prenote argument}}% + \iffieldundef{postnote} + {} + {\BibliographyWarning{Ignoring postnote argument}}} + {\usebibmacro{citeindex}% + \usebibmacro{cite:comp}} + {} + {\usebibmacro{cite:dump}} + +\DeclareCiteCommand{\cbx@textcite}[\mkoutertextcitedelim] + {\usebibmacro{cite:init}} + {\usebibmacro{citeindex}% + \usebibmacro{textcite}} + {} + {\usebibmacro{cite:dump}% + \usebibmacro{postnote}% + \ifbool{cbx:parens} + {\csuse{extblx@citedelim@textcite@inner@close}% + \global\boolfalse{cbx:parens}} + {}} + +\DeclareMultiCiteCommand{\cbx@textcites}[\mkoutertextcitedelim]{\cbx@textcite}{} + +\DeclareMultiCiteCommand{\cites}[\mkoutercitedelim]{\cite}{\multicitedelim} +\DeclareMultiCiteCommand{\parencites}[\mkouterparencitedelim]{\parencite}{\multicitedelim} +\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkouterparencitedelim\mkbibfootnote] + {\smartcite}{\multicitedelim} + +\DeclareCiteCommand{\bbx@cite@inxref}[\mkouterbibinxrefcitedelim] + {\boolfalse{citetracker}% + \boolfalse{pagetracker}% + \boolfalse{backtracker}% + \usebibmacro{cite:init}} + {\usebibmacro{cite:comp}} + {\usebibmacro{cite:dump}} + {} + +\renewbibmacro*{bbx:cite:intro}{% + \printfield{labelprefix}% + \printfield{labelnumber}% + \ifbool{bbx:subentry} + {\printfield{entrysetcount}} + {}} + +\endinput |