summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-01-15 23:01:04 +0000
committerKarl Berry <karl@freefriends.org>2013-01-15 23:01:04 +0000
commit6d3800d3b164704c4038f84408b27f759a4ea744 (patch)
tree6d56ebd38457cb5f2d7bcbe628157f861fecdaae /Master/texmf-dist/tex/latex
parent607c25d782c2e57a60ab2f2ecf30c12e238b44ec (diff)
datatool (15jan13)
git-svn-id: svn://tug.org/texlive/trunk@28844 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/datatool/databar.sty6
-rw-r--r--Master/texmf-dist/tex/latex/datatool/databib.sty6
-rw-r--r--Master/texmf-dist/tex/latex/datatool/datagidx.sty3147
-rw-r--r--Master/texmf-dist/tex/latex/datatool/datapie.sty6
-rw-r--r--Master/texmf-dist/tex/latex/datatool/dataplot.sty6
-rw-r--r--Master/texmf-dist/tex/latex/datatool/datatool-base.sty626
-rw-r--r--Master/texmf-dist/tex/latex/datatool/datatool-fp.sty6
-rw-r--r--Master/texmf-dist/tex/latex/datatool/datatool-pgfmath.sty6
-rw-r--r--Master/texmf-dist/tex/latex/datatool/datatool.sty232
-rw-r--r--Master/texmf-dist/tex/latex/datatool/person.sty6
10 files changed, 3860 insertions, 187 deletions
diff --git a/Master/texmf-dist/tex/latex/datatool/databar.sty b/Master/texmf-dist/tex/latex/datatool/databar.sty
index 972aa20eceb..e0ab21dfffc 100644
--- a/Master/texmf-dist/tex/latex/datatool/databar.sty
+++ b/Master/texmf-dist/tex/latex/datatool/databar.sty
@@ -7,7 +7,7 @@
%% datatool.dtx (with options: `databar.sty,package')
%%
%% datatool.dtx
-%% Copyright 2012 Nicola Talbot
+%% Copyright 2013 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -21,7 +21,7 @@
%%
%% The Current Maintainer of this work is Nicola Talbot.
%%
-%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
+%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, datagidx.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{databar}[2012/09/25 v2.11 (NLCT)]
+\ProvidesPackage{databar}[2013/01/15 v2.13 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{dataplot}
\newif\ifDTLcolorbarchart
diff --git a/Master/texmf-dist/tex/latex/datatool/databib.sty b/Master/texmf-dist/tex/latex/datatool/databib.sty
index c5c7ada4dfc..3ebe84cea78 100644
--- a/Master/texmf-dist/tex/latex/datatool/databib.sty
+++ b/Master/texmf-dist/tex/latex/datatool/databib.sty
@@ -7,7 +7,7 @@
%% datatool.dtx (with options: `databib.sty,package')
%%
%% datatool.dtx
-%% Copyright 2012 Nicola Talbot
+%% Copyright 2013 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -21,7 +21,7 @@
%%
%% The Current Maintainer of this work is Nicola Talbot.
%%
-%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
+%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, datagidx.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{databib}[2012/09/25 v2.11 (NLCT)]
+\ProvidesPackage{databib}[2013/01/15 v2.13 (NLCT)]
\RequirePackage{datatool}
\newcommand*{\dtlbib@style}{plain}
\define@choicekey{databib.sty}{style}{plain,abbrv,alpha}{%
diff --git a/Master/texmf-dist/tex/latex/datatool/datagidx.sty b/Master/texmf-dist/tex/latex/datatool/datagidx.sty
new file mode 100644
index 00000000000..63b778f0cff
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/datatool/datagidx.sty
@@ -0,0 +1,3147 @@
+%%
+%% This is file `datagidx.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% datatool.dtx (with options: `datagidx.sty,package')
+%%
+%% datatool.dtx
+%% Copyright 2013 Nicola Talbot
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license of (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Nicola Talbot.
+%%
+%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, datagidx.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
+%%
+%% \CharacterTable
+%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{datagidx}[2013/01/15 v2.13 (NLCT)]
+\RequirePackage{datatool}
+\RequirePackage{etoolbox}
+\RequirePackage{xkeyval}
+\RequirePackage{mfirstuc}
+\RequirePackage{xfor}
+\RequirePackage{multicol}
+\RequirePackage{textcase}
+\newcommand*{\datagidx@columns}{2}
+\newcommand*{\DTLgidxSetColumns}[1]{%
+ \DTLifint{#1}%
+ {%
+ \def\datagidx@columns{#1}%
+ }%
+ {%
+ \PackageError{datagidx}%
+ {Number of columns must be an integer}%
+ {%
+ You have requested `#1' columns, which can't be parsed as a
+ number%
+ }%
+ }%
+}
+\newcounter{DTLgidxChildCount}
+\def\theHDTLgidxChildCount{\Label.\arabic{DTLgidxChildCount}}
+\newcommand*{\DTLgidxChildCountLabel}{\theDTLgidxChildCount) }
+\newcommand*{\DTLgidxChildStyle}[1]{#1}
+\newcommand*{\datagidx@setchildstyle}[1]{%
+ \ifcase#1\relax
+ \renewcommand*{\DTLgidxChildStyle}[1]{##1}%
+ \or
+ \renewcommand*{\DTLgidxChildStyle}[1]{%
+ \DTLgidxChildCountLabel
+ }%
+ \fi
+}
+\newcommand{\datagidx@foreachchild}{%
+ \datagidx@sort@foreachchild
+}
+\newcommand*{\datagidx@setchildsort}[1]{%
+ \ifcase#1\relax
+ \renewcommand*{\datagidx@foreachchild}{%
+ \datagidx@sort@foreachchild
+ }%
+ \or
+ \renewcommand*{\datagidx@foreachchild}{%
+ \datagidx@unsort@foreachchild
+ }%
+ \fi
+}
+\newcommand*{\DTLgidxPostName}{ }
+\newcommand*{\DTLgidxPostChildName}{\DTLgidxPostName}
+\newcommand*{\DTLgidxNameCase}[1]{#1}
+\newcommand*{\datagidx@setnamecase}[1]{%
+ \ifcase#1\relax
+ \renewcommand*{\DTLgidxNameCase}[1]{##1}%
+ \or
+ \let\DTLgidxNameCase\MakeTextUppercase
+ \or
+ \let\DTLgidxNameCase\MakeTextLowercase
+ \or
+ \let\DTLgidxNameCase\xmakefirstuc
+ \or
+ \let\DTLgidxNameCase\xcapitalisewords
+ \fi
+}
+\newcommand*{\DTLgidxNameFont}[1]{\textnormal{#1}}
+\newcommand*{\DTLgidxPostDescription}{}
+\newcommand*{\datagidx@setpostdesc}[1]{%
+ \ifcase#1\relax
+ \renewcommand*{\DTLgidxPostDescription}{}%
+ \or
+ \renewcommand*{\DTLgidxPostDescription}{.}%
+ \fi
+ }
+\newcommand*{\DTLgidxPreLocation}{\enspace}
+\newcommand*{\datagidx@setprelocation}[1]{%
+ \ifcase#1\relax
+ \renewcommand*{\DTLgidxPreLocation}{}%
+ \or
+ \renewcommand*{\DTLgidxPreLocation}{\enspace}%
+ \or
+ \renewcommand*{\DTLgidxPreLocation}{ }%
+ \or
+ \renewcommand*{\DTLgidxPreLocation}{\dotfill}%
+ \or
+ \renewcommand*{\DTLgidxPreLocation}{\hfill}%
+ \fi
+ }
+\newcommand*{\DTLgidxLocation}{\dtldolocationlist}
+\newcommand*{\datagidx@setlocation}[1]{%
+ \ifcase#1\relax
+ \renewcommand*{\DTLgidxLocation}{}%
+ \or
+ \renewcommand*{\DTLgidxLocation}{\dtldolocationlist}%
+ \or
+ \renewcommand*{\DTLgidxLocation}{\dtldofirstlocation}%
+ \fi
+}
+\newcommand*{\DTLgidxSee}{%
+ \DTLifnull{\See}%
+ {}%
+ {%
+ \DTLgidxPreLocation
+ \DTLgidxFormatSee{\seename}{\See}%
+ }%
+}
+\newcommand*{\DTLgidxSeeAlso}{%
+ \DTLifnull{\SeeAlso}%
+ {}%
+ {%
+ \DTLgidxFormatSeeAlso{\seealsoname}{\SeeAlso}%
+ }%
+}
+\newcommand*{\DTLgidxChildrenSeeAlso}{%
+ \DTLgidxChildren
+ \DTLgidxSeeAlso
+}
+\newcommand*{\datagidx@setsee}[1]{%
+ \ifcase#1\relax
+ \renewcommand*{\DTLgidxSee}{%
+ \DTLifnull{\See}{}%
+ {%
+ , \DTLgidxFormatSee{\seename}{\See}%
+ }%
+ }%
+ \or
+ \renewcommand*{\DTLgidxSee}{%
+ \DTLifnull{\See}{}
+ {%
+ \space(\DTLgidxFormatSee{\seename}{\See})%
+ }%
+ }%
+ \or
+ \renewcommand*{\DTLgidxSee}{%
+ \DTLifnull{\See}{}%
+ {%
+ . \DTLgidxFormatSee{\xmakefirstuc{\seename}}{\See}%
+ }%
+ }%
+ \or
+ \renewcommand*{\DTLgidxSee}{%
+ \DTLifnull{\See}{}
+ {%
+ \space\DTLgidxFormatSee{\seename}{\See}%
+ }%
+ }%
+ \or
+ \renewcommand*{\DTLgidxSee}{%
+ \DTLifnull{\See}{}
+ {%
+ \DTLgidxFormatSee{\seename}{\See}%
+ }%
+ }%
+ \or
+ \renewcommand*{\DTLgidxSee}{%
+ \DTLifnull{\See}{}
+ {%
+ ; \DTLgidxFormatSee{\seename}{\See}%
+ }%
+ }%
+ \or
+ \renewcommand*{\DTLgidxSee}{%
+ \DTLifnull{\See}{}
+ {%
+ \DTLgidxPreLocation\DTLgidxFormatSee{\seename}{\See}%
+ }%
+ }%
+ \fi
+}
+\newcommand*{\DTLgidxSymDescSep}{\space}
+\newlength\datagidxsymbolwidth
+\newlength\datagidxlocationwidth
+\newcommand{\DTLgidxFormatDesc}[1]{#1}
+\newcommand*{\DTLgidxSymbolDescription}{%
+ \DTLgidxSymbolDescLeft
+ \DTLgidxSymbolDescRight
+}
+\newcommand*{\DTLgidxSymbolDescLeft}{%
+ \ifdefempty{\Symbol}{}{(\Symbol)\DTLgidxSymDescSep}%
+}
+\newcommand*{\DTLgidxSymbolDescRight}{%
+ \ifdefempty{\Description}{}%
+ {%
+ \DTLgidxFormatDesc{\Description}\DTLgidxPostDescription
+ }%
+}
+\newif\if@datagidxsymbolleft
+\@datagidxsymbollefttrue
+\newcommand*{\datagidx@formatsymdesc}[1]{%
+ \ifcase#1\relax
+ \renewcommand*{\DTLgidxSymbolDescLeft}{%
+ \ifdefempty{\Symbol}{}{\Symbol}%
+ }%
+ \renewcommand*{\DTLgidxSymbolDescRight}{}%
+ \@datagidxsymbollefttrue
+ \or
+ \renewcommand*{\DTLgidxSymbolDescLeft}{%
+ \ifdefempty{\Description}{}%
+ {%
+ \DTLgidxFormatDesc{\Description}\DTLgidxPostDescription
+ }%
+ }%
+ \renewcommand*{\DTLgidxSymbolDescRight}{}%
+ \@datagidxsymbolleftfalse
+ \or
+ \renewcommand*{\DTLgidxSymbolDescLeft}{%
+ \ifdefempty{\Symbol}{}{(\Symbol)\DTLgidxSymDescSep}%
+ }%
+ \renewcommand*{\DTLgidxSymbolDescRight}{%
+ \ifdefempty{\Description}{}%
+ {%
+ \DTLgidxFormatDesc{\Description}\DTLgidxPostDescription
+ }%
+ }%
+ \@datagidxsymbollefttrue
+ \or
+ \renewcommand*{\DTLgidxSymbolDescLeft}{%
+ \ifdefempty{\Description}{}%
+ {%
+ \DTLgidxFormatDesc{\Description}%
+ \DTLgidxPostDescription\DTLgidxSymDescSep
+ }%
+ }%
+ \renewcommand*{\DTLgidxSymbolDescRight}{%
+ \ifdefempty{\Symbol}{}{(\Symbol)}%
+ }%
+ \@datagidxsymbolleftfalse
+ \or
+ \renewcommand*{\DTLgidxSymbolDescLeft}{%
+ \ifdefempty{\Symbol}{}{\Symbol\DTLgidxSymDescSep}%
+ }%
+ \renewcommand*{\DTLgidxSymbolDescRight}{%
+ \ifdefempty{\Description}{}%
+ {%
+ \DTLgidxFormatDesc{\Description}%
+ \DTLgidxPostDescription
+ }%
+ }%
+ \@datagidxsymbollefttrue
+ \or
+ \renewcommand*{\DTLgidxSymbolDescLeft}{%
+ \ifdefempty{\Description}{}%
+ {%
+ \DTLgidxFormatDesc{\Description}%
+ \DTLgidxPostDescription\DTLgidxSymDescSep
+ }%
+ }%
+ \renewcommand*{\DTLgidxSymbolDescRight}{%
+ \ifdefempty{\Symbol}{}{\Symbol}%
+ }%
+ \@datagidxsymbolleftfalse
+ \fi
+ }
+\newcommand*{\DTLgidxSetCompositor}[1]{%
+ \undef\datagidx@docomplist
+ \DeclareListParser{\datagidx@docomplist}{#1}%
+ \def\datagidx@compositor{#1}%
+}
+\DTLgidxSetCompositor{.}
+\newcommand*{\datagidx@do@sort}{\datagidx@sort}
+\newcommand*{\datagidx@optimize@sort}{%
+ \ifdef\datagidx@do@optimize@sort
+ {%
+ \datagidx@sort
+ }%
+ {%
+ \protected@write\@auxout{}{%
+ \string\gdef\string\datagidx@do@optimize@sort{}%
+ }%
+ \global\let\@datagidx@dorerun@warn@sort\@data@rerun@warn@sort
+ }%
+}
+\newcommand*\@datagidx@dorerun@warn{}
+\AtEndDocument{\@datagidx@dorerun@warn}
+\newcommand*\@datagidx@dorerun@warn@sort{}
+\AtEndDocument{\@datagidx@dorerun@warn@sort}
+\newcommand*\@data@rerun@warn@sort{%
+ \PackageWarningNoLine{datagidx}{Rerun required to sort the
+ index/glossary databases}%
+}
+\newcommand*\@data@rerun@warn{%
+ \PackageWarningNoLine{datagidx}{Rerun required to ensure the
+ index/glossary location lists are up-to-date}%
+}
+\newcommand*{\datagidx@do@highopt@optimize}{%
+ \renewcommand*{\datagidx@do@sort}{%
+ \ifcsdef{datagidx@do@highopt@sort@\DTLgidxCurrentdb}%
+ {%
+ \csuse{datagidx@do@highopt@sort@\DTLgidxCurrentdb}%
+ }%
+ {%
+ }%
+ \bgroup
+ \def\dtl@saverawdbhook{%
+ \let\db@col@id@w\@datagidx@db@col@id@w
+ \def\DTLgidxName{\string\DTLgidxName\space}%
+ \def\DTLgidxMac{\string\DTLgidxMac\space}%
+ \def\DTLgidxRank{\string\DTLgidxRank\space}%
+ \def\DTLgidxParen{\string\DTLgidxParen\space}%
+ \def\DTLgidxParticle{\string\DTLgidxParticle\space}%
+ \def\DTLgidxOffice{\string\DTLgidxOffice\space}%
+ \def\DTLgidxSaint{\string\DTLgidxSaint\space}%
+ \def\DTLgidxPlace{\string\DTLgidxPlace\space}%
+ \def\DTLgidxIgnore{\string\DTLgidxIgnore\space}%
+ \def\DTLgidxNameNum{\string\DTLgidxNameNum\space}%
+ \def\DTLgidxSubject{\string\DTLgidxSubject\space}%
+ }%
+ \DTLsaverawdb{\DTLgidxCurrentdb}{\datagidxhighoptfilename\DTLgidxCurrentdb}%
+ \egroup
+ }%
+ \def\newgidx{\datagidx@highopt@newgidx}%
+ \def\newterm{\datagidx@highopt@newterm}%
+}
+\def\@datagidx@db@col@id@w#1\db@col@id@end@\db@col@elt@w#2\db@col@elt@end@\db@col@id@w#3\db@col@id@end@{%
+ \expandafter\@gobble\string\%^^J
+ \string\db@col@id@w\space #1%
+ \expandafter\@gobble\string\%^^J
+ \string\db@col@id@end@\space
+ \expandafter\@gobble\string\%^^J
+ \string\db@col@elt@w\space
+ \expandafter\ifnum\csname dtl@ci@\DTLgidxCurrentdb @Used\endcsname=#1\space
+ 0%
+ \else
+ \expandafter\ifnum\csname dtl@ci@\DTLgidxCurrentdb @Location\endcsname=#1\space
+ \else
+ \expandafter\ifnum\csname dtl@ci@\DTLgidxCurrentdb @CurrentLocation\endcsname=#1\space
+ \else
+ \expandafter\ifnum\csname dtl@ci@\DTLgidxCurrentdb @Sort\endcsname=#1\space
+ \protect#2%
+ \else
+ #2%
+ \fi
+ \fi
+ \fi
+ \fi
+ \expandafter\@gobble\string\%^^J
+ \string\db@col@elt@end@\space
+ \expandafter\@gobble\string\%^^J
+ \string\db@col@id@w\space #3%
+ \expandafter\@gobble\string\%^^J
+ \string\db@col@id@end@\space
+}
+\newcommand*{\datagidx@do@highopt@update}[1]{}
+\newcommand*{\datagidxhighoptfilename}[1]{\jobname-#1.gidx}
+\define@choicekey{datagidx.sty}{optimize}[\val\nr]%
+ {off,low,high}[high]%
+ {%
+ \ifcase\nr\relax
+ \renewcommand*{\datagidx@do@sort}{\datagidx@sort}
+ \or
+ \renewcommand*{\datagidx@do@sort}{\datagidx@optimize@sort}
+ \or
+ \datagidx@do@highopt@optimize
+ \fi
+ }
+\define@key{datagidx.sty}{columns}%
+{%
+ \DTLgidxSetColumns{#1}%
+}
+\define@choicekey{datagidx.sty}{child}[\val\nr]%
+ {named,noname}%
+ {%
+ \datagidx@setchildstyle\nr
+ }
+\define@choicekey{datagidx.sty}{namecase}[\val\nr]%
+ {nochange,uc,lc,firstuc,capitalise}%
+ {%
+ \datagidx@setnamecase\nr
+ }
+\define@key{datagidx.sty}{namefont}%
+{%
+ \renewcommand*{\DTLgidxNameFont}[1]{{#1{##1}}}%
+}
+\define@key{datagidx.sty}{postname}
+{%
+ \renewcommand*{\DTLgidxPostName}{#1}%
+}
+\define@choicekey{datagidx.sty}{postdesc}[\val\nr]%
+ {none,dot}%
+ {%
+ \datagidx@setpostdesc\nr
+ }
+\define@choicekey{datagidx.sty}{prelocation}[\val\nr]%
+ {none,enspace,space,dotfill,hfill}%
+ {%
+ \datagidx@setprelocation\nr
+ }
+\define@choicekey{datagidx.sty}{location}[\val\nr]%
+ {hide,list,first}%
+ {\datagidx@setlocation\nr}
+\define@choicekey{datagidx.sty}{see}[\val\nr]%
+ {comma,brackets,dot,space,nosep,semicolon,location}%
+ {\datagidx@setsee\nr}
+\define@choicekey{datagidx.sty}{symboldesc}[\val\nr]%
+ {symbol,desc,(symbol) desc,desc (symbol),symbol desc,desc symbol}%
+ {\datagidx@formatsymdesc\nr}
+\define@key{datagidx.sty}{compositor}%
+{%
+ \DTLgidxSetCompositor{#1}%
+}%
+\DeclareOptionX{final}{%
+ \let\datagidxshowifdraft\@gobble
+}
+\let\datagidxshowifdraft\@gobble
+\DeclareOptionX{draft}{%
+ \let\datagidxshowifdraft\@firstofone
+}
+\define@choicekey{datagidx.sty}{verbose}[\val\nr]%
+ {true,false}[true]%
+ {%
+ \csuse{dtlverbose\val}%
+ }
+\ProcessOptionsX
+\DTLnewdb{datagidx}
+\providecommand*{\seename}{see}
+\providecommand*{\seealsoname}{see also}
+\newcommand*{\DTLgidxSeeTagFont}[1]{\emph{#1}}
+\newcommand*{\DTLgidxFormatSee}[2]{%
+ \DTLgidxSeeTagFont{#1} \DTLgidxSeeList{#2}%
+}
+\newcommand*{\DTLgidxFormatSeeAlso}[2]{%
+ \datagidxdoseealso
+ {%
+ \DTLgidxSeeTagFont{#1} \DTLgidxSeeList{#2}%
+ }%
+}
+\newcommand*{\datagidxdoseealso}[1]{%
+ \datagidxseealsostart
+ #1%
+ \datagidxseealsoend
+}
+\newcommand*{\DTLgidxSeeList}[1]{%
+ \def\datagidx@sep{}%
+ \@for\dtl@thislabel:=#1\do
+ {%
+ \ifx\@xfor@nextelement\@nnil
+ \ifdefempty{\datagidx@sep}%
+ {%
+ }%
+ {%
+ \DTLidxSeeLastSep
+ }%
+ \else
+ \datagidx@sep
+ \let\datagidx@sep\DTLidxSeeSep
+ \fi
+ \DTLidxFormatSeeItem{\dtl@thislabel}%
+ }%
+}
+\newcommand*{\DTLidxFormatSeeItem}[1]{%
+ \DTLgidxFetchEntry{\datagidx@value}{#1}{Name}%
+ \datagidxlink{#1}%
+ {%
+ \datagidx@value
+ }%
+}
+\newcommand*{\DTLidxSeeSep}{, }
+\newcommand*{\DTLidxSeeLastSep}{ \& }
+\newcommand*{\DTLgidxDoSeeOrLocation}{%
+ \DTLifnull\See
+ {%
+ \ifdefempty\Location
+ {%
+ }%
+ {%
+ \DTLgidxPreLocation
+ \DTLgidxLocation
+ }%
+ }%
+ {%
+ \DTLgidxSee
+ }%
+}
+\newcommand*{\datagidx@sortchildren}{%
+ \def\datagidx@sortedlist{}%
+ \@for\Label:=\Children\do
+ {%
+ \edef\do@getrow{%
+ \noexpand\dtlgetrowforvalue
+ {\DTLgidxCurrentdb}%
+ {\dtlcolumnindex{\DTLgidxCurrentdb}{Label}}%
+ {\Label}%
+ }%
+ \do@getrow
+ \ifdefempty\datagidx@sortedlist
+ {%
+ \edef\datagidx@newsortedlist{{\number\dtlrownum}{\Label}}%
+ }%
+ {%
+ \def\datagidx@newsortedlist{}%
+ \@for\@datagidx@thisval:=\datagidx@sortedlist\do
+ {%
+ \edef\datagidx@thisidx{\expandafter\@firstoftwo\@datagidx@thisval}%
+ \ifnum\datagidx@thisidx>\dtlrownum\relax
+ \ifdefempty\datagidx@newsortedlist
+ {%
+ \eappto\datagidx@newsortedlist
+ {%
+ {\number\dtlrownum}{\Label},\@datagidx@thisval
+ }%
+ }%
+ {%
+ \eappto\datagidx@newsortedlist
+ {%
+ ,{\number\dtlrownum}{\Label},\@datagidx@thisval
+ }%
+ }%
+ \@endfortrue
+ \else
+ \ifdefempty\datagidx@newsortedlist
+ {%
+ \edef\datagidx@newsortedlist{%
+ \@datagidx@thisval
+ }%
+ }%
+ {%
+ \eappto\datagidx@newsortedlist
+ {%
+ ,\@datagidx@thisval
+ }%
+ }%
+ \fi
+ }%
+ \if@endfor
+ \ifdefempty\@forremainder
+ {%
+ }%
+ {%
+ \eappto\datagidx@newsortedlist{,\@forremainder}%
+ }%
+ \else
+ \ifdefempty\datagidx@newsortedlist
+ {%
+ \edef\datagidx@newsortedlist{{\number\dtlrownum}{\Label}}%
+ }%
+ {%
+ \eappto\datagidx@newsortedlist{,{\number\dtlrownum}{\Label}}%
+ }%
+ \fi
+ }%
+ \let\datagidx@sortedlist\datagidx@newsortedlist
+ \@endforfalse
+ }%
+}
+\newcommand{\datagidx@sort@foreachchild}[1]{%
+ \datagidx@sortchildren
+ \@for\@datagidx@thisval:=\datagidx@sortedlist\do
+ {%
+ \edef\Label{\expandafter\@secondoftwo\@datagidx@thisval}%
+ #1%
+ }%
+}
+\newcommand{\datagidx@unsort@foreachchild}[1]{%
+ \@for\Label:=\Children\do
+ {%
+ #1%
+ }%
+}
+\newcommand*{\DTLgidxChildren}{%
+ \bgroup
+ \DTLifnull\Children
+ {}%
+ {%
+ \advance\datagidx@level by 1\relax
+ \datagidxchildstart
+ \let\Parent\Label
+ \datagidx@foreachchild
+ {%
+ \edef\do@getrow{%
+ \noexpand\dtlgetrowforvalue
+ {\DTLgidxCurrentdb}%
+ {\dtlcolumnindex{\DTLgidxCurrentdb}{Label}}%
+ {\Label}%
+ }%
+ \do@getrow
+ \dtlgetentryfromcurrentrow
+ {\Location}%
+ {\dtlcolumnindex{\DTLgidxCurrentdb}{Location}}%
+ \dtlgetentryfromcurrentrow
+ {\See}%
+ {\dtlcolumnindex{\DTLgidxCurrentdb}{See}}%
+ \dtlgetentryfromcurrentrow
+ {\SeeAlso}%
+ {\dtlcolumnindex{\DTLgidxCurrentdb}{SeeAlso}}%
+ \DTLifnull\Location
+ {%
+ \DTLifnull\See
+ {%
+ \DTLifnull\SeeAlso
+ {}%
+ {%
+ \datagidx@displaychild
+ }%
+ }%
+ {%
+ \datagidx@displaychild
+ }%
+ }%
+ {%
+ \datagidx@displaychild
+ }%
+ }%
+ \datagidxchildend
+ }%
+ \egroup
+}
+\newcommand*{\datagidxgetchildfields}{%
+ \dtlgetentryfromcurrentrow
+ {\Name}%
+ {\dtlcolumnindex{\DTLgidxCurrentdb}{Name}}%
+ \dtlgetentryfromcurrentrow
+ {\Description}%
+ {\dtlcolumnindex{\DTLgidxCurrentdb}{Description}}%
+ \dtlgetentryfromcurrentrow
+ {\Symbol}%
+ {\dtlcolumnindex{\DTLgidxCurrentdb}{Symbol}}%
+ \dtlgetentryfromcurrentrow
+ {\Long}%
+ {\dtlcolumnindex{\DTLgidxCurrentdb}{Long}}%
+ \dtlgetentryfromcurrentrow
+ {\Short}%
+ {\dtlcolumnindex{\DTLgidxCurrentdb}{Short}}%
+ \dtlgetentryfromcurrentrow
+ {\Text}%
+ {\dtlcolumnindex{\DTLgidxCurrentdb}{Text}}%
+ \dtlgetentryfromcurrentrow
+ {\Plural}%
+ {\dtlcolumnindex{\DTLgidxCurrentdb}{Plural}}%
+ \dtlgetentryfromcurrentrow
+ {\Short}%
+ {\dtlcolumnindex{\DTLgidxCurrentdb}{Used}}%
+ \dtlgetentryfromcurrentrow
+ {\Children}%
+ {\dtlcolumnindex{\DTLgidxCurrentdb}{Child}}%
+}
+\newcommand*{\datagidx@displaychild}{%
+ \datagidxgetchildfields
+ \datagidxchilditem
+}
+\ifdef{\chapter}
+{%
+ \newcommand*{\datagidx@heading}{\chapter*}
+}%
+{%
+ \newcommand*{\datagidx@heading}{\section*}
+}
+\let\DTLgidxNoHeading\@gobble
+\newcommand*{\datagidx@postheading}{}
+\newcommand*{\datagidx@multicols}{multicols}
+\newcommand*{\datagidx@sort}{%
+ \dtlsort{Sort,FirstId}{\DTLgidxCurrentdb}{\dtlwordindexcompare}%
+}
+\newcommand*{\datagidxstart}%
+{%
+ \bgroup
+ \setlength{\parindent}{0pt}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \let\item\@idxitem
+}
+\newcommand*{\datagidxend}{\egroup}
+\newcommand*{\@datagidxtarget}[2]{%
+ \ifdef\hypertarget
+ {%
+ \bgroup
+ \let\glsadd\@gobble
+ \settoheight\dimen@{#2}%
+ \raisebox{\dimen@}{\hypertarget{#1}{}}%
+ \egroup
+ }%
+ {%
+ }%
+ #2%
+}
+\newcommand*{\datagidxtarget}{\@datagidxtarget}
+\newcommand*{\@datagidxlink}[2]{%
+ \ifdef\hyperlink
+ {%
+ \hyperlink{#1}{#2}%
+ }%
+ {%
+ #2%
+ }%
+}
+\newcommand*{\datagidxlink}{\@datagidxlink}
+\newcommand*{\DTLgidxEnableHyper}{%
+ \let\datagidxtarget\@datagidxtarget
+ \let\datagidxlink\@datagidxlink
+}
+\newcommand*{\DTLgidxDisableHyper}{%
+ \let\datagidxtarget\@secondoftwo
+ \let\datagidxlink\@secondoftwo
+}
+\newcommand*{\datagidxgroupsep}{}
+\newcommand*{\datagidxgroupheader}{}
+\newcommand*{\datagidxitem}{}%
+\newcommand*{\datagidxchildstart}{}
+\newcommand*{\datagidxchildend}{}
+\newcommand*{\datagidxchilditem}{}%
+\newcommand*{\datagidxseealsostart}{}
+\newcommand*{\datagidxseealsoend}{}
+\newcommand*{\datagidx@doifsymlocwidth}[3]{%
+ \setlength{\dtl@tmplength}{\linewidth}%
+ \addtolength{\dtl@tmplength}{-#1}%
+ \settowidth{\dimen@}{#2}%
+ \addtolength{\dtl@tmplength}{-\dimen@}%
+ \addtolength{\dtl@tmplength}{-\datagidxsymbolwidth}%
+ \addtolength{\dtl@tmplength}{-\datagidxlocationwidth}%
+ \settowidth{\dimen@}{\DTLgidxPreLocation}%
+ \addtolength{\dtl@tmplength}{-\dimen@}%
+ \settowidth{\dimen@}{\DTLgidxSymDescSep}%
+ \addtolength{\dtl@tmplength}{-\dimen@}%
+ \if@datagidxsymbolleft
+ \begin{minipage}[t]{\datagidxsymbolwidth}%
+ \datagidxsymalign
+ \let\DTLgidxSymDescSep\@empty
+ \DTLgidxSymbolDescLeft
+ \end{minipage}%
+ \DTLgidxSymDescSep
+ \begin{minipage}[t]{\dtl@tmplength}%
+ \let\DTLgidxSymDescSep\@empty
+ \DTLgidxSymbolDescRight
+ \end{minipage}%
+ \else
+ \begin{minipage}[t]{\dtl@tmplength}%
+ \let\DTLgidxSymDescSep\@empty
+ \DTLgidxSymbolDescRight
+ \end{minipage}%
+ \DTLgidxSymDescSep
+ \begin{minipage}[t]{\datagidxsymbolwidth}%
+ \datagidxsymalign
+ \let\DTLgidxSymDescSep\@empty
+ \DTLgidxSymbolDescLeft
+ \end{minipage}%
+ \fi
+ \DTLgidxPreLocation
+ \begin{minipage}[t]{\datagidxlocationwidth}%
+ \datagidxlocalign
+ \let\DTLgidxPreLocation\@empty
+ #3%
+ \end{minipage}%
+}
+\newcommand*{\datagidx@doiflocwidth}[3]{%
+ \setlength{\dtl@tmplength}{\linewidth}%
+ \addtolength{\dtl@tmplength}{-#1}%
+ \settowidth{\dimen@}{#2}%
+ \addtolength{\dtl@tmplength}{-\dimen@}%
+ \addtolength{\dtl@tmplength}{-\datagidxlocationwidth}%
+ \settowidth{\dimen@}{\DTLgidxPreLocation}%
+ \addtolength{\dtl@tmplength}{-\dimen@}%
+ \begin{minipage}[t]{\dtl@tmplength}%
+ \DTLgidxSymbolDescription
+ \end{minipage}%
+ \DTLgidxPreLocation
+ \begin{minipage}[t]{\datagidxlocationwidth}%
+ \datagidxlocalign
+ \let\DTLgidxPreLocation\@empty
+ #3%
+ \end{minipage}%
+}
+\newcommand*{\datagidx@doifsymwidth}[3]{%
+ \setlength{\dtl@tmplength}{\linewidth}%
+ \addtolength{\dtl@tmplength}{-#1}%
+ \settowidth{\dimen@}{#2}%
+ \addtolength{\dtl@tmplength}{-\dimen@}%
+ \addtolength{\dtl@tmplength}{-\datagidxsymbolwidth}%
+ \settowidth{\dimen@}{\DTLgidxSymDescSep}%
+ \addtolength{\dtl@tmplength}{-\dimen@}%
+ \if@datagidxsymbolleft
+ \begin{minipage}[t]{\datagidxsymbolwidth}%
+ \datagidxsymalign
+ \let\DTLgidxSymDescSep\@empty
+ \DTLgidxSymbolDescLeft
+ \end{minipage}%
+ \DTLgidxSymDescSep
+ \begin{minipage}[t]{\dtl@tmplength}%
+ \let\DTLgidxSymDescSep\@empty
+ \DTLgidxSymbolDescRight
+ #3%
+ \end{minipage}%
+ \else
+ \begin{minipage}[t]{\dtl@tmplength}%
+ \let\DTLgidxSymDescSep\@empty
+ \DTLgidxSymbolDescRight
+ \end{minipage}%
+ \DTLgidxSymDescSep
+ \begin{minipage}[t]{\datagidxsymbolwidth}%
+ \datagidxsymalign
+ \let\DTLgidxSymDescSep\@empty
+ \DTLgidxSymbolDescLeft
+ #3%
+ \end{minipage}%
+ \fi
+}
+\newcommand*{\datagidxlocalign}{\raggedleft}
+\newcommand*{\datagidxsymalign}{\centering}
+\newcommand*{\datagidxsetstyle}[1]{%
+ \ifcsdef{datagidx@style@#1}%
+ {%
+ \csuse{datagidx@style@#1}%
+ }%
+ {%
+ \PackageError{datagidx}{Unknown style `#1'}{}%
+ }%
+}
+\newcommand*{\datagidx@style@index}{%
+ \renewcommand*{\datagidxstart}%
+ {%
+ \bgroup
+ \setlength{\parindent}{0pt}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \raggedright
+ \let\item\@idxitem
+ \ifdim\datagidxsymbolwidth>0pt\relax
+ \ifdim\datagidxlocationwidth>0pt\relax
+ \def\datagidx@item@body{%
+ \datagidx@doifsymlocwidth{0pt}%
+ {\DTLgidxNameFont{\DTLgidxNameCase{\Name}}}%
+ {%
+ \DTLgidxDoSeeOrLocation
+ }%
+ }%
+ \else
+ \def\datagidx@item@body{%
+ \datagidx@doiflocwidth{0pt}%
+ {\DTLgidxNameFont{\DTLgidxNameCase{\Name}}}%
+ {%
+ \DTLgidxDoSeeOrLocation
+ }%
+ }%
+ \fi
+ \else
+ \ifdim\datagidxlocationwidth>0pt\relax
+ \def\datagidx@item@body{%
+ \datagidx@doiflocwidth{0pt}%
+ {\DTLgidxNameFont{\DTLgidxNameCase{\Name}}}%
+ {%
+ \DTLgidxDoSeeOrLocation
+ }%
+ }%
+ \else
+ \def\datagidx@item@body{%
+ \DTLgidxSymbolDescription
+ \DTLgidxDoSeeOrLocation
+ }%
+ \fi
+ \fi
+ }%
+ \renewcommand*{\datagidxend}{\egroup}%
+ \renewcommand*{\datagidxgroupsep}{\ifdatagidxshowgroups\indexspace\fi}%
+ \renewcommand{\datagidxgroupheader}{%
+ \ifdatagidxshowgroups
+ \item
+ \makebox[\linewidth]%
+ {%
+ \textbf{\DTLgidxGroupHeaderTitle{\datagidxcurrentgroup}}%
+ }%
+ \DTLpar\nobreak\@afterheading
+ \fi
+ }%
+ \renewcommand*{\datagidxitem}{%
+ \ifdefempty\datagidxprevgroup
+ {%
+ \datagidxgroupheader
+ }%
+ {%
+ \ifdefequal\datagidxcurrentgroup\datagidxprevgroup
+ {%
+ }%
+ {%
+ \datagidxgroupsep
+ \datagidxgroupheader
+ }%
+ }%
+ \item
+ \datagidxtarget{\Label}%
+ {%
+ \DTLgidxNameFont{\DTLgidxNameCase{\Name}}%
+ }%
+ \DTLgidxPostName
+ \datagidx@item@body
+ \DTLgidxChildrenSeeAlso
+ }%
+ \renewcommand*{\datagidxchildstart}%
+ {%
+ \bgroup
+ \setlength{\parindent}{0pt}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \let\item\@idxitem
+ }%
+ \renewcommand*{\datagidxchildend}{\egroup}%
+ \renewcommand*{\datagidxchilditem}{%
+ \setlength{\dimen@}{\datagidxindent}%
+ \multiply\dimen@ by \datagidx@level\relax
+ \@idxitem\hspace*{\dimen@}%
+ \refstepcounter{DTLgidxChildCount}%
+ \datagidxtarget{\Label}%
+ {%
+ \DTLgidxChildStyle
+ {%
+ \DTLgidxNameFont{\DTLgidxNameCase{\Name}}%
+ \DTLgidxPostChildName
+ }%
+ }%
+ \DTLgidxSymbolDescription
+ \DTLgidxDoSeeOrLocation
+ \DTLgidxChildrenSeeAlso
+ }%
+ \renewcommand*{\datagidxseealsostart}%
+ {%
+ \bgroup
+ \setlength{\parindent}{0pt}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \setlength{\dimen@}{\datagidxindent}%
+ \advance\datagidx@level by 1\relax
+ \multiply\dimen@ by \datagidx@level\relax
+ \@idxitem\hspace*{\dimen@}%
+ }%
+ \renewcommand{\datagidxseealsoend}{\egroup}%
+}
+\datagidx@style@index
+\newcommand*{\datagidx@style@indexalign}{%
+ \renewcommand*{\datagidxstart}%
+ {%
+ \bgroup
+ \setlength{\parindent}{0pt}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \setlength{\datagidxnamewidth}{0pt}%
+ \DTLforeach*{\DTLgidxCurrentdb}%
+ {\Name=Name,\Location=Location,\See=See,\SeeAlso=SeeAlso,%
+ \Parent=Parent}%
+ {%
+ \DTLifnull{\Parent}%
+ {%
+ \datagidx@doifdisplayed
+ {%
+ \settowidth{\dimen@}{\DTLgidxNameFont{\DTLgidxNameCase{\Name}}}%
+ \ifdim\dimen@>\datagidxnamewidth\relax
+ \datagidxnamewidth=\dimen@\relax
+ \fi
+ }%
+ }%
+ {}%
+ }%
+ \settowidth{\dimen@}{\DTLgidxPostName}%
+ \addtolength{\datagidxnamewidth}{\dimen@}%
+ \setlength{\datagidxdescwidth}{\linewidth}%
+ \addtolength{\datagidxdescwidth}{-\datagidxnamewidth}%
+ \ifdim\datagidxsymbolwidth>0pt\relax
+ \addtolength{\datagidxdescwidth}{-\datagidxsymbolwidth}%
+ \settowidth{\dimen@}{\DTLgidxSymDescSep}%
+ \addtolength{\datagidxdescwidth}{-\dimen@}%
+ \fi
+ \ifdim\datagidxlocationwidth>0pt\relax
+ \addtolength{\datagidxdescwidth}{-\datagidxlocationwidth}%
+ \settowidth{\dimen@}{\DTLgidxPreLocation}%
+ \addtolength{\datagidxdescwidth}{-\dimen@}%
+ \fi
+ \ifdim\datagidxsymbolwidth>0pt\relax
+ \ifdim\datagidxlocationwidth>0pt\relax
+ \if@datagidxsymbolleft
+ \def\datagidx@item@body{%
+ \begin{minipage}[t]{\datagidxsymbolwidth}%
+ \datagidxsymalign
+ \let\DTLgidxSymDescSep\@empty
+ \DTLgidxSymbolDescLeft
+ \end{minipage}%
+ \DTLgidxSymDescSep
+ \begin{minipage}[t]{\datagidxdescwidth}%
+ \let\DTLgidxSymDescSep\@empty
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \DTLgidxSymbolDescRight
+ \end{minipage}%
+ \DTLgidxPreLocation
+ \begin{minipage}[t]{\datagidxlocationwidth}%
+ \datagidxlocalign
+ \let\DTLgidxPreLocation\@empty
+ \DTLgidxDoSeeOrLocation
+ \end{minipage}%
+ }%
+ \else
+ \def\datagidx@item@body{%
+ \begin{minipage}[t]{\datagidxdescwidth}%
+ \let\DTLgidxSymDescSep\@empty
+ \DTLgidxSymbolDescLeft
+ \end{minipage}%
+ \DTLgidxSymDescSep
+ \begin{minipage}[t]{\datagidxsymbolwidth}%
+ \datagidxsymalign
+ \let\DTLgidxSymDescSep\@empty
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \DTLgidxSymbolDescRight
+ \end{minipage}%
+ \DTLgidxPreLocation
+ \begin{minipage}[t]{\datagidxlocationwidth}%
+ \datagidxlocalign
+ \let\DTLgidxPreLocation\@empty
+ \DTLgidxDoSeeOrLocation
+ \end{minipage}%
+ }%
+ \fi
+ \else
+ \if@datagidxsymbolleft
+ \def\datagidx@item@body{%
+ \begin{minipage}[t]{\datagidxsymbolwidth}%
+ \datagidxsymalign
+ \let\DTLgidxSymDescSep\@empty
+ \DTLgidxSymbolDescLeft
+ \end{minipage}%
+ \DTLgidxSymDescSep
+ \begin{minipage}[t]{\datagidxdescwidth}%
+ \let\DTLgidxSymDescSep\@empty
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \DTLgidxSymbolDescRight
+ \DTLgidxDoSeeOrLocation
+ \end{minipage}%
+ }%
+ \else
+ \def\datagidx@item@body{%
+ \begin{minipage}[t]{\datagidxdescwidth}%
+ \let\DTLgidxSymDescSep\@empty
+ \DTLgidxSymbolDescLeft
+ \end{minipage}%
+ \DTLgidxSymDescSep
+ \begin{minipage}[t]{\datagidxsymbolwidth}%
+ \datagidxsymalign
+ \let\DTLgidxSymDescSep\@empty
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \DTLgidxSymbolDescRight
+ \DTLgidxDoSeeOrLocation
+ \end{minipage}%
+ }%
+ \fi
+ \fi
+ \else
+ \ifdim\datagidxlocationwidth>0pt\relax
+ \def\datagidx@item@body{%
+ \begin{minipage}[t]{\datagidxdescwidth}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \DTLgidxSymbolDescription
+ \end{minipage}%
+ \DTLgidxPreLocation
+ \begin{minipage}[t]{\datagidxlocationwidth}%
+ \datagidxlocalign
+ \let\DTLgidxPreLocation\@empty
+ \DTLgidxDoSeeOrLocation
+ }%
+ \else
+ \def\datagidx@item@body{%
+ \begin{minipage}[t]{\datagidxdescwidth}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \DTLgidxSymbolDescription
+ \DTLgidxDoSeeOrLocation
+ \end{minipage}%
+ }%
+ \fi
+ \fi
+ }%
+ \renewcommand*{\datagidxend}{\egroup}%
+ \renewcommand*{\datagidxgroupsep}{}%
+ \renewcommand*{\datagidxgroupheader}{}%
+ \renewcommand*{\datagidxitem}{%
+ \ifdefempty\datagidxprevgroup
+ {%
+ \datagidxgroupheader
+ }%
+ {%
+ \ifdefequal\datagidxcurrentgroup\datagidxprevgroup
+ {%
+ }%
+ {%
+ \datagidxgroupsep
+ \datagidxgroupheader
+ }%
+ }%
+ \hangindent0pt\relax
+ \parindent0pt\relax
+ \makebox[\datagidxnamewidth][l]%
+ {%
+ \datagidxtarget{\Label}%
+ {%
+ \DTLgidxNameFont{\DTLgidxNameCase{\Name}}%
+ \DTLgidxPostName
+ }%
+ }%
+ \datagidx@item@body
+ \par
+ \DTLgidxChildrenSeeAlso
+ \par
+ }%
+ \renewcommand*{\datagidxchildstart}%
+ {%
+ \bgroup
+ \setlength{\dimen@}{\datagidxindent}%
+ \multiply\dimen@ by \datagidx@level\relax
+ \setlength{\dtl@tmplength}{\linewidth}%
+ \addtolength{\dtl@tmplength}{-\dimen@}%
+ \setlength{\parindent}{0pt}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \edef\item{\noexpand\parshape=1 \the\dimen@ \the\dtl@tmplength}%
+ \setlength{\datagidxnamewidth}{0pt}%
+ \DTLforeach*{\DTLgidxCurrentdb}%
+ {\Name=Name,\Location=Location,\See=See,\SeeAlso=SeeAlso,%
+ \Parent=Parent}%
+ {%
+ \DTLifnull{\Parent}%
+ {%
+ \datagidx@doifdisplayed
+ {%
+ \settowidth{\dimen@}%
+ {%
+ \DTLgidxChildStyle
+ {%
+ \DTLgidxNameFont{\DTLgidxNameCase{\Name}}%
+ }%
+ }%
+ \ifdim\dimen@>\datagidxnamewidth\relax
+ \datagidxnamewidth=\dimen@\relax
+ \fi
+ }%
+ }%
+ {}%
+ }%
+ \settowidth{\dimen@}{\DTLgidxChildStyle\DTLgidxPostChildName}%
+ \addtolength{\datagidxnamewidth}{\dimen@}%
+ \setlength{\datagidxdescwidth}{\dtl@tmplength}%
+ \addtolength{\datagidxdescwidth}{-\datagidxnamewidth}%
+ }%
+ \renewcommand{\datagidxchildend}{\egroup}%
+ \renewcommand*{\datagidxchilditem}{%
+ \item
+ \refstepcounter{DTLgidxChildCount}%
+ \makebox[\datagidxnamewidth][l]%
+ {%
+ \datagidxtarget{\Label}%
+ {%
+ \DTLgidxChildStyle
+ {%
+ \DTLgidxNameFont{\DTLgidxNameCase{\Name}}%
+ \DTLgidxPostChildName
+ }%
+ }%
+ }%
+ \begin{minipage}[t]{\datagidxdescwidth}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \DTLgidxSymbolDescription
+ \DTLgidxDoSeeOrLocation
+ \DTLgidxChildrenSeeAlso
+ \end{minipage}%
+ \par
+ }%
+}
+\newlength\datagidxindent
+\setlength\datagidxindent{10\p@}
+\newlength\datagidxnamewidth
+\newlength\datagidxdescwidth
+\newcommand*{\datagidx@style@align}{%
+ \renewcommand*{\datagidxstart}%
+ {%
+ \bgroup
+ \setlength{\parindent}{0pt}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \setlength{\datagidxnamewidth}{0pt}%
+ \DTLforeach*{\DTLgidxCurrentdb}%
+ {\Name=Name,\Location=Location,\See=See,\SeeAlso=SeeAlso,%
+ \Parent=Parent}%
+ {%
+ \DTLifnull{\Parent}%
+ {%
+ \datagidx@doifdisplayed
+ {%
+ \settowidth{\dimen@}{\DTLgidxNameFont{\DTLgidxNameCase{\Name}}}%
+ \ifdim\dimen@>\datagidxnamewidth\relax
+ \datagidxnamewidth=\dimen@\relax
+ \fi
+ }%
+ }%
+ {}%
+ }%
+ \settowidth{\dimen@}{\DTLgidxPostName}%
+ \addtolength{\datagidxnamewidth}{\dimen@}%
+ \setlength{\datagidxdescwidth}{\linewidth}%
+ \addtolength{\datagidxdescwidth}{-\datagidxnamewidth}%
+ \ifdim\datagidxsymbolwidth>0pt\relax
+ \addtolength{\datagidxdescwidth}{-\datagidxsymbolwidth}%
+ \settowidth{\dimen@}{\DTLgidxSymDescSep}%
+ \addtolength{\datagidxdescwidth}{-\dimen@}%
+ \fi
+ \ifdim\datagidxlocationwidth>0pt\relax
+ \addtolength{\datagidxdescwidth}{-\datagidxlocationwidth}%
+ \settowidth{\dimen@}{\DTLgidxPreLocation}%
+ \addtolength{\datagidxdescwidth}{-\dimen@}%
+ \fi
+ \ifdim\datagidxsymbolwidth>0pt\relax
+ \ifdim\datagidxlocationwidth>0pt\relax
+ \if@datagidxsymbolleft
+ \def\datagidx@item@body{%
+ \begin{minipage}[t]{\datagidxsymbolwidth}%
+ \datagidxsymalign
+ \let\DTLgidxSymDescSep\@empty
+ \DTLgidxSymbolDescLeft
+ \end{minipage}%
+ \DTLgidxSymDescSep
+ \begin{minipage}[t]{\datagidxdescwidth}%
+ \let\DTLgidxSymDescSep\@empty
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \DTLgidxSymbolDescRight
+ \end{minipage}%
+ \DTLgidxPreLocation
+ \begin{minipage}[t]{\datagidxlocationwidth}%
+ \datagidxlocalign
+ \let\DTLgidxPreLocation\@empty
+ \DTLgidxDoSeeOrLocation
+ \DTLgidxChildrenSeeAlso
+ \end{minipage}%
+ }%
+ \else
+ \def\datagidx@item@body{%
+ \begin{minipage}[t]{\datagidxdescwidth}%
+ \let\DTLgidxSymDescSep\@empty
+ \DTLgidxSymbolDescLeft
+ \end{minipage}%
+ \DTLgidxSymDescSep
+ \begin{minipage}[t]{\datagidxsymbolwidth}%
+ \datagidxsymalign
+ \let\DTLgidxSymDescSep\@empty
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \DTLgidxSymbolDescRight
+ \end{minipage}%
+ \DTLgidxPreLocation
+ \begin{minipage}[t]{\datagidxlocationwidth}%
+ \datagidxlocalign
+ \let\DTLgidxPreLocation\@empty
+ \DTLgidxDoSeeOrLocation
+ \DTLgidxChildrenSeeAlso
+ \end{minipage}%
+ }%
+ \fi
+ \else
+ \if@datagidxsymbolleft
+ \def\datagidx@item@body{%
+ \begin{minipage}[t]{\datagidxsymbolwidth}%
+ \datagidxsymalign
+ \let\DTLgidxSymDescSep\@empty
+ \DTLgidxSymbolDescLeft
+ \end{minipage}%
+ \DTLgidxSymDescSep
+ \begin{minipage}[t]{\datagidxdescwidth}%
+ \let\DTLgidxSymDescSep\@empty
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \DTLgidxSymbolDescRight
+ \DTLgidxDoSeeOrLocation
+ \DTLgidxChildrenSeeAlso
+ \end{minipage}%
+ }%
+ \else
+ \def\datagidx@item@body{%
+ \begin{minipage}[t]{\datagidxdescwidth}%
+ \let\DTLgidxSymDescSep\@empty
+ \DTLgidxSymbolDescLeft
+ \end{minipage}%
+ \DTLgidxSymDescSep
+ \begin{minipage}[t]{\datagidxsymbolwidth}%
+ \datagidxsymalign
+ \let\DTLgidxSymDescSep\@empty
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \DTLgidxSymbolDescRight
+ \DTLgidxDoSeeOrLocation
+ \DTLgidxChildrenSeeAlso
+ \end{minipage}%
+ }%
+ \fi
+ \fi
+ \else
+ \ifdim\datagidxlocationwidth>0pt\relax
+ \def\datagidx@item@body{%
+ \begin{minipage}[t]{\datagidxdescwidth}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \DTLgidxSymbolDescription
+ \end{minipage}%
+ \DTLgidxPreLocation
+ \begin{minipage}[t]{\datagidxlocationwidth}%
+ \datagidxlocalign
+ \let\DTLgidxPreLocation\@empty
+ \DTLgidxDoSeeOrLocation
+ \DTLgidxChildrenSeeAlso
+ \end{minipage}%
+ }%
+ \else
+ \def\datagidx@item@body{%
+ \begin{minipage}[t]{\datagidxdescwidth}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \DTLgidxSymbolDescription
+ \DTLgidxDoSeeOrLocation
+ \DTLgidxChildrenSeeAlso
+ \end{minipage}%
+ }%
+ \fi
+ \fi
+ }%
+ \renewcommand*{\datagidxend}{\egroup}%
+ \renewcommand*{\datagidxgroupsep}{\ifdatagidxshowgroups\indexspace\fi}%
+ \renewcommand{\datagidxgroupheader}{%
+ \ifdatagidxshowgroups
+ \item
+ \makebox[\linewidth]%
+ {%
+ \textbf{\DTLgidxGroupHeaderTitle{\datagidxcurrentgroup}}%
+ }%
+ \DTLpar\nobreak\@afterheading
+ \fi
+ }%
+ \renewcommand*{\datagidxitem}{%
+ \ifdefempty\datagidxprevgroup
+ {%
+ \datagidxgroupheader
+ }%
+ {%
+ \ifdefequal\datagidxcurrentgroup\datagidxprevgroup
+ {%
+ }%
+ {%
+ \datagidxgroupsep
+ \datagidxgroupheader
+ }%
+ }%
+ \hangindent0pt\relax
+ \parindent0pt\relax
+ \makebox[\datagidxnamewidth][l]%
+ {%
+ \datagidxtarget{\Label}%
+ {%
+ \DTLgidxNameFont{\DTLgidxNameCase{\Name}}%
+ \DTLgidxPostName
+ }%
+ }%
+ \datagidx@item@body
+ \par
+ }%
+ \renewcommand*{\datagidxchildstart}%
+ {%
+ \bgroup
+ \setlength{\parindent}{0pt}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \setlength{\datagidxnamewidth}{0pt}%
+ \DTLforeach*{\DTLgidxCurrentdb}%
+ {\Name=Name,\Location=Location,\See=See,\SeeAlso=SeeAlso,%
+ \Parent=Parent}%
+ {%
+ \DTLifnull{\Parent}%
+ {%
+ \datagidx@doifdisplayed
+ {%
+ \settowidth{\dimen@}%
+ {%
+ \DTLgidxChildStyle
+ {%
+ \DTLgidxNameFont{\DTLgidxNameCase{\Name}}%
+ }%
+ }%
+ \ifdim\dimen@>\datagidxnamewidth\relax
+ \datagidxnamewidth=\dimen@\relax
+ \fi
+ }%
+ }%
+ {}%
+ }%
+ \settowidth{\dimen@}{\DTLgidxChildStyle\DTLgidxPostChildName}%
+ \addtolength{\datagidxnamewidth}{\dimen@}%
+ \setlength{\datagidxdescwidth}{\linewidth}%
+ \addtolength{\datagidxdescwidth}{-\datagidxnamewidth}%
+ }%
+ \renewcommand{\datagidxchildend}{\egroup}%
+ \renewcommand*{\datagidxchilditem}{%
+ \hangindent0pt\relax
+ \parindent0pt\relax
+ \refstepcounter{DTLgidxChildCount}%
+ \makebox[\datagidxnamewidth][l]%
+ {%
+ \datagidxtarget{\Label}%
+ {%
+ \DTLgidxChildStyle
+ {%
+ \DTLgidxNameFont{\DTLgidxNameCase{\Name}}%
+ \DTLgidxPostChildName
+ }%
+ }%
+ }%
+ \begin{minipage}[t]{\datagidxdescwidth}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \DTLgidxSymbolDescription
+ \DTLgidxDoSeeOrLocation
+ \DTLgidxChildrenSeeAlso
+ \end{minipage}%
+ \par
+ }%
+}
+\newcommand*{\datagidx@style@gloss}{%
+ \renewcommand*{\datagidxstart}%
+ {%
+ \bgroup
+ \setlength{\parindent}{0pt}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \setlength{\datagidxnamewidth}{0pt}%
+ \DTLforeach*{\DTLgidxCurrentdb}%
+ {\Name=Name,\Location=Location,\See=See,\SeeAlso=SeeAlso,%
+ \Parent=Parent}%
+ {%
+ \DTLifnull{\Parent}%
+ {%
+ \datagidx@doifdisplayed
+ {%
+ \settowidth{\dimen@}{\DTLgidxNameFont{\DTLgidxNameCase{\Name}}}%
+ \ifdim\dimen@>\datagidxnamewidth\relax
+ \datagidxnamewidth=\dimen@\relax
+ \fi
+ }%
+ }%
+ {}%
+ }%
+ \settowidth{\dimen@}{\DTLgidxPostName}%
+ \addtolength{\datagidxnamewidth}{\dimen@}%
+ \setlength{\datagidxdescwidth}{\linewidth}%
+ \addtolength{\datagidxdescwidth}{-\datagidxnamewidth}%
+ }%
+ \renewcommand*{\datagidxend}{\egroup}%
+ \renewcommand*{\datagidxgroupsep}{\ifdatagidxshowgroups\indexspace\fi}%
+ \renewcommand{\datagidxgroupheader}{%
+ \ifdatagidxshowgroups
+ \item
+ \makebox[\linewidth]%
+ {%
+ \textbf{\DTLgidxGroupHeaderTitle{\datagidxcurrentgroup}}%
+ }%
+ \DTLpar\nobreak\@afterheading
+ \fi
+ }%
+ \renewcommand*{\datagidxitem}{%
+ \ifdefempty\datagidxprevgroup
+ {%
+ \datagidxgroupheader
+ }%
+ {%
+ \ifdefequal\datagidxcurrentgroup\datagidxprevgroup
+ {%
+ }%
+ {%
+ \datagidxgroupsep
+ \datagidxgroupheader
+ }%
+ }%
+ \hangindent0pt\relax
+ \parindent0pt\relax
+ \makebox[\datagidxnamewidth][l]%
+ {%
+ \datagidxtarget{\Label}%
+ {%
+ \DTLgidxNameFont{\DTLgidxNameCase{\Name}}%
+ \DTLgidxPostName
+ }%
+ }%
+ \begin{minipage}[t]{\datagidxdescwidth}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \@tempswatrue
+ \ifdefempty{\Description}%
+ {%
+ \ifdefempty{\Symbol}%
+ {%
+ \ifdefempty{\Location}{\@tempswafalse}{}%
+ }%
+ {}%
+ }%
+ {}%
+ \if@tempswa
+ \DTLgidxSymbolDescription
+ \DTLgidxDoSeeOrLocation
+ \DTLgidxSeeAlso
+ \else
+ \mbox{}%
+ \fi
+ \DTLgidxChildrenSeeAlso
+ \end{minipage}%
+ \par
+ }%
+ \renewcommand*{\datagidxchildstart}%
+ {%
+ \bgroup
+ \def\datagidx@childsep{}%
+ \setcounter{DTLgidxChildCount}{0}%
+ }%
+ \renewcommand{\datagidxchildend}{\DTLgidxPostChild\egroup}%
+ \renewcommand*{\datagidxchilditem}{%
+ \datagidx@childsep
+ \refstepcounter{DTLgidxChildCount}%
+ \datagidxtarget{\Label}%
+ {%
+ \DTLgidxChildStyle
+ {%
+ \DTLgidxNameFont{\DTLgidxNameCase{\Name}}%
+ \DTLgidxPostChildName
+ }%
+ }%
+ \DTLgidxSymbolDescription
+ \DTLgidxDoSeeOrLocation
+ \DTLgidxChildrenSeeAlso
+ \let\datagidx@childsep\DTLgidxChildSep
+ }%
+}
+\newcommand*{\DTLgidxChildSep}{ }
+\newcommand*{\DTLgidxPostChild}{}
+\ifdef\chapter
+{%
+ \newcommand\DTLgidxDictHead{%
+ \chapter{\DTLgidxGroupHeaderTitle{\datagidxcurrentgroup}}%
+ }%
+}%
+{%
+ \newcommand\DTLgidxDictHead{%
+ \section{\DTLgidxGroupHeaderTitle{\datagidxcurrentgroup}}%
+ }%
+}
+\newcommand*{\DTLgidxCategoryNameFont}[1]{#1}
+\newcommand*{\DTLgidxCategorySep}{\space}
+\newcommand*{\DTLgidxSubCategorySep}{\space}
+\newcommand*{\datagidxdictindent}{1em}
+\newcommand{\DTLgidxDictPostItem}{\par}
+\newcommand*{\datagidx@style@dict}{%
+ \renewcommand*{\datagidxstart}%
+ {%
+ \bgroup
+ \setlength{\parindent}{0pt}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \dimen@=\linewidth
+ \advance\dimen@ by -\datagidxdictindent\relax
+ \dtl@tmplength=\datagidxdictindent\relax
+ \xdef\datagidxdictparshape{%
+ \noexpand\parshape=2 0pt \the\linewidth\space
+ \the\dtl@tmplength\space \the\dimen@\relax
+ }%
+ \datagidx@level=1\relax
+ \raggedright
+ }%
+ \renewcommand*{\datagidxend}{\egroup}%
+ \renewcommand*{\datagidxgroupsep}{}%
+ \renewcommand{\datagidxgroupheader}{%
+ \ifdatagidxshowgroups
+ \datagidxend
+ \datagidx@postend
+ \DTLgidxDictHead
+ \datagidx@prestart
+ \datagidxstart
+ \fi
+ }%
+ \renewcommand*{\datagidxitem}{%
+ \ifdefempty\datagidxprevgroup
+ {%
+ \datagidxgroupheader
+ }%
+ {%
+ \ifdefequal\datagidxcurrentgroup\datagidxprevgroup
+ {%
+ }%
+ {%
+ \datagidxgroupsep
+ \datagidxgroupheader
+ }%
+ }%
+ \datagidxdictparshape
+ \datagidxtarget{\Label}%
+ {%
+ \DTLgidxNameFont{\DTLgidxNameCase{\Name}}%
+ }%
+ \DTLgidxPostName
+ \let\datagidx@catsep\@empty
+ \let\datagidx@subcatsep\@empty
+ \DTLgidxSymbolDescription
+ \DTLgidxChildrenSeeAlso
+ \DTLgidxDictPostItem
+ }%
+ \renewcommand*{\datagidxchildstart}%
+ {%
+ \bgroup
+ }%
+ \renewcommand*{\datagidxchildend}{\egroup}%
+ \renewcommand*{\datagidxchilditem}{%
+ \ifnum\datagidx@level=2\relax
+ \datagidx@catsep
+ \let\datagidx@catsep\DTLgidxCategorySep
+ \let\datagidx@subcapsep\@empty
+ \datagidxtarget{\Label}%
+ {%
+ \DTLgidxChildStyle
+ {%
+ \DTLgidxCategoryNameFont{\DTLgidxNameCase{\Name}}%
+ \DTLgidxPostChildName
+ }%
+ }%
+ \setcounter{DTLgidxChildCount}{0}%
+ \else
+ \datagidx@subcatsep
+ \let\datagidx@subcatsep\DTLgidxSubCategorySep
+ \refstepcounter{DTLgidxChildCount}%
+ \DTLgidxChildCountLabel
+ \DTLgidxPostChildName
+ \fi
+ \DTLgidxSymbolDescription
+ \DTLgidxDoSeeOrLocation
+ \DTLgidxChildrenSeeAlso
+ }%
+ \renewcommand*{\datagidxseealsostart}%
+ {%
+ \bgroup
+ \setlength{\parindent}{0pt}%
+ \setlength{\parskip}{0pt plus 0.3pt}%
+ \setlength{\dimen@}{\datagidxindent}%
+ \advance\datagidx@level by 1\relax
+ \multiply\dimen@ by \datagidx@level\relax
+ \@idxitem\hspace*{\dimen@}%
+ }%
+ \renewcommand{\datagidxseealsoend}{\egroup}%
+}
+\newcommand*{\dtldofirstlocation}{%
+ \@for\dtl@thisloc:=\Location\do{%
+ \ifdefempty\dtl@thisloc
+ {}%
+ {%
+ \expandafter\datagidx@getlocation\dtl@thisloc
+ \datagidxlink{\datagidx@current@target}%
+ {%
+ \datagidx@formatlocation
+ \datagidx@current@format\datagidx@current@locationstring
+ }%
+ \@endfortrue
+ }%
+ }%
+}
+\newcommand*{\datagidx@formatlocation}[2]{%
+ \ifdefempty{#1}%
+ {#2}%
+ {%
+ \ifcsdef{#1}%
+ {%
+ \csuse{#1}{#2}%
+ }%
+ {%
+ \PackageWarning{datagidx}{Unknown format `#1'}%
+ #2%
+ }%
+ }%
+}
+\newcommand*{\dtldolocationlist}{%
+ \DTLifnull{\Location}%
+ {}%
+ {%
+ \def\datagidx@prev@location{-1}%
+ \def\datagidx@prev@locationstring{}%
+ \def\datagidx@prev@format{}%
+ \def\datagidx@prev@locationformat{}%
+ \def\datagidx@prev@prefix{}%
+ \def\datagidx@prev@target{}%
+ \def\datagidx@location@sep{}%
+ \def\datagidx@location@start{-1}%
+ \expandafter\forcsvlist\expandafter\datagidx@parse@location
+ \expandafter{\Location}%
+ \do@prevlocation % tidy up loose ends
+ }%
+}
+\newif\if@dtl@sequential
+\newcommand*\datagidx@getlocdo[1]{%
+ \ifdefempty\datagidx@current@location
+ {}%
+ {%
+ \eappto\datagidx@current@prefix{%
+ \datagidx@current@location\datagidx@compositor
+ }%
+ }%
+ \def\datagidx@current@location{#1}%
+}
+\def\datagidx@getlocation[#1]#2#3{%
+ \def\datagidx@current@locationstring{#2}%
+ \bgroup
+ \datagidx@escapelocationformat
+ \xdef\datagidx@current@locationformat{#2}%
+ \datagidx@clearlocationformat
+ \xdef\datagidx@current@location{#2}%
+ \egroup
+ \let\datagidx@list\datagidx@current@location
+ \def\datagidx@current@prefix{}%
+ \def\datagidx@current@location{}%
+ \let\do\datagidx@getlocdo
+ \expandafter\datagidx@docomplist
+ \expandafter{\datagidx@list}%
+ \def\datagidx@current@format{#1}%
+ \def\datagidx@current@target{#3}%
+}
+\newcommand*{\datagidx@parse@location}[1]{%
+ \datagidx@getlocation#1\relax
+ \ifdefequal{\datagidx@prev@locationstring}{\datagidx@current@locationstring}%
+ {%
+ \ifstrequal{\datagidx@prev@format}{\datagidx@current@format}
+ {%
+ }%
+ {%
+ \ifdefempty{\datagidx@current@format}
+ {%
+ }%
+ {%
+ \ifdefempty{\datagidx@prev@format}
+ {%
+ \let\datagidx@prev@format\datagidx@current@format
+ }%
+ {%
+ \PackageWarning{datagidx}%
+ {%
+ Conflicting location formats `\datagidx@prev@format' and
+ `\datagidx@current@format' for location `\datagidx@current@location'%
+ }%
+ }%
+ }%
+ }%
+ }%
+ {%
+ \@datagidx@parse@location
+ }%
+}
+\newcommand*{\@datagidx@parse@location}{%
+ \@dtl@sequentialtrue
+ \ifdefequal{\datagidx@prev@format}{\datagidx@current@format}
+ {%
+ \ifdefequal{\datagidx@prev@locationformat}{\datagidx@current@locationformat}
+ {%
+ \ifdefequal{\datagidx@prev@prefix}{\datagidx@current@prefix}
+ {%
+ }%
+ {%
+ \@dtl@sequentialfalse
+ }%
+ }%
+ {%
+ \@dtl@sequentialfalse
+ }%
+ }%
+ {%
+ \@dtl@sequentialfalse
+ }%
+ \if@dtl@sequential
+ \ifnumequal{\datagidx@prev@location+1}{\datagidx@current@location}%
+ {%
+ \ifdefequal
+ \datagidx@current@locationformat
+ \datagidx@prev@locationformat
+ {%
+ \@dtl@sequentialtrue
+ }%
+ {%
+ \@dtl@sequentialfalse
+ }%
+ }%
+ {%
+ \@dtl@sequentialfalse
+ }%
+ \fi
+ \if@dtl@sequential
+ \ifnumequal{\datagidx@location@start}{-1}%
+ {%
+ \let\datagidx@location@start\datagidx@prev@location
+ \let\datagidx@location@startval\datagidx@prev@locationstring
+ \let\datagidx@location@format\datagidx@prev@format
+ \let\datagidx@location@target\datagidx@prev@target
+ }%
+ {%
+ }%
+ \else
+ \do@prevlocation
+ \fi
+ \let\datagidx@prev@location\datagidx@current@location
+ \let\datagidx@prev@format\datagidx@current@format
+ \let\datagidx@prev@prefix\datagidx@current@prefix
+ \let\datagidx@prev@locationformat\datagidx@current@locationformat
+ \let\datagidx@prev@locationstring\datagidx@current@locationstring
+ \let\datagidx@prev@target\datagidx@current@target
+}
+\newcommand*{\DTLgidxLocationSep}{, }
+\newcommand*{\DTLgidxLocationF}[2]{%
+ #1\DTLgidxLocationSep#2%
+}
+\newcommand*{\DTLgidxLocationFF}[2]{%
+ #1--#2%
+}
+\newcommand*{\do@prevlocation}{%
+ \ifnumequal{\datagidx@location@start}{-1}%
+ {%
+ \ifdefempty{\datagidx@prev@locationstring}%
+ {}%
+ {%
+ \datagidx@location@sep
+ \datagidxlink{\datagidx@prev@target}%
+ {%
+ \datagidx@formatlocation
+ \datagidx@prev@format\datagidx@prev@locationstring
+ }%
+ \def\datagidx@location@sep{\DTLgidxLocationSep}%
+ }%
+ }%
+ {%
+ \datagidx@location@sep
+ \do@locrange
+ \def\datagidx@location@sep{\DTLgidxLocationSep}%
+ \def\datagidx@location@start{-1}%
+ }%
+}
+\newcommand*{\do@locrange}{%
+ \ifnumgreater{\datagidx@prev@location}{\datagidx@location@start+1}%
+ {%
+ \DTLgidxLocationFF
+ {%
+ \datagidxlink{\datagidx@location@target}%
+ {%
+ \datagidx@formatlocation
+ \datagidx@location@format\datagidx@location@startval
+ }%
+ }%
+ {%
+ \datagidxlink{\datagidx@prev@target}%
+ {%
+ \datagidx@formatlocation
+ \datagidx@prev@format\datagidx@prev@locationstring
+ }%
+ }%
+ }%
+ {%
+ \DTLgidxLocationF
+ {
+ \datagidxlink{\datagidx@location@target}%
+ {%
+ \datagidx@formatlocation
+ \datagidx@location@format\datagidx@location@startval
+ }%
+ }%
+ {%
+ \datagidxlink{\datagidx@prev@target}%
+ {%
+ \datagidx@formatlocation
+ \datagidx@prev@format\datagidx@prev@locationstring
+ }%
+ }%
+ }%
+}
+\newcommand*{\datagidx@defaultdatabase}{}
+\newcommand*{\DTLgidxSetDefaultDB}[1]{%
+ \renewcommand*{\datagidx@defaultdatabase}{#1}%
+}
+\define@key{newgloss}{heading}{\renewcommand*{\datagidx@heading}{#1}}
+\define@key{newgloss}{postheading}{%
+ \renewcommand*{\datagidx@postheading}{#1}%
+}
+\define@choicekey{newgloss}{balance}[\val\nr]{true,false}[true]{%
+ \ifcase\nr\relax
+ \renewcommand*{\datagidx@multicols}{multicols}%
+ \or
+ \renewcommand*{\datagidx@multicols}{multicols*}%
+ \fi
+}
+\define@key{newgloss}{sort}{\renewcommand*{\datagidx@sort}{#1}}
+\newcommand*{\datagidx@style}{index}
+\define@key{newgloss}{style}{\renewcommand*{\datagidx@style}{#1}}
+\newif\ifdatagidxshowgroups
+\newcommand*{\datagidx@showgroups}{false}
+\define@choicekey{newgloss}{showgroups}{true,false}[true]%
+{%
+ \renewcommand{\datagidx@showgroups}{#1}%
+}%
+\ifundef\newgidx
+{%
+ \newcommand*{\newgidx}{\datagidx@newgidx}
+}%
+{}
+\@onlypreamble\newgidx
+\newcommand*{\datagidx@highopt@newgidx}[3][]{%
+ \edef\datagidx@indexfilename{\datagidxhighoptfilename{#2}}%
+ \IfFileExists{\datagidx@indexfilename}%
+ {%
+ \input{\datagidx@indexfilename}%
+ \bgroup
+ \setkeys{newgloss}{#1}%
+ \datagidx@newgidx@update{#2}{#3}%
+ \egroup
+ }%
+ {%
+ \datagidx@newgidx[#1]{#2}{#3}%
+ }%
+}
+\newcommand*{\datagidx@newgidx}[3][]{%
+\bgroup
+ \setkeys{newgloss}{#1}%
+ \ifdefempty{\datagidx@defaultdatabase}%
+ {\xdef\datagidx@defaultdatabase{#2}}%
+ {}%
+ \DTLgnewdb{#2}%
+ \DTLaddcolumn{#2}{Label}%
+ \DTLaddcolumn{#2}{Location}%
+ \DTLaddcolumn{#2}{CurrentLocation}%
+ \DTLaddcolumn{#2}{FirstId}%
+ \DTLaddcolumn{#2}{Name}%
+ \DTLaddcolumn{#2}{Text}%
+ \DTLaddcolumn{#2}{Parent}%
+ \DTLaddcolumn{#2}{Child}%
+ \DTLaddcolumn{#2}{Description}%
+ \DTLaddcolumn{#2}{Used}%
+ \DTLaddcolumn{#2}{Symbol}%
+ \DTLaddcolumn{#2}{Long}%
+ \DTLaddcolumn{#2}{Short}%
+ \DTLaddcolumn{#2}{See}%
+ \DTLaddcolumn{#2}{SeeAlso}%
+ \datagidx@newgidx@update{#2}{#3}%
+\egroup
+}
+\newcommand*{\datagidx@newgidx@update}[2]{%
+ \DTLnewrow{datagidx}%
+ \DTLnewdbentry{datagidx}{Glossary}{#1}%
+ \DTLnewdbentry{datagidx}{Title}{#2}%
+ {%
+ \dtlexpandnewvalue
+ \DTLnewdbentry{datagidx}{Heading}{\expandonce\datagidx@heading}%
+ \DTLnewdbentry{datagidx}{PostHeading}{\expandonce\datagidx@postheading}%
+ \DTLnewdbentry{datagidx}{MultiCols}{\expandonce\datagidx@multicols}%
+ \DTLnewdbentry{datagidx}{Sort}{\expandonce\datagidx@sort}%
+ \DTLnewdbentry{datagidx}{Style}{\expandonce\datagidx@style}%
+ \DTLnewdbentry{datagidx}{ShowGroups}{\expandonce\datagidx@showgroups}%
+ }%
+}
+\newcommand*{\newterm@label}{}
+\define@key{newterm}{label}{\renewcommand*{\newterm@label}{#1}}
+\newcommand*{\newterm@parent}{}
+\define@key{newterm}{parent}{\renewcommand*{\newterm@parent}{#1}}
+\newcommand*{\newterm@text}{}
+\define@key{newterm}{text}{\renewcommand*{\newterm@text}{#1}}
+\newcommand*{\newterm@description}{}
+\define@key{newterm}{description}{%
+ \renewcommand*{\newterm@description}{#1}%
+}
+\define@key{newterm}{plural}{\def\newterm@plural{#1}}
+\newcommand*{\newterm@sort}{}
+\define@key{newterm}{sort}{\renewcommand*{\newterm@sort}{#1}}
+\newcommand*{\newterm@symbol}{}
+\define@key{newterm}{symbol}{\renewcommand*{\newterm@symbol}{#1}}
+\newcommand*{\newterm@database}{}
+\define@key{newterm}{database}{\renewcommand*{\newterm@database}{#1}}
+\newcommand*{\newterm@long}{}
+\define@key{newterm}{long}{%
+ \renewcommand*{\newterm@long}{#1}%
+ \def\newterm@longplural{#1s}%
+}
+\newcommand*{\newterm@short}{}
+\define@key{newterm}{short}{%
+ \renewcommand*{\newterm@short}{#1}%
+ \def\newterm@shortplural{#1s}%
+}
+\define@key{newterm}{longplural}{%
+ \def\newterm@longplural{#1}%
+}
+\define@key{newterm}{shortplural}{%
+ \def\newterm@shortplural{#1}%
+}
+\newcommand*{\newterm@see}{}
+\define@key{newterm}{see}{%
+ \renewcommand*{\newterm@see}{#1}%
+}
+\newcommand*{\newterm@seealso}{}
+\define@key{newterm}{seealso}{%
+ \renewcommand*{\newterm@seealso}{#1}%
+}
+\newcommand*{\newterm@defaultshook}{}
+\newcommand*{\newterm@extrafields}{}
+\newcommand*{\DTLgidxAssignList}{%
+ \Name=Name,\Description=Description,\Used=Used,\Symbol=Symbol,%
+ \Long=Long,\Short=Short,\LongPlural=LongPlural,\ShortPlural=ShortPlural,%
+ \Location=Location,\See=See,\SeeAlso=SeeAlso,%
+ \Text=Text,\Plural=Plural,\CurrentLocation=CurrentLocation,%
+ \Label=Label,\Parent=Parent,\Children=Child,\FirstId=FirstId,\Sort=Sort%
+}
+\newcommand*{\datagidxtermkeys}{%
+ name,description,symbol,long,short,see,seealso,text,plural,%
+ label,parent,sort%
+}
+\newcommand*\@datagidx@fieldkey@Name{name}%
+\newcommand*\@datagidx@fieldkey@Description{description}%
+\newcommand*\@datagidx@fieldkey@Symbol{symbol}%
+\newcommand*\@datagidx@fieldkey@Long{long}%
+\newcommand*\@datagidx@fieldkey@Short{short}%
+\newcommand*\@datagidx@fieldkey@See{see}%
+\newcommand*\@datagidx@fieldkey@SeeAlso{seealso}%
+\newcommand*\@datagidx@fieldkey@Text{text}%
+\newcommand*\@datagidx@fieldkey@Plural{plural}%
+\newcommand*\@datagidx@fieldkey@Label{label}%
+\newcommand*\@datagidx@fieldkey@Parent{parent}%
+\newcommand*\@datagidx@fieldkey@Sort{sort}%
+\newcommand*{\newtermaddfield}[4][]{%
+ \ifstrempty{#1}%
+ {%
+ \dtlforcolumn{\datagidx@thisidx}{datagidx}{Glossary}%
+ {%
+ \DTLaddcolumn{\datagidx@thisidx}{#2}%
+ }%
+ }%
+ {%
+ \@for\datagidx@thisidx:=#1\do
+ {%
+ \DTLaddcolumn{\datagidx@thisidx}{#2}%
+ }%
+ }%
+ \expandafter\gdef\csname newterm@#3\endcsname{}%
+ \define@key{newterm}{#3}%
+ {%
+ \expandafter\def\csname newterm@#3\endcsname{##1}%
+ }%
+ \gappto\newterm@defaultshook
+ {%
+ \expandafter\protected@edef\csname newterm@#3\endcsname{#4}%
+ }%
+ \gappto\newterm@extrafields
+ {%
+ \protected@edef\datagidx@value{\csname newterm@#3\endcsname}%
+ \DTLnewdbentry{\newterm@database}{#2}{\expandonce\datagidx@value}%
+ }%
+ \xappto\DTLgidxAssignList
+ {%
+ ,\expandafter\noexpand\csname#2\endcsname=#2%
+ }%
+ \xappto\datagidxtermkeys{,#3}%
+ \expandafter\xdef\csname @datagidx@fieldkey@#2\endcsname{#3}%
+ \xappto\datagidxgetchildfields
+ {%
+ \noexpand\dtlgetentryfromcurrentrow
+ {\expandafter\noexpand\csname#2\endcsname}%
+ {\noexpand\dtlcolumnindex{\noexpand\DTLgidxCurrentdb}{#2}}%
+ }%
+}
+\newcommand*{\newtermlabelhook}{}
+\newcommand*{\DTLgidxNoFormat}[1]{#1}
+\newcommand*{\DTLgidxGobble}[1]{}
+\newcommand*{\DTLgidxStripBackslash}[1]{%
+ \expandafter\@gobble\string#1%
+}
+\newcommand*{\DTLgidxName}[2]{%
+ #1\space #2%
+}
+\newcommand*{\DTLgidxNameNum}[1]{\@Roman{#1}}
+\newcommand*{\datagidx@namenum}[1]{\two@digits{#1}}
+\newcommand*{\DTLgidxPlace}[2]{%
+ #2%
+}
+\newcommand*{\DTLgidxSubject}[2]{%
+ #2%
+}
+\newcommand*{\DTLgidxOffice}[2]{%
+ #2 (#1)%
+}
+\newcommand*{\DTLgidxIgnore}[1]{#1}
+\newcommand*{\DTLgidxMac}[1]{#1}
+\newcommand*{\datagidx@mac}[1]{Mac}
+\newcommand*{\DTLgidxSaint}[1]{#1}
+\newcommand*{\datagidx@saint}[1]{Saint}
+\newcommand*{\DTLgidxRank}[2]{#1~#2}
+\newcommand*{\datagidx@rank}[2]{#2.}
+\newcommand*{\DTLgidxParticle}[2]{#1~#2}
+\newcommand*{\datagidx@particle}[2]{#2.}
+\newcommand*{\datagidx@bothoftwo}[2]{#1#2}
+\newcommand*{\datagidx@person}[2]{#2\noexpand\datatoolpersoncomma #1}
+\newcommand*{\datagidx@place}[2]{#2\noexpand\datatoolplacecomma #1}
+\newcommand*{\datagidx@subject}[2]{#2\noexpand\datatoolsubjectcomma #1}
+\newcommand*{\datagidx@paren}[1]{\noexpand\datatoolparenstart #1}
+\newcommand*{\datagidx@invert}[2]{#2, #1}
+\newcommand*{\DTLgidxParen}[1]{\space(#1)}
+\newcommand*{\datagidxwordifygreek}{%
+ \def\alpha{alpha}%
+ \def\beta{beta}%
+ \def\gamma{gamma}%
+ \def\delta{delta}%
+ \def\epsilon{epsilon}%
+ \def\varepsilon{epsilon}%
+ \def\zeta{zeta}%
+ \def\eta{eta}%
+ \def\theta{theta}%
+ \def\vartheta{theta}%
+ \def\iota{iota}%
+ \def\kappa{kappa}%
+ \def\lambda{lambda}%
+ \def\mu{mu}%
+ \def\nu{nu}%
+ \def\xi{xi}%
+ \def\pi{pi}%
+ \def\varpi{pi}%
+ \def\rho{rho}%
+ \def\varrho{rho}%
+ \def\sigma{sigma}%
+ \def\varsigma{sigma}%
+ \def\tau{tau}%
+ \def\upsilon{upsilon}%
+ \def\phi{phi}%
+ \def\varphi{phi}%
+ \def\chi{chi}%
+ \def\psi{psi}%
+ \def\omega{omega}%
+ \def\Gamma{Gamma}%
+ \def\Delta{Delta}%
+ \def\Theta{Theta}%
+ \def\Lambda{Lambda}%
+ \def\Xi{Xi}%
+ \def\Pi{Pi}%
+ \def\Sigma{Sigma}%
+ \def\Upsilon{Upsilon}%
+ \def\Phi{Phi}%
+ \def\Psi{Psi}%
+ \def\Omega{Omega}%
+}
+\newcommand*{\datagidxstripaccents}{%
+ \expandafter\def\csname \encodingdefault-cmd\endcsname##1##2##3{##3}%
+ \expandafter\def\csname OT1-cmd\endcsname##1##2##3{##3}%
+ \expandafter\def\csname T1-cmd\endcsname##1##2##3{##3}%
+ \expandafter\def\csname PD1-cmd\endcsname##1##2##3{##3}%
+ \def\IeC##1{\@gobbletwo##1}%
+}
+\ifdef\newterm
+{%
+}%
+{%
+ \newcommand{\newterm}{\datagidx@newterm}
+}
+\@onlypreamble\newterm
+\newcommand{\datagidx@setfieldvalues}[2]{%
+ \def\newterm@name{#2}%
+ \renewcommand*\newterm@label{#2}%
+ \renewcommand*\newterm@text{#2}%
+ \undef\newterm@plural
+ \renewcommand*{\newterm@description}{}%
+ \renewcommand*{\newterm@sort}{#2}%
+ \renewcommand*{\newterm@symbol}{}%
+ \let\newterm@database\datagidx@defaultdatabase
+ \renewcommand*{\newterm@short}{#2}%
+ \undef\newterm@shortplural
+ \renewcommand*{\newterm@long}{#2}%
+ \undef\newterm@longplural
+ \renewcommand*{\newterm@see}{}%
+ \renewcommand*{\newterm@seealso}{}%
+ \renewcommand*{\newterm@parent}{}%
+ \let\datagidx@orgfield\field
+ \def\field##1{\expandafter\noexpand\csname newterm@##1\endcsname}%
+ \newterm@defaultshook
+ \let\field\datagidx@orgfield
+ \setkeys{newterm}{#1}%
+ \bgroup
+ \let\glsadd\@gobble
+ \let\MakeUppercase\DTLgidxNoFormat
+ \let\MakeTextUppercase\DTLgidxNoFormat
+ \let\MakeLowercase\DTLgidxNoFormat
+ \let\MakeTextLowercase\DTLgidxNoFormat
+ \let\acronymfont\DTLgidxNoFormat
+ \let\textrm\DTLgidxNoFormat
+ \let\texttt\DTLgidxNoFormat
+ \let\textsf\DTLgidxNoFormat
+ \let\textsc\DTLgidxNoFormat
+ \let\textbf\DTLgidxNoFormat
+ \let\textmd\DTLgidxNoFormat
+ \let\textit\DTLgidxNoFormat
+ \let\textsl\DTLgidxNoFormat
+ \let\emph\DTLgidxNoFormat
+ \let\textsuperscript\DTLgidxNoFormat
+ \let~\space
+ \ifdef\andname
+ {%
+ \let\&\andname
+ }%
+ {%
+ \def\&{and}%
+ }%
+ \let\ensuremath\DTLgidxNoFormat
+ \let\DTLgidxParen\@gobble
+ \let\DTLgidxName\@secondoftwo
+ \let\DTLgidxPlace\datagidx@invert
+ \let\DTLgidxSubject\datagidx@invert
+ \let\DTLgidxOffice\@secondoftwo
+ \let\DTLgidxParticle\datagidx@bothoftwo
+ \datagidxwordifygreek
+ \datagidxstripaccents
+ \newtermlabelhook
+ \protected@xdef\newterm@label{\newterm@label}%
+ \let\DTLgidxName\datagidx@person
+ \let\DTLgidxPlace\datagidx@place
+ \let\DTLgidxSubject\datagidx@subject
+ \let\DTLgidxOffice\datagidx@person
+ \let\DTLgidxParen\datagidx@paren
+ \let\DTLgidxMac\datagidx@mac
+ \let\DTLgidxSaint\datagidx@saint
+ \let\DTLgidxIgnore\@gobble
+ \let\DTLgidxRank\datagidx@rank
+ \let\DTLgidxParticle\datagidx@particle
+ \let\DTLgidxNameNum\datagidx@namenum
+ \protected@xdef\newterm@sort{\newterm@sort}%
+ \egroup
+}
+\newcommand*{\datagidx@add@term}[1]{%
+ \global\cslet{datagidxentry@\newterm@label}{\newterm@database}%
+ \DTLnewrow{\newterm@database}%
+ \DTLnewdbentry{\newterm@database}{Name}{#1}%
+ \DTLnewdbentry{\newterm@database}{Used}{0}%
+ {%
+ \dtlexpandnewvalue
+ \DTLnewdbentry{\newterm@database}{Text}{\expandonce\newterm@text}%
+ \DTLnewdbentry{\newterm@database}{Description}{\expandonce\newterm@description}%
+ \DTLnewdbentry{\newterm@database}{Label}{\expandonce\newterm@label}%
+ \DTLnewdbentry{\newterm@database}{Sort}{\expandonce\newterm@sort}%
+ \DTLnewdbentry{\newterm@database}{Symbol}{\expandonce\newterm@symbol}%
+ \DTLnewdbentry{\newterm@database}{Short}{\expandonce\newterm@short}%
+ \DTLnewdbentry{\newterm@database}{Long}{\expandonce\newterm@long}%
+ \ifundef\newterm@plural
+ {%
+ \DTLnewdbentry{\newterm@database}{Plural}{\expandonce\newterm@text s}%
+ }%
+ {%
+ \DTLnewdbentry{\newterm@database}{Plural}{\expandonce\newterm@plural}%
+ }%
+ \ifundef\newterm@shortplural
+ {%
+ \DTLnewdbentry{\newterm@database}{ShortPlural}{\expandonce\newterm@short s}%
+ }%
+ {%
+ \DTLnewdbentry{\newterm@database}{ShortPlural}{\expandonce\newterm@shortplural}%
+ }%
+ \ifundef\newterm@longplural
+ {%
+ \DTLnewdbentry{\newterm@database}{LongPlural}{\expandonce\newterm@long s}%
+ }%
+ {%
+ \DTLnewdbentry{\newterm@database}{LongPlural}{\expandonce\newterm@longplural}%
+ }%
+ \ifdefempty{\newterm@see}%
+ {}%
+ {\DTLnewdbentry{\newterm@database}{See}{\newterm@see}}%
+ \ifdefempty{\newterm@seealso}%
+ {}%
+ {\DTLnewdbentry{\newterm@database}{SeeAlso}{\newterm@seealso}}%
+ \newterm@extrafields
+ \ifdefempty{\newterm@parent}%
+ {}%
+ {%
+ \iftermexists{\newterm@parent}%
+ {%
+ \edef\newterm@parentdatabase{\csuse{datagidxentry@\newterm@parent}}%
+ \ifthenelse{\equal{\newterm@parentdatabase}{\newterm@database}}
+ {%
+ \DTLnewdbentry{\newterm@database}{Parent}{\newterm@parent}%
+ \datagidx@addchild{\newterm@database}{\newterm@parent}{\newterm@label}%
+ }%
+ {%
+ \PackageError{datagidx}%
+ {%
+ Parent entry `\newterm@parent' must belong to the
+ same database as child entry `\newterm@label'%
+ }%
+ {%
+ Parent entry is in database
+ `\newterm@parentdatabase' and child entry is in
+ database `\newterm@database'%
+ }%
+ }%
+ }%
+ {%
+ \PackageError{datagidx}%
+ {%
+ Can't assign parent to `\newterm@label':
+ `\newterm@parent' doesn't exist%
+ }%
+ {}%
+ }%
+ }%
+ }%
+ \global\let\datagidxlastlabel\newterm@label
+}%
+\newcommand{\datagidx@newterm}[2][]{%
+ \datagidx@setfieldvalues{#1}{#2}%
+ \DTLifdbexists{\newterm@database}%
+ {%
+ \iftermexists{\newterm@label}%
+ {%
+ \PackageError{datagidx}{Term `\newterm@label' already
+ exists in database `\newterm@database'}{}%
+ }%
+ {%
+ \datagidx@add@term{#2}%
+ }%
+ }%
+ {%
+ \PackageError{datagidx}%
+ {Glossary/index data base `\newterm@database' doesn't exist}%
+ {%
+ You must define the glossary/index data base before you can
+ add any terms to it.%
+ }%
+ }%
+}
+\newcommand{\datagidx@highopt@newterm}[2][]{%
+ \datagidx@setfieldvalues{#1}{#2}%
+ \DTLifdbexists{\newterm@database}%
+ {%
+ \edef\dtl@dogetrow{%
+ \noexpand\dtlgetrowindex
+ {\noexpand\dtl@rowidx}%
+ {\newterm@database}%
+ {%
+ \dtlcolumnindex{\newterm@database}{Label}%
+ }%
+ {\newterm@label}}%
+ \dtl@dogetrow
+ \ifx\dtl@rowidx\dtlnovalue
+ \datagidx@add@term{#2}%
+ \csdef{datagidx@do@highopt@sort@\newterm@database}{\datagidx@sort}%
+ \else
+ \global\cslet{datagidxentry@\newterm@label}{\newterm@database}%
+ \global\let\datagidxlastlabel\newterm@label
+ \fi
+ }%
+ {%
+ \PackageError{datagidx}%
+ {Glossary/index data base `\newterm@database' doesn't exist}%
+ {%
+ You must define the glossary/index data base before you can
+ add any terms to it.%
+ }%
+ }%
+}
+\newcommand*{\datagidx@addchild}[3]{%
+ \edef\dtl@dogetrow{%
+ \noexpand\dtlgetrowforvalue
+ {#1}%
+ {%
+ \dtlcolumnindex{\newterm@database}{Label}%
+ }%
+ {#2}}%
+ \dtl@dogetrow
+ \dtlgetentryfromcurrentrow
+ {\datagidx@child}%
+ {\dtlcolumnindex{#1}{Child}}%
+ \ifx\datagidx@child\dtlnovalue
+ \edef\datagidx@child{#3}%
+ \else
+ \edef\datagidx@child{\datagidx@child,#3}%
+ \fi
+ \edef\do@update{\noexpand\dtlupdateentryincurrentrow
+ {Child}{\datagidx@child}}%
+ \do@update
+ \dtlrecombine
+}
+\newcommand{\newacro}[3][]{%
+ \newterm
+ [%
+ description={\capitalisewords{#3}},%
+ short={\acronymfont{#2}},%
+ long={#3},%
+ text={\DTLgidxAcrStyle{#3}{\acronymfont{#2}}},%
+ plural={\DTLgidxAcrStyle{#3s}{\acronymfont{#2s}}},%
+ sort={#2},%
+ #1%
+ ]%
+ {\MakeTextUppercase{#2}}%
+}
+\newcommand*{\acronymfont}[1]{#1}
+\newcommand*{\DTLgidxAcrStyle}[2]{#1 (#2)}
+\newcommand{\iftermexists}[3]{%
+ \ifcsdef{datagidxentry@#1}{#2}{#3}%
+}
+\newcommand*{\ifentryused}[3]{%
+ \letcs{\newterm@database}{datagidxentry@#1}%
+ \edef\dtl@dogetrow{%
+ \noexpand\dtlgetrowforvalue
+ {\newterm@database}%
+ {%
+ \dtlcolumnindex{\newterm@database}{Label}%
+ }%
+ {#1}}%
+ \dtl@dogetrow
+ \dtlgetentryfromcurrentrow
+ {\datagidx@value}%
+ {\dtlcolumnindex{\newterm@database}{Used}}%
+ \ifnum\datagidx@value=1\relax
+ #2%
+ \else
+ #3%
+ \fi
+}
+\newcommand*{\glsreset}[1]{%
+ \letcs{\newterm@database}{datagidxentry@#1}%
+ \edef\do@getrow{%
+ \noexpand\dtlgetrowforvalue
+ {\newterm@database}%
+ {\dtlcolumnindex{\newterm@database}{Label}}%
+ {#1}%
+ }%
+ \do@getrow
+ \dtlreplaceentryincurrentrow
+ {0}{\dtlcolumnindex{\newterm@database}{Used}}%
+ \dtlrecombine
+}
+\newcommand*{\glsunset}[1]{%
+ \letcs{\newterm@database}{datagidxentry@#1}%
+ \edef\do@getrow{%
+ \noexpand\dtlgetrowforvalue
+ {\newterm@database}%
+ {\dtlcolumnindex{\newterm@database}{Label}}%
+ {#1}%
+ }%
+ \do@getrow
+ \dtlreplaceentryincurrentrow
+ {1}{\dtlcolumnindex{\newterm@database}{Used}}%
+ \dtlrecombine
+}
+\newcommand*{\glsresetall}[1]{%
+ \def\datagidx@list{}%
+ \dtlforcolumn{\datagidx@label}{#1}{Label}%
+ {%
+ \ifdefempty\datagidx@list
+ {%
+ \let\datagidx@list\datagidx@label
+ }%
+ {%
+ \eappto\datagidx@list{,\datagidx@label}%
+ }%
+ }%
+ \@for\datagidx@thislabel:=\datagidx@list\do
+ {%
+ \glsreset{\datagidx@thislabel}%
+ }%
+}
+\newcommand*{\glsunsetall}[1]{%
+ \def\datagidx@list{}%
+ \dtlforcolumn{\datagidx@label}{#1}{Label}%
+ {%
+ \ifdefempty\datagidx@list
+ {%
+ \let\datagidx@list\datagidx@label
+ }%
+ {%
+ \eappto\datagidx@list{,\datagidx@label}%
+ }%
+ }%
+ \@for\datagidx@thislabel:=\datagidx@list\do
+ {%
+ \glsunset{\datagidx@thislabel}%
+ }%
+}
+\newcount\datagidx@anchorcount
+\newcommand*{\datagidx@formatanchor}[1]{%
+ \ifnum#1<10000
+ 0%
+ \ifnum#1<1000
+ 0%
+ \ifnum#1<100
+ 0%
+ \ifnum#1<10
+ 0%
+ \fi
+ \fi
+ \fi
+ \fi
+ \number#1%
+}
+\newcommand*{\@datagidx@escloc}[2]{%
+ \expandafter\string\csname#1\endcsname{\noexpand\number#2}%
+}
+\newcommand*{\datagidx@escapelocation}{%
+ \def\@arabic{\@datagidx@escloc{@arabic}}%
+ \def\@roman{\@datagidx@escloc{@roman}}%
+ \def\@Roman{\@datagidx@escloc{@Roman}}%
+ \def\@alph{\@datagidx@escloc{@alph}}%
+ \def\@Alph{\@datagidx@escloc{@Alph}}%
+}
+\newcommand*{\datagidx@escapelocationformat}{%
+ \def\@arabic##1{arabic}%
+ \def\@roman##1{roman}%
+ \def\@Roman##1{Roman}%
+ \def\@alph##1{alph}%
+ \def\@Alph##1{Alph}%
+}
+\newcommand*{\datagidx@clearlocationformat}{%
+ \let\@arabic\@firstofone
+ \let\@roman\@firstofone
+ \let\@Roman\@firstofone
+ \let\@alph\@firstofone
+ \let\@Alph\@firstofone
+}
+\newcommand*{\DTLgidxAddLocationType}[1]{%
+ \gappto\datagidx@escapelocation{%
+ \expandafter\def\csname#1\endcsname{\@datagidx@escloc{#1}}%
+ }%
+ \gappto\datagidx@escapelocationformat{%
+ \expandafter\def\csname#1\endcsname##1{#1}%
+ }%
+ \gappto\datagidx@clearlocationformat{%
+ \expandafter\let\csname#1\endcsname\@firstofone
+ }%
+}
+\@onlypreamble\DTLgidxAddLocationType
+\newcommand*{\datagidx@target}[4]{%
+ \global\advance\datagidx@anchorcount by 1\relax
+ \edef\@datagidx@target{datagidx.\datagidx@formatanchor\datagidx@anchorcount}%
+ \ifstrempty{#3}
+ {%
+ \datagidx@write@usedentry{#1}{}%
+ }%
+ {%
+ \bgroup
+ \datagidx@escapelocation
+ \protected@edef\@datagidx@dowriteaux{%
+ \noexpand\datagidx@write@usedentry{#1}%
+ {[#2]{#3}{\@datagidx@target}}%
+ }%
+ \@datagidx@dowriteaux
+ \egroup
+ }%
+ \ifdef\hypertarget
+ {%
+ \datagidxshowifdraft
+ {%
+ [\@datagidx@target]%
+ \discretionary{}{}{}%
+ }%
+ \bgroup
+ \let\glsadd\@gobble
+ \settoheight\dimen@{#4}%
+ \raisebox{\dimen@}%
+ {%
+ \datagidxtarget{\@datagidx@target}{}%
+ }%
+ \egroup
+ }%
+ {%
+ }%
+ \datagidxshowifdraft{[#1]\discretionary{}{}{}}%
+ #4%
+}
+\DeclareRobustCommand*{\glsdispentry}[2]{%
+ \DTLgidxFetchEntry{\datagidx@dispentryval}{#1}{#2}%
+ \datagidx@dispentryval
+}
+\DeclareRobustCommand*{\Glsdispentry}[2]{%
+ \DTLgidxFetchEntry{\datagidx@dispentryval}{#1}{#2}%
+ \xmakefirstuc\datagidx@dispentryval
+}
+\newcommand*{\DTLgidxFetchEntry}[3]{%
+ \ifcsdef{datagidxentry@#2}%
+ {%
+ \letcs{\newterm@database}{datagidxentry@#2}%
+ \edef\do@getrow{%
+ \noexpand\dtlgetrowforvalue
+ {\newterm@database}%
+ {\dtlcolumnindex{\newterm@database}{Label}}%
+ {#2}%
+ }%
+ \do@getrow
+ \dtlgetentryfromcurrentrow
+ {#1}%
+ {\dtlcolumnindex{\newterm@database}{#3}}%
+ }%
+ {%
+ \PackageError{datagidx}{No term `#2' defined}{}%
+ }%
+}
+\newcommand*{\datagidx@parse@formatlabel}[1]{%
+ \datagidx@parse@format@label@#1\@endparse@formatlabel@
+}
+\newcommand*\datagidx@parse@format@label@{%
+ \@ifnextchar[{\datagidx@parse@formatlabel@}{\datagidx@parse@formatlabel@[]}%
+}
+\def\datagidx@parse@formatlabel@[#1]#2\@endparse@formatlabel@{%
+ \def\datagidx@format{#1}%
+ \def\datagidx@label{#2}%
+}
+\newcommand*{\datagidx@use@entry}[2]{%
+ \ifcsundef{datagidxentry@\datagidx@label}
+ {%
+ \PackageError{datagidx}{Entry `\datagidx@label' doesn't exist}{}%
+ }%
+ {%
+ \letcs{\newterm@database}{datagidxentry@\datagidx@label}%
+ \edef\do@getrow{%
+ \noexpand\dtlgetrowforvalue
+ {\newterm@database}%
+ {\dtlcolumnindex{\newterm@database}{Label}}%
+ {\datagidx@label}%
+ }%
+ \do@getrow
+ \dtlgetentryfromcurrentrow
+ {\datagidx@id}%
+ {\dtlcolumnindex{\newterm@database}{FirstId}}%
+ \DTLifnull\datagidx@id
+ {%
+ \count@=\datagidx@anchorcount\relax
+ \advance\count@ by 1\relax
+ \dtlappendentrytocurrentrow{FirstId}{\datagidx@formatanchor\count@}%
+ }%
+ {}%
+ \dtlgetentryfromcurrentrow
+ {\datagidx@value}%
+ {\dtlcolumnindex{\newterm@database}{#1}}%
+ \dtlreplaceentryincurrentrow
+ {1}{\dtlcolumnindex{\newterm@database}{Used}}%
+ \dtlgetentryfromcurrentrow
+ {\datagidx@parent}%
+ {\dtlcolumnindex{\newterm@database}{Parent}}%
+ \dtlrecombine
+ \datagidx@markparent{\newterm@database}{\datagidx@parent}%
+ \datagidx@target{\datagidx@label}{\datagidx@format}%
+ {\csuse{the\DTLgidxCounter}}{#2}%
+ }%
+}
+\newcommand*{\DTLgidxCounter}{page}
+\newcommand*{\datagidx@markparent}[2]{%
+ \ifx#2\dtlnovalue
+ \else
+ \datagidx@target{#2}{}{}{}%
+ \edef\do@getrow{%
+ \noexpand\dtlgetrowforvalue
+ {#1}%
+ {\dtlcolumnindex{#1}{Label}}%
+ {#2}}%
+ \do@getrow
+ \dtlgetentryfromcurrentrow
+ {\datagidx@id}%
+ {\dtlcolumnindex{\newterm@database}{FirstId}}%
+ \DTLifnull\datagidx@id
+ {%
+ \dtlappendentrytocurrentrow{FirstId}{\datagidx@formatanchor\datagidx@anchorcount}%
+ }%
+ {}%
+ \dtlgetentryfromcurrentrow
+ {\datagidx@parent}%
+ {\dtlcolumnindex{#1}{Parent}}%
+ \dtlrecombine
+ \datagidx@markparent{#1}{\datagidx@parent}%
+ \fi
+}
+\newcommand*{\datagidx@write@usedentry}[2]{%
+ \datagidx@do@highopt@update{#1}%
+ \protected@write{\@auxout}{}%
+ {%
+ \string\datagidx@usedentry{#1}{#2}%
+ }%
+ \protected@edef\datagidx@do@usedentry{%
+ \noexpand\datagidx@usedentry[CurrentLocation]{#1}{#2}%
+ }%
+ \datagidx@do@usedentry
+}
+\newcommand*{\datagidx@usedentry}[3][Location]{%
+ \ifcsundef{datagidxentry@#2}%
+ {%
+ \PackageWarning{datagidx}{No term `#2' defined. Ignoring}%
+ }%
+ {%
+ \letcs{\newterm@database}{datagidxentry@#2}%
+ \edef\do@getrow{%
+ \noexpand\dtlgetrowforvalue
+ {\newterm@database}%
+ {\dtlcolumnindex{\newterm@database}{Label}}%
+ {#2}%
+ }%
+ \do@getrow
+ \dtlgetentryfromcurrentrow
+ {\datagidx@loc}%
+ {\dtlcolumnindex{\newterm@database}{#1}}%
+ \ifx\datagidx@loc\dtlnovalue
+ \def\datagidx@loc{#3}%
+ \dtlappendentrytocurrentrow{#1}{\expandonce\datagidx@loc}%
+ \else
+ \ifdefempty{\datagidx@loc}%
+ {%
+ \def\datagidx@loc{#3}%
+ }%
+ {%
+ \ifstrempty{#3}%
+ {}%
+ {%
+ \appto\datagidx@loc{,#3}%
+ }%
+ }%
+ \expandafter\dtlreplaceentryincurrentrow\expandafter
+ {\datagidx@loc}%
+ {\dtlcolumnindex{\newterm@database}{#1}}%
+ \fi
+ \dtlrecombine
+ }%
+}
+\newcommand*{\datagidx@save@loc}[2]{%
+ \bgroup
+ \datagidx@escapelocation
+ \xdef\datagidx@tmp{#2}%
+ \egroup
+ \expandafter\xdef\csname datagidx@prev@loc@#1\endcsname{\datagidx@tmp}%
+}
+\newcommand*{\glsadd}[1]{%
+ \NoCaseChange{\@glsadd{#1}}%
+}
+\DeclareRobustCommand*{\@glsadd}[1]{%
+ \ifcsundef{datagidxentry@\datagidx@label}%
+ {%
+ \PackageError{datagidx}{Term `\datagidx@label' doesn't exist}{}%
+ }%
+ {%
+ \datagidx@parse@formatlabel{#1}%
+ \datagidx@target{\datagidx@label}{\datagidx@format}%
+ {\csuse{the\DTLgidxCounter}}{}%
+ \letcs{\newterm@database}{datagidxentry@\datagidx@label}%
+ \edef\do@getrow{%
+ \noexpand\dtlgetrowforvalue
+ {\newterm@database}%
+ {\dtlcolumnindex{\newterm@database}{Label}}%
+ {\datagidx@label}%
+ }%
+ \do@getrow
+ \dtlreplaceentryincurrentrow
+ {1}{\dtlcolumnindex{\newterm@database}{Used}}%
+ \dtlgetentryfromcurrentrow
+ {\datagidx@id}%
+ {\dtlcolumnindex{\newterm@database}{FirstId}}%
+ \DTLifnull\datagidx@id
+ {%
+ \dtlappendentrytocurrentrow{FirstId}{\datagidx@formatanchor\datagidx@anchorcount}%
+ }%
+ {}%
+ \dtlrecombine
+ }%
+}
+\newcount\datagidx@count
+\newcommand*{\glsaddall}[1]{%
+ \DTLifdbexists{#1}%
+ {%
+ \edef\datagidx@rowcount{\number\DTLrowcount{#1}}%
+ \datagidx@count=0\relax
+ \loop
+ \advance\datagidx@count by 1\relax
+ \dtlgetrow{#1}{\datagidx@count}%
+ \dtlgetentryfromcurrentrow
+ {\datagidx@label}%
+ {\dtlcolumnindex{\newterm@database}{Label}}%
+ \bgroup
+ \undef\hypertarget
+ \datagidx@target{\datagidx@label}{}{}{}%
+ \egroup
+ \dtlreplaceentryincurrentrow
+ {1}{\dtlcolumnindex{\newterm@database}{Used}}%
+ \dtlgetentryfromcurrentrow
+ {\datagidx@id}%
+ {\dtlcolumnindex{\newterm@database}{FirstId}}%
+ \DTLifnull\datagidx@id
+ {%
+ \dtlappendentrytocurrentrow{FirstId}{\datagidx@formatanchor\datagidx@anchorcount}%
+ }%
+ {}%
+ \dtlrecombine
+ \ifnum\datagidx@count<\datagidx@rowcount
+ \repeat
+ }%
+ {%
+ \PackageError{datagidx}{Database `#1' doesn't exist}{}%
+ }%
+}
+\DeclareRobustCommand*{\useentry}[2]{%
+ \datagidx@parse@formatlabel{#1}%
+ \DTLgidxFetchEntry{\datagidx@value}{\datagidx@label}{#2}%
+ \datagidxlink{\datagidx@label}%
+ {%
+ \datagidx@use@entry{#2}{\datagidx@value}%
+ }%
+}
+\DeclareRobustCommand*{\Useentry}[2]{%
+ \datagidx@parse@formatlabel{#1}%
+ \DTLgidxFetchEntry{\datagidx@value}{\datagidx@label}{#2}%
+ \datagidxlink{\datagidx@label}%
+ {%
+ \datagidx@use@entry{#2}{\xmakefirstuc{\datagidx@value}}%
+ }%
+}
+\DeclareRobustCommand*{\USEentry}[2]{%
+ \datagidx@parse@formatlabel{#1}%
+ \DTLgidxFetchEntry{\datagidx@value}{\datagidx@label}{#2}%
+ \datagidxlink{\datagidx@label}%
+ {%
+ \datagidx@use@entry{#2}{\MakeTextUppercase{\datagidx@value}}%
+ }%
+}
+\DeclareRobustCommand*{\useentrynl}[2]{%
+ \datagidx@parse@formatlabel{#1}%
+ \DTLgidxFetchEntry{\datagidx@value}{\datagidx@label}{#2}%
+ \datagidx@use@entry{#2}{\datagidx@value}%
+}
+\DeclareRobustCommand*{\Useentrynl}[2]{%
+ \datagidx@parse@formatlabel{#1}%
+ \DTLgidxFetchEntry{\datagidx@value}{\datagidx@label}{#2}%
+ \datagidx@use@entry{#2}{\xmakefirstuc{\datagidx@value}}%
+}
+\DeclareRobustCommand*{\USEentrynl}[2]{%
+ \datagidx@parse@formatlabel{#1}%
+ \DTLgidxFetchEntry{\datagidx@value}{\datagidx@label}{#2}%
+ \datagidx@use@entry{#2}{\MakeTextUppercase{\datagidx@value}}%
+}
+\DeclareRobustCommand*{\gls}[1]{\useentry{#1}{Text}}
+\DeclareRobustCommand*{\glspl}[1]{\useentry{#1}{Plural}}
+\DeclareRobustCommand*{\Gls}[1]{\Useentry{#1}{Text}}
+\DeclareRobustCommand*{\Glspl}[1]{\Useentry{#1}{Plural}}
+\DeclareRobustCommand*{\glsnl}[1]{\useentrynl{#1}{Text}}
+\DeclareRobustCommand*{\glsplnl}[1]{\useentrynl{#1}{Plural}}
+\DeclareRobustCommand*{\Glsnl}[1]{\Useentrynl{#1}{Text}}
+\DeclareRobustCommand*{\Glsplnl}[1]{\Useentrynl{#1}{Plural}}
+\DeclareRobustCommand*{\glssym}[1]{\useentry{#1}{Symbol}}
+\DeclareRobustCommand*{\Glssym}[1]{\Useentry{#1}{Symbol}}
+\newcommand*{\DTLgidxFormatAcr}[3]{%
+ \DTLgidxAcrStyle{\glsdispentry{#1}{#2}}{\useentry{#1}{#3}}%
+}
+\newcommand*{\DTLgidxFormatAcrUC}[3]{%
+ \DTLgidxAcrStyle{\Glsdispentry{#1}{#2}}{\useentry{#1}{#3}}%
+}
+\DeclareRobustCommand*{\acr}[1]{%
+ \ifentryused{#1}%
+ {\useentry{#1}{Short}}%
+ {\DTLgidxFormatAcr{#1}{Long}{Short}}%
+}
+\DeclareRobustCommand*{\acrpl}[1]{%
+ \ifentryused{#1}%
+ {\useentry{#1}{ShortPlural}}%
+ {\DTLgidxFormatAcr{#1}{LongPlural}{ShortPlural}}%
+}
+\DeclareRobustCommand*{\Acr}[1]{%
+ \ifentryused{#1}%
+ {\Useentry{#1}{Short}}%
+ {\DTLgidxFormatAcrUC{#1}{Long}{Short}}%
+}
+\DeclareRobustCommand*{\Acrpl}[1]{%
+ \ifentryused{#1}%
+ {\Useentry{#1}{ShortPlural}}%
+ {\DTLgidxFormatAcrUC{#1}{LongPlural}{ShortPlural}}%
+}
+\define@key{printterms}{database}{\renewcommand*{\newterm@database}{#1}}
+\define@choicekey{printterms}{postdesc}[\val\nr]%
+ {none,dot}%
+ {%
+ \datagidx@setpostdesc\nr
+ }
+\define@choicekey{printterms}{prelocation}[\val\nr]%
+ {none,enspace,space,dotfill,hfill}%
+ {%
+ \datagidx@setprelocation\nr
+ }
+\define@choicekey{printterms}{location}[\val\nr]%
+ {hide,list,first}%
+ {\datagidx@setlocation\nr}
+\define@choicekey{printterms}{symboldesc}[\val\nr]%
+ {symbol,desc,(symbol) desc,desc (symbol),symbol desc,desc symbol}%
+ {\datagidx@formatsymdesc\nr}
+\define@key{printterms}{columns}%
+{%
+ \DTLgidxSetColumns{#1}%
+}
+\define@choicekey{printterms}{namecase}[\val\nr]%
+ {nochange,uc,lc,firstuc,capitalise}%
+ {%
+ \datagidx@setnamecase\nr
+ }
+\define@key{printterms}{namefont}%
+{%
+ \renewcommand*{\DTLgidxNameFont}[1]{{#1{##1}}}%
+}
+\define@key{printterms}{postname}
+{%
+ \renewcommand*{\DTLgidxPostName}{#1}%
+}
+\define@choicekey{printterms}{see}[\val\nr]%
+ {comma,brackets,dot,space,nosep,semicolon,location}%
+ {\datagidx@setsee\nr}
+\define@choicekey{printterms}{child}[\val\nr]%
+ {named,noname}%
+ {%
+ \datagidx@setchildstyle\nr
+ }
+\define@key{printterms}{symbolwidth}%
+{%
+ \setlength{\datagidxsymbolwidth}{#1}%
+}
+\define@key{printterms}{locationwidth}%
+{%
+ \setlength{\datagidxlocationwidth}{#1}%
+}
+\define@choicekey{printterms}{childsort}[\val\nr]%
+ {true,false}[true]%
+ {%
+ \datagidx@setchildsort\nr
+ }
+\define@choicekey{printterms}{showgroups}{true,false}[true]{%
+ \appto\newterm@styles{showgroups={#1},}%
+}
+\define@key{printterms}{style}{\appto\newterm@styles{style={#1},}}
+\define@key{printterms}{heading}{\appto\newterm@styles{heading={#1},}}
+\define@key{printterms}{postheading}{%
+ \appto\newterm@styles{postheading={#1},}%
+}
+\define@key{printterms}{sort}{\appto\newterm@styles{sort={#1},}}
+\define@choicekey{printterms}{balance}[\val\nr]{true,false}[true]{%
+ \ifcase\nr\relax
+ \appto\newterm@styles{balance=true,}%
+ \or
+ \appto\newterm@styles{balance=false,}%
+ \fi
+}
+\newcommand{\printterms}[1][]{%
+\bgroup
+ \let\newterm@database\datagidx@defaultdatabase
+ \let\newterm@styles\@empty
+ \setkeys{printterms}{#1}%
+ \DTLifdbexists{\newterm@database}%
+ {%
+ \edef\DTLgidxCurrentdb{\newterm@database}%
+ \edef\do@getrow{\noexpand\dtlgetrowforvalue
+ {datagidx}%
+ {\dtlcolumnindex{datagidx}{Glossary}}%
+ {\newterm@database}%
+ }%
+ \do@getrow
+ \dtlgetentryfromcurrentrow
+ {\datagidx@title}%
+ {\dtlcolumnindex{datagidx}{Title}}%
+ \dtlgetentryfromcurrentrow
+ {\datagidx@heading}%
+ {\dtlcolumnindex{datagidx}{Heading}}%
+ \dtlgetentryfromcurrentrow
+ {\datagidx@postheading}%
+ {\dtlcolumnindex{datagidx}{PostHeading}}%
+ \dtlgetentryfromcurrentrow
+ {\datagidx@multicols}%
+ {\dtlcolumnindex{datagidx}{MultiCols}}%
+ \dtlgetentryfromcurrentrow
+ {\datagidx@sort}%
+ {\dtlcolumnindex{datagidx}{Sort}}%
+ \dtlgetentryfromcurrentrow
+ {\datagidx@style}%
+ {\dtlcolumnindex{datagidx}{Style}}%
+ \dtlgetentryfromcurrentrow
+ {\datagidx@showgroups}%
+ {\dtlcolumnindex{datagidx}{ShowGroups}}%
+ \edef\dtl@do@setkeys{\noexpand\setkeys{newgloss}{\expandonce\newterm@styles}}%
+ \dtl@do@setkeys
+ \ifnum\datagidx@columns>1\relax
+ \edef\datagidx@prestart{%
+ \noexpand\begin{\datagidx@multicols}{\datagidx@columns}%
+ }%
+ \edef\datagidx@postend{%
+ \noexpand\end{\datagidx@multicols}%
+ }%
+ \else
+ \def\datagidx@prestart{}%
+ \def\datagidx@postend{}%
+ \fi
+ \let\@dtl@dbname\DTLgidxCurrentdb
+ \csuse{datagidxshowgroups\datagidx@showgroups}%
+ \datagidxsetstyle{\datagidx@style}%
+ \def\datagidx@labellist{}%
+ \datagidx@heading{\datagidx@title}%
+ \datagidx@postheading
+ \datagidx@do@sort
+ \datagidx@prestart
+ \datagidxstart
+ \let\DTLgidxName\datagidx@invert
+ \let\DTLgidxPlace\datagidx@invert
+ \let\DTLgidxSubject\datagidx@invert
+ \let\DTLgidxOffice\datagidx@invert
+ \DTLgidxForeachEntry
+ {%
+ \datagidxitem
+ }%
+ \datagidxend
+ \datagidx@postend
+ }%
+ {%
+ \PackageError{datagidx}%
+ {Glossary/index data base `\newterm@database' doesn't exist}%
+ {%
+ You must define the glossary/index data base before you can
+ use it.%
+ }%
+ }%
+\egroup
+}
+\def\datagidx@getgroup#1#2\datagidx@endgetgroup{%
+ \dtl@setcharcode{#1}{\count@}%
+ \dtlifintclosedbetween{\count@}{48}{57}%
+ {%
+ \gdef\datagidxcurrentgroup{Numbers}%
+ }%
+ {%
+ \dtlifintclosedbetween{\count@}{97}{122}%
+ {%
+ \advance\count@ by -96\relax
+ \xdef\datagidxcurrentgroup{\@Alph\count@}%
+ }%
+ {%
+ \dtlifintclosedbetween{\count@}{65}{90}%
+ {%
+ \gdef\datagidxcurrentgroup{#1}%
+ }%
+ {%
+ \gdef\datagidxcurrentgroup{Symbols}%
+ }%
+ }%
+ }%
+}
+\newcommand*{\DTLgidxGroupHeaderTitle}[1]{%
+ \ifcsdef{datagidx#1name}
+ {%
+ \csuse{datagidx#1name}%
+ }%
+ {%
+ #1%
+ }%
+}
+\newcommand{\DTLgidxForeachEntry}[1]{%
+ \def\datagidxprevgroup{}%
+ \edef\datagidx@doforeachentry{%
+ \noexpand\DTLforeach*{\DTLgidxCurrentdb}%
+ {\expandonce\DTLgidxAssignList}
+ }%
+ \datagidx@doforeachentry
+ {%
+ \DTLifnull{\Parent}%
+ {%
+ \DTLifnull\Location
+ {%
+ \DTLifnull\CurrentLocation
+ {%
+ }%
+ {%
+ \global\let\@datagidx@dorerun@warn\@data@rerun@warn
+ }%
+ }%
+ {%
+ \ifcsdef{datagidx@prev@loc@\Label}%
+ {%
+ \ifcsequal{datagidx@prev@loc@\Label}{CurrentLocation}%
+ {}%
+ {%
+ \global\let\@datagidx@dorerun@warn\@data@rerun@warn
+ }%
+ }%
+ {%
+ \global\let\@datagidx@dorerun@warn\@data@rerun@warn
+ }%
+ }%
+ \datagidx@doifdisplayed
+ {%
+ \edef\datagidx@dowrite{%
+ \noexpand\protected@write\noexpand\@auxout{}%
+ {%
+ \string\datagidx@save@loc{\Label}{\CurrentLocation}%
+ }%
+ }%
+ \datagidx@dowrite
+ \datagidx@level=1\relax
+ \expandafter\datagidx@getgroup\Sort{}\datagidx@endgetgroup
+ #1%
+ \global\let\datagidxprevgroup\datagidxcurrentgroup
+ }%
+ }%
+ {}%
+ }%
+}
+\newcommand{\datagidx@doifdisplayed}[1]{%
+ \DTLifnull{\Location}%
+ {%
+ \DTLifnull{\See}
+ {%
+ \DTLifnull{\SeeAlso}{}%
+ {%
+ #1%
+ }%
+ }%
+ {%
+ \@for\dtl@thislabel:=\See\do
+ {%
+ \iftermexists{\dtl@thislabel}%
+ {%
+ \ifentryused{\dtl@thislabel}%
+ {%
+ #1%
+ \@endfortrue
+ }%
+ {}%
+ }%
+ {%
+ }%
+ }%
+ }%
+ }%
+ {%
+ #1%
+ }%
+}%
+\newcount\datagidx@level
+\endinput
+%%
+%% End of file `datagidx.sty'.
diff --git a/Master/texmf-dist/tex/latex/datatool/datapie.sty b/Master/texmf-dist/tex/latex/datatool/datapie.sty
index 21da0dc72a1..b585b5456c3 100644
--- a/Master/texmf-dist/tex/latex/datatool/datapie.sty
+++ b/Master/texmf-dist/tex/latex/datatool/datapie.sty
@@ -7,7 +7,7 @@
%% datatool.dtx (with options: `datapie.sty,package')
%%
%% datatool.dtx
-%% Copyright 2012 Nicola Talbot
+%% Copyright 2013 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -21,7 +21,7 @@
%%
%% The Current Maintainer of this work is Nicola Talbot.
%%
-%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
+%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, datagidx.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datapie}[2012/09/25 v2.11 (NLCT)]
+\ProvidesPackage{datapie}[2013/01/15 v2.13 (NLCT)]
\RequirePackage{xkeyval}
\newif\ifDTLcolorpiechart
\DTLcolorpiecharttrue
diff --git a/Master/texmf-dist/tex/latex/datatool/dataplot.sty b/Master/texmf-dist/tex/latex/datatool/dataplot.sty
index 2131f0a62d5..8da1b86d9d6 100644
--- a/Master/texmf-dist/tex/latex/datatool/dataplot.sty
+++ b/Master/texmf-dist/tex/latex/datatool/dataplot.sty
@@ -7,7 +7,7 @@
%% datatool.dtx (with options: `dataplot.sty,package')
%%
%% datatool.dtx
-%% Copyright 2012 Nicola Talbot
+%% Copyright 2013 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -21,7 +21,7 @@
%%
%% The Current Maintainer of this work is Nicola Talbot.
%%
-%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
+%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, datagidx.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{dataplot}[2012/09/25 v2.11 (NLCT)]
+\ProvidesPackage{dataplot}[2013/01/15 v2.13 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{tikz}
\RequirePackage{datatool}
diff --git a/Master/texmf-dist/tex/latex/datatool/datatool-base.sty b/Master/texmf-dist/tex/latex/datatool/datatool-base.sty
index 097ed15e5f1..8f617ec0e77 100644
--- a/Master/texmf-dist/tex/latex/datatool/datatool-base.sty
+++ b/Master/texmf-dist/tex/latex/datatool/datatool-base.sty
@@ -7,7 +7,7 @@
%% datatool.dtx (with options: `datatool-base.sty,package')
%%
%% datatool.dtx
-%% Copyright 2012 Nicola Talbot
+%% Copyright 2013 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -21,7 +21,7 @@
%%
%% The Current Maintainer of this work is Nicola Talbot.
%%
-%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
+%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, datagidx.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-base}[2012/10/06 v2.12 (NLCT)]
+\ProvidesPackage{datatool-base}[2013/01/15 v2.13 (NLCT)]
\RequirePackage{etoolbox}
\RequirePackage{amsmath}
\RequirePackage{xkeyval}
@@ -83,6 +83,31 @@
#4%
}%
}
+\newcommand{\dtlifintopenbetween}[5]{%
+ \ifnum#1>#2\relax
+ \ifnum#1<#3\relax
+ #4%
+ \else
+ #5%
+ \fi
+ \else
+ #5%
+ \fi
+}
+\newcommand{\dtlifintclosedbetween}[5]{%
+ \dtlifintopenbetween{#1}{#2}{#3}{#4}%
+ {%
+ \ifnum#1=#2\relax
+ #4%
+ \else
+ \ifnum#1=#3\relax
+ #4%
+ \else
+ #5%
+ \fi
+ \fi
+ }%
+}
\long\def\long@collect@body#1{%
\@envbody{\@xp#1\@xp{\the\@envbody}}%
\edef\process@envbody{\the\@envbody\@nx\end{\@currenvir}}%
@@ -1547,17 +1572,13 @@
#2=-1\relax
}%
{%
- \ifx#1\space\relax
+ \ifx#1\@dtl@wordbreak\relax
#2=`\ \relax
\else
- \ifx#1~\relax
- #2=`\ \relax
+ \ifcat\noexpand#1\relax
+ #2=0\relax
\else
- \ifcat\noexpand#1\relax
- #2=-1\relax
- \else
- #2=`#1\relax
- \fi
+ #2=`#1\relax
\fi
\fi
}%
@@ -1568,16 +1589,15 @@
#2=-1\relax
}%
{%
- \ifx#1\space\relax
+ \ifx#1\@dtl@wordbreak\relax
#2=`\ \relax
\else
- \ifx#1~\relax
- #2=`\ \relax
+ \ifcat\noexpand#1\relax%
+ #2=0\relax
\else
- \ifcat\noexpand#1\relax%
- #2=-1\relax
- \else
- #2=\lccode`#1\relax
+ #2=\lccode`#1\relax
+ \ifnum#2=0\relax
+ #2=`#1\relax
\fi
\fi
\fi
@@ -1602,82 +1622,413 @@
#1=1\relax
}%
{%
- \DTLsubstituteall{\@dtl@argA}{ }{\space }%
- \DTLsubstituteall{\@dtl@argB}{ }{\space }%
+ \dtl@setwordbreaksnohyphens{\@dtl@argA}{\@dtl@wordbreak}%
+ \let\@dtl@argA\dtl@string
+ \dtl@setwordbreaksnohyphens{\@dtl@argB}{\@dtl@wordbreak}%
+ \let\@dtl@argB\dtl@string
\expandafter\dtl@getfirst\@dtl@argA\end
\let\dtl@firstA=\dtl@first
\let\dtl@restA=\dtl@rest
\expandafter\dtl@getfirst\@dtl@argB\end
\let\dtl@firstB=\dtl@first
\let\dtl@restB=\dtl@rest
- \expandafter\dtl@ifsingle\expandafter{\dtl@firstA}{%
- \expandafter\dtl@ifsingle\expandafter{\dtl@firstB}{%
- \expandafter\dtl@setlccharcode\expandafter{\dtl@firstA}{\dtl@codeA}%
- \expandafter\dtl@setlccharcode\expandafter{\dtl@firstB}{\dtl@codeB}%
- \ifnum\dtl@codeA=-1\relax
- \ifnum\dtl@codeB=-1\relax
- \protected@edef\dtl@donext{%
- \noexpand\dtlicompare{\noexpand#1}{\dtl@restA}{\dtl@restB}}%
- \dtl@donext
- \else
- \protected@edef\dtl@donext{%
- \noexpand\dtlicompare
- {\noexpand#1}{\dtl@restA}{\dtl@firstB\dtl@restB}}%
- \dtl@donext
- \fi
+ \expandafter\dtl@ifsingle\expandafter{\dtl@firstA}%
+ {%
+ \expandafter\dtl@ifsingle\expandafter{\dtl@firstB}%
+ {%
+ \expandafter\dtl@setlccharcode\expandafter{\dtl@firstA}{\dtl@codeA}%
+ \expandafter\dtl@setlccharcode\expandafter{\dtl@firstB}{\dtl@codeB}%
+ \ifnum\dtl@codeA=-1\relax
+ \ifnum\dtl@codeB=-1\relax
+ \protected@edef\dtl@donext{%
+ \noexpand\dtlicompare{\noexpand#1}{\dtl@restA}{\dtl@restB}}%
+ \dtl@donext
+ \else
+ \protected@edef\dtl@donext{%
+ \noexpand\dtlicompare
+ {\noexpand#1}{\dtl@restA}{\dtl@firstB\dtl@restB}}%
+ \dtl@donext
+ \fi
+ \else
+ \ifnum\dtl@codeB=-1\relax
+ \protected@edef\dtl@donext{%
+ \noexpand\dtlicompare
+ {\noexpand#1}{\dtl@firstA\dtl@restA}{\dtl@restB}}%
+ \dtl@donext
+ \else
+ \ifnum\dtl@codeA<\dtl@codeB
+ #1=-1\relax
+ \else
+ \ifnum\dtl@codeA>\dtl@codeB
+ #1=1\relax
+ \else
+ \ifdefempty{\dtl@restA}%
+ {%
+ \ifdefempty{\dtl@restB}%
+ {%
+ #1=0\relax
+ }%
+ {%
+ #1=-1\relax
+ }%
+ }%
+ {%
+ \ifdefempty{\restB}%
+ {%
+ #1=1\relax
+ }%
+ {%
+ \protected@edef\dtl@donext{%
+ \noexpand\dtlicompare
+ {\noexpand#1}{\dtl@restA}{\dtl@restB}}%
+ \dtl@donext
+ }%
+ }%
+ \fi
+ \fi
+ \fi
+ \fi
+ }%
+ {%
+ \protected@edef\dtl@donext{%
+ \noexpand\dtlicompare
+ {\noexpand#1}{\dtl@firstA\dtl@restA}{\dtl@firstB\dtl@restB}}%
+ \dtl@donext
+ }%
+ }%
+ {%
+ \protected@edef\dtl@donext{%
+ \noexpand\dtlicompare
+ {\noexpand#1}{\dtl@firstA\dtl@restA}{\dtl@firstB\dtl@restB}}%
+ \dtl@donext
+ }%
+ }%
+ }%
+}
+\newcommand*{\dtlwordindexcompare}[3]{%
+ \@dtldictcompare{#1}{#2}{#3}{\@dtl@wordbreak}%
+}
+\newcommand*{\dtlletterindexcompare}[3]{%
+ \@dtldictcompare{#1}{#2}{#3}{}%
+}
+\newcommand*{\@dtldictcompare}[4]{%
+ \dtl@subnobrsp{#2}{\@dtl@argA}%
+ \dtl@subnobrsp{#3}{\@dtl@argB}%
+ \ifdefempty{\@dtl@argA}%
+ {%
+ \ifdefempty{\@dtl@argB}%
+ {%
+ #1=0\relax
+ }%
+ {%
+ #1=-1\relax
+ }%
+ }%
+ {%
+ \ifdefempty{\@dtl@argB}%
+ {%
+ #1=1\relax
+ }%
+ {%
+ \expandafter\DTLsplitstring\expandafter
+ {\@dtl@argA}{\datatoolpersoncomma}{\@dtl@beforepart}{\@dtl@afterpart}%
+ \ifdefempty{\@dtl@replaced}%
+ {%
+ \expandafter\DTLsplitstring\expandafter
+ {\@dtl@argA}{\datatoolplacecomma}{\@dtl@beforepart}{\@dtl@afterpart}%
+ \ifdefempty{\@dtl@replaced}%
+ {%
+ \expandafter\DTLsplitstring\expandafter
+ {\@dtl@argA}{\datatoolsubjectcomma}{\@dtl@beforepart}{\@dtl@afterpart}%
+ \ifdefempty{\@dtl@replaced}%
+ {%
+ \expandafter\DTLsplitstring\expandafter
+ {\@dtl@argA}{\datatoolparenstart}{\@dtl@beforepart}{\@dtl@afterpart}%
+ \ifdefempty{\@dtl@replaced}%
+ {%
+ \def\@dtl@A@comma{0}%
+ \let\@dtl@A@before\@dtl@argA
+ \def\@dtl@A@after{}%
+ }%
+ {%
+ \let\@dtl@A@comma\@dtl@replaced
+ \let\@dtl@A@before\@dtl@beforepart
+ \let\@dtl@A@after\@dtl@afterpart
+ }%
+ }%
+ {%
+ \let\@dtl@A@comma\@dtl@replaced
+ \let\@dtl@A@before\@dtl@beforepart
+ \let\@dtl@A@after\@dtl@afterpart
+ }%
+ }%
+ {%
+ \let\@dtl@A@comma\@dtl@replaced
+ \let\@dtl@A@before\@dtl@beforepart
+ \let\@dtl@A@after\@dtl@afterpart
+ }%
+ }%
+ {%
+ \let\@dtl@A@comma\@dtl@replaced
+ \let\@dtl@A@before\@dtl@beforepart
+ \let\@dtl@A@after\@dtl@afterpart
+ }%
+ \expandafter\DTLsplitstring\expandafter
+ {\@dtl@argB}{\datatoolpersoncomma}{\@dtl@beforepart}{\@dtl@afterpart}%
+ \ifdefempty{\@dtl@replaced}%
+ {%
+ \expandafter\DTLsplitstring\expandafter
+ {\@dtl@argB}{\datatoolplacecomma}{\@dtl@beforepart}{\@dtl@afterpart}%
+ \ifdefempty{\@dtl@replaced}%
+ {%
+ \expandafter\DTLsplitstring\expandafter
+ {\@dtl@argB}{\datatoolsubjectcomma}{\@dtl@beforepart}{\@dtl@afterpart}%
+ \ifdefempty{\@dtl@replaced}%
+ {%
+ \expandafter\DTLsplitstring\expandafter
+ {\@dtl@argB}{\datatoolparenstart}{\@dtl@beforepart}{\@dtl@afterpart}%
+ \ifdefempty{\@dtl@replaced}%
+ {%
+ \def\@dtl@B@comma{0}%
+ \let\@dtl@B@before\@dtl@argB
+ \def\@dtl@B@after{}%
+ }%
+ {%
+ \let\@dtl@B@comma\@dtl@replaced
+ \let\@dtl@B@before\@dtl@beforepart
+ \let\@dtl@B@after\@dtl@afterpart
+ }%
+ }%
+ {%
+ \let\@dtl@B@comma\@dtl@replaced
+ \let\@dtl@B@before\@dtl@beforepart
+ \let\@dtl@B@after\@dtl@afterpart
+ }%
+ }%
+ {%
+ \let\@dtl@B@comma\@dtl@replaced
+ \let\@dtl@B@before\@dtl@beforepart
+ \let\@dtl@B@after\@dtl@afterpart
+ }%
+ }%
+ {%
+ \let\@dtl@B@comma\@dtl@replaced
+ \let\@dtl@B@before\@dtl@beforepart
+ \let\@dtl@B@after\@dtl@afterpart
+ }%
+ \expandafter\dtl@ifcasechargroup\@dtl@A@before\dtl@end@ifcasechargroup
+ {\def\@dtl@A@chargroup{2}}%
+ {\def\@dtl@A@chargroup{1}}%
+ {\def\@dtl@A@chargroup{0}}%
+ \expandafter\dtl@ifcasechargroup\@dtl@B@before\dtl@end@ifcasechargroup
+ {\def\@dtl@B@chargroup{2}}%
+ {\def\@dtl@B@chargroup{1}}%
+ {\def\@dtl@B@chargroup{0}}%
+ \ifnum\@dtl@A@chargroup<\@dtl@B@chargroup
+ #1=-1\relax
\else
- \ifnum\dtl@codeB=-1\relax
- \protected@edef\dtl@donext{%
- \noexpand\dtlicompare
- {\noexpand#1}{\dtl@firstA\dtl@restA}{\dtl@restB}}%
- \dtl@donext
+ \ifnum\@dtl@A@chargroup>\@dtl@B@chargroup
+ #1=1\relax
\else
- \ifnum\dtl@codeA<\dtl@codeB
- #1=-1\relax
- \else
- \ifnum\dtl@codeA>\dtl@codeB
- #1=1\relax
+ \ifcase\@dtl@A@chargroup
+ \protected@edef\dtl@donext{%
+ \noexpand\dtlcompare
+ {\noexpand#1}{\@dtl@A@before}{\@dtl@B@before}}%
+ \dtl@donext
+ \or
+ \ifnum\@dtl@A@before<\@dtl@B@before\relax
+ #1=-1\relax
\else
- \ifdefempty{\dtl@restA}%
- {%
- \ifdefempty{\dtl@restB}%
- {%
- #1=0\relax
- }%
- {%
- #1=-1\relax
- }%
- }%
- {%
- \ifdefempty{\restB}%
- {%
- #1=1\relax
- }%
- {%
- \protected@edef\dtl@donext{%
- \noexpand\dtlicompare
- {\noexpand#1}{\dtl@restA}{\dtl@restB}}%
- \dtl@donext
- }%
- }%
+ \ifnum\@dtl@A@before>\@dtl@B@before\relax
+ #1=1\relax
+ \else
+ #1=0\relax
+ \fi
+ \fi
+ \or
+ \@dtlwordindexcompare{#1}{\@dtl@A@before}{\@dtl@B@before}
+ {\dtlicomparewords}{#4}%
+ \ifnum#1=0\relax
+ \let\@org@dtl@person@comma\datatoolpersoncomma
+ \let\@org@dtl@place@comma\datatoolplacecomma
+ \let\@org@dtl@subject@comma\datatoolsubjectcomma
+ \let\@org@dtl@paren@start\datatoolparenstart
+ \def\datatoolpersoncomma{3}%
+ \def\datatoolplacecomma{2}%
+ \def\datatoolsubjectcomma{1}%
+ \def\datatoolparenstart{-1}%
+ \ifnum\@dtl@A@comma>\@dtl@B@comma\relax
+ #1=-1\relax
+ \else
+ \ifnum\@dtl@A@comma<\@dtl@B@comma\relax
+ #1=1\relax
+ \else
+ \@dtlwordindexcompare{#1}{\@dtl@B@before}{\@dtl@A@before}
+ {\dtlcomparewords}{#4}%
+ \ifnum#1=0\relax
+ \@dtlwordindexcompare{#1}{\@dtl@A@after}{\@dtl@B@after}
+ {\dtlicomparewords}{#4}%
+ \fi
+ \fi
+ \fi
+ \let\datatoolpersoncomma\@org@dtl@person@comma
+ \let\datatoolplacecomma\@org@dtl@place@comma
+ \let\datatoolsubjectcomma\@org@dtl@subject@comma
+ \let\datatoolparenstart\@org@dtl@paren@start
\fi
\fi
\fi
\fi
- }{%
- \protected@edef\dtl@donext{%
- \noexpand\dtlicompare
- {\noexpand#1}{\dtl@firstA\dtl@restA}{\dtl@firstB\dtl@restB}}%
- \dtl@donext
- }}{%
- \protected@edef\dtl@donext{%
- \noexpand\dtlicompare
- {\noexpand#1}{\dtl@firstA\dtl@restA}{\dtl@firstB\dtl@restB}}%
- \dtl@donext
+ }%
+ }%
+}%
+\newcommand*{\datatoolpersoncomma}{,\space}
+\newcommand*{\datatoolplacecomma}{,\space}
+\newcommand*{\datatoolsubjectcomma}{,\space}
+\newcommand*{\datatoolparenstart}{\space}
+\newcommand*{\@dtlwordindexcompare}[5]{%
+ \dtl@setwordbreaks{#2}{#5}%
+ \let#2\dtl@string
+ \dtl@setwordbreaks{#3}{}%
+ \let#3\dtl@string
+ \edef\@dtl@do@compare{%
+ \noexpand#4{\noexpand#1}%
+ {\expandonce#2}{\expandonce#3}%
+ }%
+ \@dtl@do@compare
+}
+\newcommand*{\@dtl@dict@compare}[4]{%
+ \ifdefempty{#2}%
+ {%
+ \ifdefempty{#3}%
+ {%
+ #1=0\relax
+ }%
+ {%
+ #1=-1\relax
+ }%
+ }%
+ {%
+ \ifdefempty{#3}%
+ {%
+ #1=1\relax
+ }%
+ {%
+ \expandafter\dtl@grabword#2\@dtl@endgrabword\dtl@A@first\dtl@A@remain
+ \expandafter\dtl@grabword#3\@dtl@endgrabword\dtl@B@first\dtl@B@remain
+ \edef\@dtl@do@compare{%
+ \noexpand#4{\noexpand#1}%
+ {\expandonce\dtl@A@first}{\expandonce\dtl@B@first}%
}%
+ \@dtl@do@compare
+ \ifnum#1=0\relax
+ \@dtl@dict@compare{#1}{\dtl@A@remain}{\dtl@B@remain}{#4}%
+ \fi
}%
}%
}
+\def\dtl@grabword#1\@dtl@wordbreak#2\@dtl@endgrabword#3#4{%
+ \def#3{#1}%
+ \def#4{#2}%
+}
+\newcommand{\dtlicomparewords}[3]{%
+ \dtlicompare{#1}{#2}{#3}%
+}
+\newcommand{\dtlcomparewords}[3]{%
+ \dtlcompare{#1}{#2}{#3}%
+}
+\newcommand*{\dtl@setwordbreaks}[2]{%
+ \expandafter\dtl@subnobrsp\expandafter{#1}{\dtl@string}%
+ \DTLsubstituteall{\dtl@string}{~}{#2}%
+ \DTLsubstituteall{\dtl@string}{\ }{#2}%
+ \DTLsubstituteall{\dtl@string}{\space}{#2}%
+ \DTLsubstituteall{\dtl@string}{-}{#2}%
+ \toks@{#2}%
+ \edef\dtl@do@setwordbreaks{%
+ \noexpand\@dtl@setwordbreaks{\the\toks@}\expandonce\dtl@string\space\noexpand\@nil}%
+ \def\dtl@string{}%
+ \dtl@do@setwordbreaks
+}
+\def\@dtl@setwordbreaks#1#2 #3{%
+ \def\dtl@tmp{#3}%
+ \ifx\@nnil\dtl@tmp
+ \let\@dtl@setwordbreaks@next\@gobbletwo
+ \appto\dtl@string{#2}%
+ \else
+ \let\@dtl@setwordbreaks@next\@dtl@setwordbreaks
+ \appto\dtl@string{#2#1}%
+ \fi
+ \@dtl@setwordbreaks@next{#1}#3%
+}
+\newcommand*{\dtl@setwordbreaksnohyphens}[2]{%
+ \expandafter\dtl@subnobrsp\expandafter{#1}{\dtl@string}%
+ \DTLsubstituteall{\dtl@string}{~}{#2}%
+ \DTLsubstituteall{\dtl@string}{\ }{#2}%
+ \DTLsubstituteall{\dtl@string}{\space}{#2}%
+ \toks@{#2}%
+ \edef\dtl@do@setwordbreaks{%
+ \noexpand\@dtl@setwordbreaks{\the\toks@}\expandonce\dtl@string\space\noexpand\@nil}%
+ \def\dtl@string{}%
+ \dtl@do@setwordbreaks
+}
+\newcommand*{\@dtl@wordbreak}{ }
+\def\dtl@ifcasechargroup#1#2\dtl@end@ifcasechargroup#3#4#5{%
+ \dtlifcasechargroup{#1}%
+ {#3}%
+ {%
+ \DTLifint{#1#2}
+ {%
+ #4%
+ }%
+ {%
+ #3%
+ }%
+ }%
+ {#5}%
+}
+\newcommand*{\dtlifcasechargroup}[4]{%
+ \count@=`#1\relax
+ \dtlifintclosedbetween{\number\count@}{48}{57}%
+ {%
+ #3%
+ }%
+ {%
+ \dtlifintclosedbetween{\number\count@}{97}{122}%
+ {%
+ #2%
+ }%
+ {%
+ \dtlifintclosedbetween{\number\count@}{65}{90}%
+ {%
+ #2%
+ }%
+ {%
+ #4%
+ }%
+ }%
+ }%
+}
+\newcommand*{\dtlparsewords}[2]{%
+ \dtl@subnobrsp{#1}{\dtl@string}%
+ \DTLsubstituteall{\dtl@string}{~}{ }%
+ \DTLsubstituteall{\dtl@string}{\ }{ }%
+ \DTLsubstituteall{\dtl@string}{\space}{ }%
+ \DTLsubstituteall{\dtl@string}{-}{ }%
+ \let\dtl@parsewordshandler#2\relax
+ \edef\dtl@donext{%
+ \noexpand\@dtl@parse@words\expandonce\dtl@string\space\noexpand\@nil}%
+ \dtl@donext
+}
+\def\@dtl@parse@words#1 #2{%
+ \def\dtl@tmp{#2}%
+ \ifx\@nnil\dtl@tmp
+ \let\parse@wordsnext=\@gobble
+ \else
+ \let\parse@wordsnext=\@dtl@parse@words
+ \fi
+ \dlt@parsewordshandler{#1}%
+ \parse@wordsnext#2%
+}
\newcommand*{\DTLifstringlt}{\@ifstar\@sDTLifstringlt\@DTLifstringlt}
\newcommand*{\@DTLifstringlt}[4]{%
\protected@edef\@dtl@tmpcmp{%
@@ -1815,9 +2166,9 @@
\fi
}
\newcommand*{\DTLifSubString}[4]{%
- \protected@edef\@dtl@tmp{\noexpand\dtl@testifsubstring
+ \protected@edef\@dtl@dotestifsubstring{\noexpand\dtl@testifsubstring
{#1}{#2}}%
- \@dtl@tmp
+ \@dtl@dotestifsubstring
\if@dtl@condition
#3%
\else
@@ -1827,6 +2178,17 @@
\newcommand*{\dtl@testifsubstring}[2]{%
\dtl@subnobrsp{#1}{\@dtl@argA}%
\dtl@subnobrsp{#2}{\@dtl@argB}%
+ \dtl@setwordbreaksnohyphens{\@dtl@argA}{\@dtl@wordbreak}%
+ \let\@dtl@argA\dtl@string
+ \dtl@setwordbreaksnohyphens{\@dtl@argB}{\@dtl@wordbreak}%
+ \let\@dtl@argB\dtl@string
+ \edef\dtl@donext{%
+ \noexpand\@dtl@testifsubstring{\expandonce\@dtl@argA}{\expandonce\@dtl@argB}}%
+ \dtl@donext
+}
+\newcommand*{\@dtl@testifsubstring}[2]{%
+ \def\@dtl@argA{#1}%
+ \def\@dtl@argB{#2}%
\ifdefempty{\@dtl@argB}%
{%
\@dtl@conditiontrue
@@ -1837,16 +2199,15 @@
\@dtl@conditionfalse
}%
{%
- \dtl@teststartswith{#1}{#2}%
+ \@dtl@teststartswith{#1}{#2}%
\if@dtl@condition
\else
- \DTLsubstituteall{\@dtl@argA}{ }{\space }%
\expandafter\dtl@getfirst\@dtl@argA\end
\expandafter\dtl@ifsingle\expandafter{\dtl@first}{%
- \expandafter\dtl@testifsubstring\expandafter{\dtl@rest}{#2}%
+ \expandafter\@dtl@testifsubstring\expandafter{\dtl@rest}{#2}%
}{%
- \protected@edef\@dtl@donext{\noexpand\dtl@testifsubstring
- {\dtl@first\dtl@rest}{\@dtl@argB}}%
+ \protected@edef\@dtl@donext{\noexpand\@dtl@testifsubstring
+ {\expandonce\dtl@first\expandonce\dtl@rest}{\expandonce\@dtl@argB}}%
\@dtl@donext
}%
\fi
@@ -1866,6 +2227,18 @@
\newcommand*{\dtl@teststartswith}[2]{%
\dtl@subnobrsp{#1}{\@dtl@argA}%
\dtl@subnobrsp{#2}{\@dtl@argB}%
+ \dtl@setwordbreaksnohyphens{\@dtl@argA}{\@dtl@wordbreak}%
+ \let\@dtl@argA\dtl@string
+ \dtl@setwordbreaksnohyphens{\@dtl@argB}{\@dtl@wordbreak}%
+ \let\@dtl@argB\dtl@string
+ \edef\dtl@donext{%
+ \noexpand\@dtl@teststartswith{\expandonce\@dtl@argA}{\expandonce\@dtl@argB}}%
+ \dtl@donext
+}
+
+\newcommand*{\@dtl@teststartswith}[2]{%
+ \def\@dtl@argA{#1}%
+ \def\@dtl@argB{#2}%
\ifdefempty{\@dtl@argA}%
{%
\ifdefempty{\@dtl@argB}%
@@ -1882,54 +2255,59 @@
\@dtl@conditiontrue
}%
{%
- \DTLsubstituteall{\@dtl@argA}{ }{\space }%
- \DTLsubstituteall{\@dtl@argB}{ }{\space }%
\expandafter\dtl@getfirst\@dtl@argA\end
\let\dtl@firstA=\dtl@first
\let\dtl@restA=\dtl@rest
\expandafter\dtl@getfirst\@dtl@argB\end
\let\dtl@firstB=\dtl@first
\let\dtl@restB=\dtl@rest
- \expandafter\dtl@ifsingle\expandafter{\dtl@firstA}{%
- \expandafter\dtl@ifsingle\expandafter{\dtl@firstB}{%
- \expandafter\dtl@setcharcode\expandafter{\dtl@firstA}{\dtl@codeA}%
- \expandafter\dtl@setcharcode\expandafter{\dtl@firstB}{\dtl@codeB}%
- \ifnum\dtl@codeA=-1\relax
- \ifnum\dtl@codeB=-1\relax
- \protected@edef\dtl@donext{%
- \noexpand\dtl@teststartswith{\dtl@restA}{\dtl@restB}}%
- \dtl@donext
- \else
- \protected@edef\dtl@donext{%
- \noexpand\dtl@teststartswith
- {\dtl@restA}{\dtl@firstB\dtl@restB}}%
- \dtl@donext
- \fi
- \else
- \ifnum\dtl@codeB=-1\relax
- \protected@edef\dtl@donext{%
- \noexpand\dtl@teststartswith
- {\dtl@firstA\dtl@restA}{\dtl@restB}}%
- \dtl@donext
- \else
- \ifnum\dtl@codeA=\dtl@codeB
- \protected@edef\dtl@donext{%
- \noexpand\dtl@teststartswith{\dtl@restA}{\dtl@restB}}%
- \dtl@donext
+ \expandafter\dtl@ifsingle\expandafter{\dtl@firstA}%
+ {%
+ \expandafter\dtl@ifsingle\expandafter{\dtl@firstB}%
+ {%
+ \expandafter\dtl@setcharcode\expandafter{\dtl@firstA}{\dtl@codeA}%
+ \expandafter\dtl@setcharcode\expandafter{\dtl@firstB}{\dtl@codeB}%
+ \ifnum\dtl@codeA=-1\relax
+ \ifnum\dtl@codeB=-1\relax
+ \protected@edef\dtl@donext{%
+ \noexpand\@dtl@teststartswith{\expandonce\dtl@restA}{\expandonce\dtl@restB}}%
+ \dtl@donext
+ \else
+ \protected@edef\dtl@donext{%
+ \noexpand\@dtl@teststartswith
+ {\expandonce\dtl@restA}{\expandonce\dtl@firstB\expandonce\dtl@restB}}%
+ \dtl@donext
+ \fi
\else
- \@dtl@conditionfalse
+ \ifnum\dtl@codeB=-1\relax
+ \protected@edef\dtl@donext{%
+ \noexpand\@dtl@teststartswith
+ {\expandonce\dtl@firstA\expandonce\dtl@restA}{\expandonce\dtl@restB}}%
+ \dtl@donext
+ \else
+ \ifnum\dtl@codeA=\dtl@codeB
+ \protected@edef\dtl@donext{%
+ \noexpand\@dtl@teststartswith{\expandonce\dtl@restA}{\expandonce\dtl@restB}}%
+ \dtl@donext
+ \else
+ \@dtl@conditionfalse
+ \fi
+ \fi
\fi
- \fi
- \fi
- }{%
- \protected@edef\dtl@donext{%
- \noexpand\dtl@teststartswith
- {\dtl@firstA\dtl@restA}{\dtl@firstB\dtl@restB}}%
- \dtl@donext
- }}{%
- \protected@edef\dtl@donext{%
- \noexpand\dtl@teststartswith
- {\dtl@firstA\dtl@restA}{\dtl@firstB\dtl@restB}}%
+ }%
+ {%
+ \protected@edef\dtl@donext{%
+ \noexpand\@dtl@teststartswith
+ {\expandonce\dtl@firstA\expandonce\dtl@restA}%
+ {\expandonce\dtl@firstB\expandonce\dtl@restB}}%
+ \dtl@donext
+ }%
+ }%
+ {%
+ \protected@edef\dtl@donext{%
+ \noexpand\@dtl@teststartswith
+ {\expandonce\dtl@firstA\expandonce\dtl@restA}%
+ {\expandonce\dtl@firstB\expandonce\dtl@restB}}%
}%
}%
}%
diff --git a/Master/texmf-dist/tex/latex/datatool/datatool-fp.sty b/Master/texmf-dist/tex/latex/datatool/datatool-fp.sty
index de6bf14aa2c..aac031ce169 100644
--- a/Master/texmf-dist/tex/latex/datatool/datatool-fp.sty
+++ b/Master/texmf-dist/tex/latex/datatool/datatool-fp.sty
@@ -7,7 +7,7 @@
%% datatool.dtx (with options: `datatool-fp.sty,package')
%%
%% datatool.dtx
-%% Copyright 2012 Nicola Talbot
+%% Copyright 2013 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -21,7 +21,7 @@
%%
%% The Current Maintainer of this work is Nicola Talbot.
%%
-%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
+%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, datagidx.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-fp}[2012/09/25 v2.11 (NLCT)]
+\ProvidesPackage{datatool-fp}[2013/01/15 v2.13 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{fp}
\RequirePackage{datatool-base}
diff --git a/Master/texmf-dist/tex/latex/datatool/datatool-pgfmath.sty b/Master/texmf-dist/tex/latex/datatool/datatool-pgfmath.sty
index 39e8597e71a..3ce27652288 100644
--- a/Master/texmf-dist/tex/latex/datatool/datatool-pgfmath.sty
+++ b/Master/texmf-dist/tex/latex/datatool/datatool-pgfmath.sty
@@ -7,7 +7,7 @@
%% datatool.dtx (with options: `datatool-pgfmath.sty,package')
%%
%% datatool.dtx
-%% Copyright 2012 Nicola Talbot
+%% Copyright 2013 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -21,7 +21,7 @@
%%
%% The Current Maintainer of this work is Nicola Talbot.
%%
-%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
+%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, datagidx.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-pgfmath}[2012/10/06 v2.12 (NLCT)]
+\ProvidesPackage{datatool-pgfmath}[2013/01/15 v2.13 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{pgfrcs,pgfkeys,pgfmath}
\ProcessOptionsX
diff --git a/Master/texmf-dist/tex/latex/datatool/datatool.sty b/Master/texmf-dist/tex/latex/datatool/datatool.sty
index b8d1237baf7..5101274b157 100644
--- a/Master/texmf-dist/tex/latex/datatool/datatool.sty
+++ b/Master/texmf-dist/tex/latex/datatool/datatool.sty
@@ -7,7 +7,7 @@
%% datatool.dtx (with options: `datatool.sty,package')
%%
%% datatool.dtx
-%% Copyright 2012 Nicola Talbot
+%% Copyright 2013 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -21,7 +21,7 @@
%%
%% The Current Maintainer of this work is Nicola Talbot.
%%
-%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
+%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, datagidx.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool}[2012/09/25 v2.11 (NLCT)]
+\ProvidesPackage{datatool}[2013/01/15 v2.13 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{ifthen}
\RequirePackage{xfor}
@@ -112,7 +112,7 @@
\define@choicekey{datatool.sty}{math}[\val\nr]{fp,pgfmath}{%
\renewcommand*\@dtl@mathprocessor{#1}%
}
-\newcommand*{\@dtl@mathprocessor}{fp}
+\providecommand*{\@dtl@mathprocessor}{fp}
\ProcessOptionsX
\@dtl@construct@lopoffs
\RequirePackage{datatool-base}
@@ -164,6 +164,53 @@
database doesn't exist}{}{}%
}%
}
+\newcommand*{\DTLgnewdb}[1]{%
+ \DTLifdbexists{#1}%
+ {%
+ \PackageError{datatool}{Database `#1' already exists}{}%
+ }%
+ {%
+ \dtl@message{Creating database `#1'}%
+ \expandafter\global\expandafter\newtoks\csname dtldb@#1\endcsname
+ \expandafter\global\expandafter\newtoks\csname dtlkeys@#1\endcsname{}%
+ \expandafter\global\expandafter\newcount\csname dtlrows@#1\endcsname
+ \expandafter\global\expandafter\newcount\csname dtlcols@#1\endcsname
+ }%
+}
+\newcommand*{\DTLgdeletedb}[1]{%
+ \DTLifdbexists{#1}%
+ {%
+ \dtlforeachkey(\@dtl@key,\@dtl@col,\@dtl@type,\@dtl@head)\in{#1}\do
+ {%
+ \expandafter\global\expandafter\let\csname dtl@ci@#1@\@dtl@key\endcsname\undefined
+ }%
+ \expandafter\global\expandafter\let\csname dtldb@#1\endcsname\undefined
+ \expandafter\global\expandafter\let\csname dtlkeys@#1\endcsname\undefined
+ \expandafter\global\expandafter\let\csname dtlrows@#1\endcsname\undefined
+ \expandafter\global\expandafter\let\csname dtlcols@#1\endcsname\undefined
+ }%
+ {%
+ \PackageError{Can't delete database `#1':
+ database doesn't exist}{}{}%
+ }%
+}
+\newcommand*{\DTLgcleardb}[1]{%
+ \DTLifdbexists{#1}%
+ {%
+ \dtlforeachkey(\@dtl@key,\@dtl@col,\@dtl@type,\@dtl@head)\in{#1}\do
+ {%
+ \expandafter\global\expandafter\let\csname dtl@ci@#1@\@dtl@key\endcsname\undefined
+ }%
+ \expandafter\global\csname dtldb@#1\endcsname{}%
+ \expandafter\global\csname dtlkeys@#1\endcsname{}%
+ \expandafter\global\csname dtlrows@#1\endcsname=0\relax
+ \expandafter\global\csname dtlcols@#1\endcsname=0\relax
+ }%
+ {%
+ \PackageError{Can't clear database `#1':
+ database doesn't exist}{}{}%
+ }%
+}
\newcommand*{\DTLrowcount}[1]{%
\expandafter\number\csname dtlrows@#1\endcsname
}
@@ -189,7 +236,7 @@
\newcommand*{\@DTLnewrow}[1]{%
\DTLifdbexists{#1}%
{\@sDTLnewrow{#1}}%
- {\PackageErrors{datatool}{Can't add new row to database `#1':
+ {\PackageError{datatool}{Can't add new row to database `#1':
database doesn't exist}{}}%
}
\newcommand*{\@sDTLnewrow}[1]{%
@@ -487,7 +534,7 @@
{\noexpand\@dtl@key}{\noexpand\@dtl@type}%
{\noexpand\@dtl@colhead}{\noexpand\@dtl@before}%
{\noexpand\@dtl@after}{\the\csname dtlkeys@#1\endcsname}%
- {\number#2}}
+ {\number#2}}%
\@dtl@dogetprops
\@dtl@colhead={#3}%
\edef\@dtl@colnum{\number#2}\relax
@@ -537,7 +584,7 @@
}%
\dtl@dogetentry
\ifx\dtl@entry\dtlnovalue
- \@dtl@setnewvalue{#3}%
+ \@dtl@setnewvalue{#3}%
\toks@gconcat@middle@cx{dtldb@#1}%
{\dtlbeforerow}%
{%
@@ -617,16 +664,22 @@
\global\let#1=\DTLnumbernull
\fi
}
-\newcommand*{\DTLstringnull}{NULL}
-\newcommand*{\DTLnumbernull}{0}
+\newcommand*{\DTLstringnull}{\@dtlstringnull}
+\newcommand*{\@dtlstringnull}{NULL}
+\newcommand*{\DTLnumbernull}{\@dtlnumbernull}
+\newcommand*{\@dtlnumbernull}{0}
\newcommand*{\DTLifnull}[3]{%
- \ifx\DTLstringnull#1\relax
+ \ifx#1\dtlnovalue
#2%
\else
- \ifx\DTLnumbernull#1\relax
+ \ifx#1\DTLstringnull
#2%
\else
- #3%
+ \ifx#1\DTLnumbernull
+ #2%
+ \else
+ #3%
+ \fi
\fi
\fi
}
@@ -1202,7 +1255,7 @@
\gdef\DTLiflastrow##1##2{%
\expandafter\ifnum
\csname c@DTLrow\romannumeral\dtlforeachlevel\endcsname
- =\csname dtlcols@#2\endcsname\relax
+ =\csname dtlrows@#2\endcsname\relax
##1%
\else
##2%
@@ -1355,7 +1408,7 @@
\gdef\DTLiflastrow##1##2{%
\expandafter\ifnum
\csname c@DTLrow\romannumeral\dtlforeachlevel\endcsname
- =\csname dtlcols@#2\endcsname\relax
+ =\csname dtlrows@#2\endcsname\relax
##1%
\else
##2%
@@ -1608,7 +1661,7 @@
}
\newcommand{\DTLaddentryforrow}[5]{%
\DTLifdbexists{#1}%
- {
+ {%
\def\@dtl@notdone{\PackageError{datatool}{Unable to add entry
given by key `#4': condition not met for any row in database
`#1'}{}}%
@@ -1641,9 +1694,9 @@
\dtl@dogetentry
\ifx#1\dtlnovalue
\ifnum0\dtltype=0\relax
- \let#1=\DTLstringnull
+ \let#1=\@dtlstringnull
\else
- \let#1=\DTLnumbernull
+ \let#1=\@dtlnumbernull
\fi
\fi
\global\let#1#1%
@@ -1711,8 +1764,8 @@
\newcommand*{\dtldisplaystartrow}{}
\newcommand*{\DTLdisplaydb}[2][]{%
- \def\@dtl@doamp{\gdef\@dtl@doamp{&}}
- \def\@dtl@resetdoamp{\gdef\@dtl@doamp{\gdef\@dtl@doamp{&}}}
+ \def\@dtl@doamp{\gdef\@dtl@doamp{&}}%
+ \def\@dtl@resetdoamp{\gdef\@dtl@doamp{\gdef\@dtl@doamp{&}}}%
\edef\@dtl@maxcols{\expandafter\number
\csname dtlcols@#2\endcsname}%
\DTLnumitemsinlist{#1}{\@dtl@tmp}%
@@ -1726,7 +1779,7 @@
{}%
{%
\dtladdalign\@dtl@tabargs\@dtl@type\@dtl@idx\@dtl@maxcols
- }
+ }%
}%
\edef\@dtl@dobegintab{\noexpand\begin{tabular}[\dtldisplayvalign]{\@dtl@tabargs}}%
\@dtl@dobegintab
@@ -1793,8 +1846,8 @@
\def\@dtl@lastfoot{\@nil}%
\def\@dtl@omitlist{}%
\setkeys{displaylong}{#1}%
- \def\@dtl@doamp{\gdef\@dtl@doamp{&}}
- \def\@dtl@resetdoamp{\gdef\@dtl@doamp{\gdef\@dtl@doamp{&}}}
+ \def\@dtl@doamp{\gdef\@dtl@doamp{&}}%
+ \def\@dtl@resetdoamp{\gdef\@dtl@doamp{\gdef\@dtl@doamp{&}}}%
\@dtl@resetdostartrow
\edef\@dtl@maxcols{\expandafter\number
\csname dtlcols@#2\endcsname}%
@@ -2104,6 +2157,7 @@
}%
}%
\ifnum\@dtl@elements=0\relax
+ \PackageError{datatool}{Unable to evaluate mean: no data}{}%
\else
\edef\@dtl@n{\number\@dtl@elements}%
\DTLdiv{#4}{#4}{\@dtl@n}%
@@ -2383,23 +2437,20 @@
\newtoks\@dtl@list
\newcommand*{\DTLsort}{\@ifstar\@sDTLsort\@DTLsort}
\newcommand{\@DTLsort}[3][]{%
- \DTLifdbexists{#3}%
- {%
- \edef\@dtl@replacementkeys{#1}%
- \edef\@dtl@sortorder{#2}%
- \let\@dtl@comparecs=\dtlcompare
- \dtl@sortdata{#3}%
- }%
- {%
- \PackageError{datatool}{Database `#3' doesn't exist}{}%
- }%
+ \dtlsort[#1]{#2}{#3}{\dtlicompare}%
}
-\newcommand{\@sDTLsort}[3][]{%
+\newcommand*{\@sDTLsort}[3][]{%
+ \dtlsort[#1]{#2}{#3}{\dtlicompare}%
+}
+\newcommand{\dtlsort}[4][]{%
\DTLifdbexists{#3}%
{%
+ \ifnum\DTLrowcount{#3}>100\relax
+ \typeout{Sorting `#3' - this may take a while.}%
+ \fi
\edef\@dtl@replacementkeys{#1}%
\edef\@dtl@sortorder{#2}%
- \let\@dtl@comparecs=\dtlicompare
+ \let\@dtl@comparecs=#4%
\dtl@sortdata{#3}%
}%
{%
@@ -2411,7 +2462,7 @@
\newcommand*{\dtl@sortdata}[1]{%
\def\@dtl@sortedlist{}%
\edef\@dtl@dbname{#1}%
- \@dtlforeachrow(\@dtl@rowAnum,\@dtl@rowAcontents)\in{#1}\do{%
+ \@dtlforeachrow(\@dtl@rowAnum,\@dtl@rowAcontents)\in\@dtl@dbname\do{%
\@dtl@rowa=\expandafter{\@dtl@rowAcontents}%
\def\@dtl@newlist{}%
\@dtl@insertdonefalse
@@ -2421,7 +2472,8 @@
\db@row@id@w \@nil\db@row@id@end@%
\db@row@id@w \@nil\db@row@id@end@%
\db@row@elt@end@%
- \@@{\@dtl@rowBnum}{\@dtl@rowBcontents}{%
+ \@@{\@dtl@rowBnum}{\@dtl@rowBcontents}%
+ {%
\@dtl@rowb=\expandafter{\@dtl@rowBcontents}%
\dtlrownum=\@dtl@rowBnum
\if@dtl@insertdone
@@ -2475,7 +2527,8 @@
{\@dtl@sortedlist}%
}
\newcommand{\@dtl@sortcriteria}[2]{%
- \@for\@dtl@level:=\@dtl@sortorder\do{%
+ \@for\@dtl@level:=\@dtl@sortorder\do
+ {%
\expandafter\@dtl@getsortdirection\@dtl@level=\relax
\let\@dtl@keya=\@dtl@key
\let\@dtl@keyb=\@dtl@key
@@ -2554,7 +2607,7 @@
\PackageError{datatool}{Invalid sort direction
`\@dtl@sortdirection'}{The sort direction can only be
one of `ascending' or `descending'}%
- \def\@dtl@sortdirection{-1}
+ \def\@dtl@sortdirection{-1}%
\fi
\fi
}%
@@ -2714,6 +2767,97 @@
database}{}%
}%
}
+\newcommand*{\dtl@saverawdbhook}{}
+\newcommand*{\DTLsaverawdb}[2]{%
+ \DTLifdbexists{#1}%
+ {%
+ \openout\@dtl@write=#2\relax
+ \protected@write{\@dtl@write}{}{%
+ \string\DTLifdbexists{#1}\expandafter\@gobble\string\%^^J%
+ {%
+ \string\PackageError{datatool}{Database `#1' ^^Jalready exists}{}%
+ \expandafter\@gobble\string\%^^J%
+ \string\aftergroup\string\endinput
+ }%
+ {%
+ }\expandafter\@gobble\string\%
+ }%
+ {%
+ \def\db@row@elt@w{\expandafter\@gobble\string\%^^J\string\db@row@elt@w\space}%
+ \def\db@row@elt@end@{\expandafter\@gobble\string\%^^J\string\db@row@elt@end@\space}%
+ \def\db@row@id@w{\expandafter\@gobble\string\%^^J\string\db@row@id@w\space}%
+ \def\db@row@id@end@{\expandafter\@gobble\string\%^^J\string\db@row@id@end@\space}%
+ \def\db@col@elt@w{\expandafter\@gobble\string\%^^J\string\db@col@elt@w\space}%
+ \def\db@col@elt@end@{\expandafter\@gobble\string\%^^J\string\db@col@elt@end@\space}%
+ \def\db@col@id@w{\expandafter\@gobble\string\%^^J\string\db@col@id@w\space}%
+ \def\db@col@id@end@{\expandafter\@gobble\string\%^^J\string\db@col@id@end@\space}%
+ \def\db@plist@elt@w{\expandafter\@gobble\string\%^^J\string\db@plist@elt@w\space}%
+ \def\db@plist@elt@end@{\expandafter\@gobble\string\%^^J\string\db@plist@elt@end@\space}%
+ \def\db@key@id@w{\expandafter\@gobble\string\%^^J\string\db@key@id@w\space}%
+ \def\db@key@id@end@{\expandafter\@gobble\string\%^^J\string\db@key@id@end@\space}%
+ \def\db@type@id@w{\expandafter\@gobble\string\%^^J\string\db@type@id@w\space}%
+ \def\db@type@id@end@{\expandafter\@gobble\string\%^^J\string\db@type@id@end@\space}%
+ \def\db@header@id@w{\expandafter\@gobble\string\%^^J\string\db@header@id@w\space}%
+ \def\db@header@id@end@{\expandafter\@gobble\string\%^^J\string\db@header@id@end@\space}%
+ \protected@write{\@dtl@write}{}{\string\bgroup\string\makeatletter}%
+ \protected@write{\@dtl@write}{}{\string\dtl@message{Reconstructing database
+ ^^J`#1'}\expandafter\@gobble\string\%}%
+ \protected@write{\@dtl@write}{}{%
+ \string\expandafter
+ \string\global\string\expandafter^^J\string\newtoks
+ \string\csname\space dtlkeys@#1\string\endcsname}%
+ \protected@write{\@dtl@write}{}{%
+ \string\expandafter
+ \string\global^^J
+ \string\csname\space dtlkeys@#1\string\endcsname
+ =\expandafter\@gobble\string\{\expandafter\@gobble\string\%}%
+ \expandafter\protected@xdef\csname dtl@rawwritedbkeys@#1\endcsname{%
+ \the\csname dtlkeys@#1\endcsname}%
+ \protected@write{\@dtl@write}{}{\csname dtl@rawwritedbkeys@#1\endcsname}%
+ \protected@write{\@dtl@write}{}{\expandafter\@gobble\string\}\expandafter\@gobble\string\%}%
+ \dtl@saverawdbhook
+ \protected@write{\@dtl@write}{}{%
+ \string\expandafter\string\global
+ \string\expandafter^^J\string\newtoks
+ \string\csname\space dtldb@#1\string\endcsname}%
+ \protected@write{\@dtl@write}{}{%
+ \string\expandafter
+ \string\global^^J\string\csname\space dtldb@#1\string\endcsname
+ =\expandafter\@gobble\string\{\expandafter\@gobble\string\%}%
+ \expandafter\protected@xdef\csname dtl@rawwritedb@#1\endcsname{\the\csname dtldb@#1\endcsname}%
+ \protected@write{\@dtl@write}{}{\csname dtl@rawwritedb@#1\endcsname}%
+ \protected@write{\@dtl@write}{}{\expandafter\@gobble\string\}\expandafter\@gobble\string\%}%
+ \protected@write{\@dtl@write}{}{\string\expandafter\string\global^^J
+ \string\expandafter\string\newcount
+ \string\csname\space dtlrows@#1\string\endcsname}%
+ \protected@write{\@dtl@write}{}{\string\expandafter\string\global^^J
+ \string\csname\space dtlrows@#1\string\endcsname
+ =\expandafter\number\csname dtlrows@#1\endcsname\string\relax}%
+ \protected@write{\@dtl@write}{}{\string\expandafter\string\global^^J
+ \string\expandafter\string\newcount
+ \string\csname\space dtlcols@#1\string\endcsname}%
+ \protected@write{\@dtl@write}{}{\string\expandafter\string\global^^J
+ \string\csname\space dtlcols@#1\string\endcsname
+ =\expandafter\number\csname dtlcols@#1\endcsname\string\relax}%
+ \dtlforeachkey(\@dtl@key,\@dtl@col,\@dtl@type,\@dtl@head)\in{#1}\do
+ {%
+ \edef\dtl@tmp{%
+ \string\expandafter^^J
+ \string\gdef
+ \string\csname\space dtl@ci@#1@\@dtl@key\string\endcsname
+ {\csname dtl@ci@#1@\@dtl@key\endcsname}\expandafter\@gobble\string\%
+ }%
+ \expandafter\write\expandafter\@dtl@write\expandafter{\dtl@tmp}%
+ }%
+ \protected@write{\@dtl@write}{}{\string\egroup}%
+ }%
+ \closeout\@dtl@write
+ }%
+ {%
+ \PackageError{datatool}{Can't save database `#1': no such
+ database}{}%
+ }%
+}
\newread\@dtl@read
\newcount\dtl@entrycr
\define@boolkey{loaddb}[dtl]{noheader}[true]{}
@@ -2748,13 +2892,15 @@
}%
{%
\dtl@trim#2%
- }
+ }%
}
\newcommand*{\@dtl@readrawline}[2]{%
\@dtl@rawread#1 to #2%
\dtl@trim#2%
\dtl@domappings\@dtl@line
}
+\newif\ifDTLnewdbonload
+\DTLnewdbonloadtrue
\newcommand*{\DTLloaddb}{%
\let\@dtl@doreadline\@dtl@readline
\@dtlloaddb
@@ -2772,7 +2918,9 @@
\advance\dtl@omitlines by \m@ne
\read\@dtl@read to \@dtl@line
\repeat
- \DTLnewdb{#2}%
+ \ifDTLnewdbonload
+ \DTLnewdb{#2}%
+ \fi
\ifeof\@dtl@read
\PackageWarning{datatool}{File `#3' has no data}%
\else
@@ -2983,8 +3131,8 @@
\def\@dtl@rawmappings{{#1}{#2}}%
}%
{%
- \def\@dtl@tmp{{#1}{#2}}
- \protected@edef\@dtl@rawmappings{\the\@dtl@toks,\@dtl@tmp}
+ \def\@dtl@tmp{{#1}{#2}}%
+ \protected@edef\@dtl@rawmappings{\the\@dtl@toks,\@dtl@tmp}%
}%
}
\newcommand*{\@dtl@rawmappings}{}
diff --git a/Master/texmf-dist/tex/latex/datatool/person.sty b/Master/texmf-dist/tex/latex/datatool/person.sty
index 84d18ad96da..6dcc72366b5 100644
--- a/Master/texmf-dist/tex/latex/datatool/person.sty
+++ b/Master/texmf-dist/tex/latex/datatool/person.sty
@@ -7,7 +7,7 @@
%% datatool.dtx (with options: `person.sty,package')
%%
%% datatool.dtx
-%% Copyright 2012 Nicola Talbot
+%% Copyright 2013 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -21,7 +21,7 @@
%%
%% The Current Maintainer of this work is Nicola Talbot.
%%
-%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
+%% This work consists of the files datatool.dtx and datatool.ins and the derived files datatool-base.sty, datatool-fp.sty, datatool-pgfmath.sty, datatool.sty, datagidx.sty, databib.sty, databar.sty, datapie.sty, dataplot.sty, person.sty, databib.bst.
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{person}[2012/09/25 v2.11 (NLCT)]
+\ProvidesPackage{person}[2013/01/15 v2.13 (NLCT)]
\RequirePackage{ifthen}
\RequirePackage{datatool}
\newcounter{people}