summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/datatool/datatool.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/datatool/datatool.sty')
-rw-r--r--Master/texmf-dist/tex/latex/datatool/datatool.sty32
1 files changed, 27 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/datatool/datatool.sty b/Master/texmf-dist/tex/latex/datatool/datatool.sty
index 5101274b157..35300a8d2c1 100644
--- a/Master/texmf-dist/tex/latex/datatool/datatool.sty
+++ b/Master/texmf-dist/tex/latex/datatool/datatool.sty
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool}[2013/01/15 v2.13 (NLCT)]
+\ProvidesPackage{datatool}[2013/06/28 v2.14 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{ifthen}
\RequirePackage{xfor}
@@ -116,7 +116,7 @@
\ProcessOptionsX
\@dtl@construct@lopoffs
\RequirePackage{datatool-base}
-\DeclareRobustCommand\DTLpar{\@par}
+\let\DTLpar\@@par
\newcommand*{\DTLnewdb}[1]{%
\DTLifdbexists{#1}%
{%
@@ -433,7 +433,8 @@
{\noexpand\@dtl@after}{\the\csname dtlkeys@#1\endcsname}%
{\number\dtlcolumnnum}}%
\@dtl@dogetprops
- \ifstrempty{#3}%
+ \protected@edef\dtl@tmp{#3}%
+ \ifdefempty\dtl@tmp
{%
}%
{%
@@ -2824,9 +2825,12 @@
\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}%
+ \@dtl@fmt@bodytok{\csname dtldb@#1\endcsname}%
+ \expandafter\protected@xdef\csname dtl@rawwritedb@#1\endcsname{%
+ \@dtl@contents}%
\protected@write{\@dtl@write}{}{\csname dtl@rawwritedb@#1\endcsname}%
- \protected@write{\@dtl@write}{}{\expandafter\@gobble\string\}\expandafter\@gobble\string\%}%
+ \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}%
@@ -2858,6 +2862,24 @@
database}{}%
}%
}
+\newcommand*{\@dtl@fmt@bodytok}[1]{%
+ \edef\@dtl@contents{\the#1}%
+ \@onelevel@sanitize\@dtl@contents
+ \@dtl@replace@elt{\@dtl@contents}{db@row@elt@w}%
+ \@dtl@replace@elt{\@dtl@contents}{db@row@elt@end@}%
+ \@dtl@replace@elt{\@dtl@contents}{db@row@id@w}%
+ \@dtl@replace@elt{\@dtl@contents}{db@row@id@end@}%
+ \@dtl@replace@elt{\@dtl@contents}{db@col@id@w}%
+ \@dtl@replace@elt{\@dtl@contents}{db@col@id@end@}%
+ \@dtl@replace@elt{\@dtl@contents}{db@col@elt@w}%
+ \@dtl@replace@elt{\@dtl@contents}{db@col@elt@end@}%
+}
+\newcommand*{\@dtl@replace@elt}[2]{%
+ \expandafter\def\expandafter\dtl@tmp\expandafter{\csname#2\endcsname }%
+ \@onelevel@sanitize\dtl@tmp
+ \expandafter\DTLsubstituteall\expandafter#1\expandafter{\dtl@tmp}%
+ {\csname#2\endcsname}%
+}
\newread\@dtl@read
\newcount\dtl@entrycr
\define@boolkey{loaddb}[dtl]{noheader}[true]{}