diff options
author | Karl Berry <karl@freefriends.org> | 2014-03-09 21:36:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-03-09 21:36:55 +0000 |
commit | 38ec9aef43ec2ac43feceade32200c22d6e1c436 (patch) | |
tree | a93df9522cc48756229b1908571e0c4e2d89349b /Master/texmf-dist/tex/latex/datatool/databib.sty | |
parent | 630961707af41c344d014c8589d4b793069a98fc (diff) |
datatool
git-svn-id: svn://tug.org/texlive/trunk@33136 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/datatool/databib.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/datatool/databib.sty | 54 |
1 files changed, 50 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/datatool/databib.sty b/Master/texmf-dist/tex/latex/datatool/databib.sty index 38010aaaf23..8a158804268 100644 --- a/Master/texmf-dist/tex/latex/datatool/databib.sty +++ b/Master/texmf-dist/tex/latex/datatool/databib.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{databib}[2013/06/28 v2.14 (NLCT)] +\ProvidesPackage{databib}[2014/03/08 v2.21 (NLCT)] \RequirePackage{datatool} \newcommand*{\dtlbib@style}{plain} \define@choicekey{databib.sty}{style}{plain,abbrv,alpha}{% @@ -85,8 +85,22 @@ }% {% \dtl@message{[\DBIBcitekey]}% - \DTLstartsentencefalse\DTLmidsentencefalse\DTLperiodfalse - \csname DTLformat\DBIBentrytype\endcsname + \DTLstartsentencefalse\DTLmidsentencefalse\DTLperiodfalse + \csname DTLformat\DBIBentrytype\endcsname + }% +} +\newcommand*{\gDTLformatbibentry}{% + \@ifundefined{DTLformat\DBIBentrytype}% + {% + \PackageError{databib}{Don't know how to format bibliography + entries of type `\DBIBentrytype'}{}% + }% + {% + \dtl@message{[\DBIBcitekey]}% + \global\DTLstartsentencefalse + \global\DTLmidsentencefalse + \global\DTLperiodfalse + \csname DTLformat\DBIBentrytype\endcsname }% } \newcommand*{\DTLendbibitem}{} @@ -103,7 +117,7 @@ }% } \newcommand*{\DTLforeachbibentry}{% -\@ifstar\@DTLforeachbibentry\@DTLforeachbibentry} +\@ifstar\@sDTLforeachbibentry\@DTLforeachbibentry} \newcommand*{\@DTLforeachbibentry}[3][\boolean{true}]{% \edef\DBIBname{#2}% \setcounter{DTLbibrow}{0}% @@ -122,6 +136,38 @@ \ifthenelse{#1}{\refstepcounter{DTLbibrow}#3}{}% }% } +\newcommand{\gDTLforeachbibentry}{% +\@ifstar\@sgDTLforeachbibentry\@gDTLforeachbibentry} +\newcommand*{\@gDTLforeachbibentry}[3][\boolean{true}]{% + \xdef\DBIBname{#2}% + \global\c@DTLbibrow = 0\relax + \@DTLforeach{#2}{\DBIBcitekey=CiteKey,\DBIBentrytype=EntryType}% + {% + \dtl@g@gathervalues{#2}{\dtlcurrentrow}% + \ifthenelse{#1}% + {% + \refstepcounter{DTLbibrow}% + \global\c@DTLbibrow=\c@DTLbibrow + #3% + }% + {}% + }% +} +\newcommand*{\@sgDTLforeachbibentry}[3][\boolean{true}]{% + \xdef\DBIBname{#2}% + \global\c@DTLbibrow = 0\relax + \@sDTLforeach{#2}{\DBIBcitekey=CiteKey,\DBIBentrytype=EntryType}% + {% + \dtl@g@gathervalues{#2}{\dtlcurrentrow}% + \ifthenelse{#1}% + {% + \refstepcounter{DTLbibrow}% + \global\c@DTLbibrow=\c@DTLbibrow + #3% + }% + {}% + }% +} \newcounter{DTLbibrow} \def\theHDTLbibrow{\theHDTLrow.bib.\arabic{DTLbibrow}}% \newcommand*{\DTLbibfield}[1]{\csname @dtl@key@#1\endcsname} |