summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/datatool/databib.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/datatool/databib.sty')
-rw-r--r--Master/texmf-dist/tex/latex/datatool/databib.sty54
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}