diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/datatool/datagidx.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/datatool/datagidx.sty | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/datatool/datagidx.sty b/Master/texmf-dist/tex/latex/datatool/datagidx.sty index 63b778f0cff..b9cd631badb 100644 --- a/Master/texmf-dist/tex/latex/datatool/datagidx.sty +++ b/Master/texmf-dist/tex/latex/datatool/datagidx.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{datagidx}[2013/01/15 v2.13 (NLCT)] +\ProvidesPackage{datagidx}[2013/06/28 v2.14 (NLCT)] \RequirePackage{datatool} \RequirePackage{etoolbox} \RequirePackage{xkeyval} @@ -1515,7 +1515,6 @@ \if@tempswa \DTLgidxSymbolDescription \DTLgidxDoSeeOrLocation - \DTLgidxSeeAlso \else \mbox{}% \fi @@ -2317,7 +2316,19 @@ }% }% \global\let\datagidxlastlabel\newterm@label + \postnewtermhook }% +\newcommand*{\postnewtermhook}{} +\newcommand*{\newtermfield}[1]{\csuse{newterm@#1}} +\newcommand{\ifnewtermfield}[3]{% + \ifcsdef{newterm@#1} + {% + \ifcsempty{newterm@#1}{#3}{#2}% + }% + {% + #3% + }% +} \newcommand{\datagidx@newterm}[2][]{% \datagidx@setfieldvalues{#1}{#2}% \DTLifdbexists{\newterm@database}% @@ -2410,6 +2421,9 @@ \newcommand{\iftermexists}[3]{% \ifcsdef{datagidxentry@#1}{#2}{#3}% } +\newcommand*{\datagidxdb}[1]{% + \csuse{datagidxentry@#1}% +} \newcommand*{\ifentryused}[3]{% \letcs{\newterm@database}{datagidxentry@#1}% \edef\dtl@dogetrow{% @@ -2950,6 +2964,8 @@ \appto\newterm@styles{balance=false,}% \fi } +\newcommand*{\printterms@condition}{\boolean{true}} +\define@key{printterms}{condition}{\renewcommand*{\printterms@condition}{#1}} \newcommand{\printterms}[1][]{% \bgroup \let\newterm@database\datagidx@defaultdatabase @@ -3063,7 +3079,7 @@ \newcommand{\DTLgidxForeachEntry}[1]{% \def\datagidxprevgroup{}% \edef\datagidx@doforeachentry{% - \noexpand\DTLforeach*{\DTLgidxCurrentdb}% + \noexpand\DTLforeach*[\expandonce\printterms@condition]{\DTLgidxCurrentdb}% {\expandonce\DTLgidxAssignList} }% \datagidx@doforeachentry |