diff options
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, 24 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/latex/datatool/datatool.sty b/Master/texmf-dist/tex/latex/datatool/datatool.sty index 79299f2620f..46b03f234e4 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 2014 Nicola Talbot +%% Copyright 2015 Nicola Talbot %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -39,13 +39,12 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{datatool}[2014/06/10 v2.22 (NLCT)] +\ProvidesPackage{datatool}[2015/07/11 v2.23 (NLCT)] \RequirePackage{xkeyval} \RequirePackage{ifthen} \RequirePackage{xfor} \RequirePackage{substr} \RequirePackage{etoolbox} -\RequirePackage{etex} \newcommand*{\@dtl@separator}{,} \newcommand*{\DTLsetseparator}[1]{% \renewcommand*{\@dtl@separator}{#1}% @@ -57,6 +56,9 @@ \catcode`\^^I12 \DTLsetseparator{^^I}% } +\gdef\DTLmaketabspace{% + \catcode`\^^I10\relax +} \endgroup \begingroup \catcode`\"12\relax @@ -2504,7 +2506,7 @@ \newtoks\@dtl@list \newcommand*{\DTLsort}{\@ifstar\@sDTLsort\@DTLsort} \newcommand{\@DTLsort}[3][]{% - \dtlsort[#1]{#2}{#3}{\dtlicompare}% + \dtlsort[#1]{#2}{#3}{\dtlcompare}% } \newcommand*{\@sDTLsort}[3][]{% \dtlsort[#1]{#2}{#3}{\dtlicompare}% @@ -3250,15 +3252,29 @@ \let#1=\@dtl@trmstr } \long\def\@dtl@starttrim#1#2{% - \def\@dtl@tmpB{#2}% + \dtl@ifsingle{#2}% + {% + \def\@dtl@tmpB{#2}% + }% + {% + \def\@dtl@tmpB{{#2}}% + }% \ifx\par#1% - \def\@dtl@dotrim{\@dtl@trim{} #2}% + \edef\@dtl@dotrim{\noexpand\@dtl@trim{} \expandonce\@dtl@tmpB}% \else + \dtl@ifsingle{#1}% + {% + \def\@dtl@tmpA{#1}% + }% + {% + \def\@dtl@tmpA{{#1}}% + }% \ifx\@dtl@tmpB\@nnil \def\@dtl@dotrim{}% - \def\@dtl@trmstr{#1}% + \let\@dtl@trmstr\@dtl@tmpA \else - \def\@dtl@dotrim{\@dtl@trim#1#2}% + \edef\@dtl@dotrim{\noexpand\@dtl@trim + \expandonce\@dtl@tmpA\expandonce\@dtl@tmpB}% \fi \fi \@dtl@dotrim |