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