diff options
author | Karl Berry <karl@freefriends.org> | 2013-06-28 21:55:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-06-28 21:55:40 +0000 |
commit | 35f4733179fc116420810062bf3bd6891f86b5d9 (patch) | |
tree | 3b0927edac46e09d985b5a5253b08757858b7ee4 /Master/texmf-dist/tex/latex/datatool/datagidx.sty | |
parent | efeeb862227d6416e7450a72d6f37ebba3563b20 (diff) |
datatool (28jun13)
git-svn-id: svn://tug.org/texlive/trunk@31007 c570f23f-e606-0410-a88d-b1316a301751
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 |