summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/datatool/datatool-base.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-07-11 22:20:47 +0000
committerKarl Berry <karl@freefriends.org>2015-07-11 22:20:47 +0000
commit169f36cf85710819b29b10a3f1f2943b6282b437 (patch)
treef374cf937ca51a171d9f43275e5667b7e89a3b95 /Master/texmf-dist/tex/latex/datatool/datatool-base.sty
parent43acef71933c2d1bbe6f685b4a7896db35cdfb39 (diff)
datatool (11jul15)
git-svn-id: svn://tug.org/texlive/trunk@37837 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/datatool/datatool-base.sty')
-rw-r--r--Master/texmf-dist/tex/latex/datatool/datatool-base.sty45
1 files changed, 27 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/latex/datatool/datatool-base.sty b/Master/texmf-dist/tex/latex/datatool/datatool-base.sty
index 14eb1f27055..37df89e72d3 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 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,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-base}[2014/06/10 v2.22 (NLCT)]
+\ProvidesPackage{datatool-base}[2015/07/11 v2.23 (NLCT)]
\RequirePackage{etoolbox}
\RequirePackage{amsmath}
\RequirePackage{xkeyval}
@@ -1503,10 +1503,10 @@
{%
\DTLsubstituteall{\@dtl@argA}{ }{\space }%
\DTLsubstituteall{\@dtl@argB}{ }{\space }%
- \expandafter\dtl@getfirst\@dtl@argA\end
+ \expandafter\dtl@getfirst\@dtl@argA\end@dtl@getfirst
\let\dtl@firstA=\dtl@first
\let\dtl@restA=\dtl@rest
- \expandafter\dtl@getfirst\@dtl@argB\end
+ \expandafter\dtl@getfirst\@dtl@argB\end@dtl@getfirst
\let\dtl@firstB=\dtl@first
\let\dtl@restB=\dtl@rest
\expandafter\dtl@ifsingle\expandafter{\dtl@firstA}{%
@@ -1577,14 +1577,14 @@
}%
}%
}
-\def\dtl@getfirst#1#2\end{%
+\def\dtl@getfirst#1#2\end@dtl@getfirst{%
\def\dtl@first{#1}%
\ifdefempty{\dtl@first}%
{%
\def\dtl@rest{#2}%
}%
{%
- \dtl@ifsingle{#1}{\def\dtl@rest{#2}}{\dtl@getfirst#1#2\end}%
+ \dtl@ifsingle{#1}{\def\dtl@rest{#2}}{\dtl@getfirst#1#2\end@dtl@getfirst}%
}%
}
\newcount\dtl@codeA
@@ -1649,10 +1649,10 @@
\let\@dtl@argA\dtl@string
\dtl@setwordbreaksnohyphens{\@dtl@argB}{\@dtl@wordbreak}%
\let\@dtl@argB\dtl@string
- \expandafter\dtl@getfirst\@dtl@argA\end
+ \expandafter\dtl@getfirst\@dtl@argA\end@dtl@getfirst
\let\dtl@firstA=\dtl@first
\let\dtl@restA=\dtl@rest
- \expandafter\dtl@getfirst\@dtl@argB\end
+ \expandafter\dtl@getfirst\@dtl@argB\end@dtl@getfirst
\let\dtl@firstB=\dtl@first
\let\dtl@restB=\dtl@rest
\expandafter\dtl@ifsingle\expandafter{\dtl@firstA}%
@@ -2210,14 +2210,14 @@
\dtl@donext
}
\newcommand*{\@dtl@testifsubstring}[2]{%
- \def\@dtl@argA{#1}%
- \def\@dtl@argB{#2}%
- \ifdefempty{\@dtl@argB}%
+ \def\@dtl@subs@argA{#1}%
+ \def\@dtl@subs@argB{#2}%
+ \ifdefempty{\@dtl@subs@argB}%
{%
\@dtl@conditiontrue
}%
{%
- \ifdefempty{\@dtl@argA}%
+ \ifdefempty{\@dtl@subs@argA}%
{%
\@dtl@conditionfalse
}%
@@ -2225,12 +2225,14 @@
\@dtl@teststartswith{#1}{#2}%
\if@dtl@condition
\else
- \expandafter\dtl@getfirst\@dtl@argA\end
- \expandafter\dtl@ifsingle\expandafter{\dtl@first}{%
+ \dtl@getfirst#1\end@dtl@getfirst
+ \expandafter\dtl@ifsingle\expandafter{\dtl@first}%
+ {%
\expandafter\@dtl@testifsubstring\expandafter{\dtl@rest}{#2}%
- }{%
+ }%
+ {%
\protected@edef\@dtl@donext{\noexpand\@dtl@testifsubstring
- {\expandonce\dtl@first\expandonce\dtl@rest}{\expandonce\@dtl@argB}}%
+ {\expandonce\dtl@first\expandonce\dtl@rest}{\expandonce\@dtl@subs@argB}}%
\@dtl@donext
}%
\fi
@@ -2278,10 +2280,10 @@
\@dtl@conditiontrue
}%
{%
- \expandafter\dtl@getfirst\@dtl@argA\end
+ \expandafter\dtl@getfirst\@dtl@argA\end@dtl@getfirst
\let\dtl@firstA=\dtl@first
\let\dtl@restA=\dtl@rest
- \expandafter\dtl@getfirst\@dtl@argB\end
+ \expandafter\dtl@getfirst\@dtl@argB\end@dtl@getfirst
\let\dtl@firstB=\dtl@first
\let\dtl@restB=\dtl@rest
\expandafter\dtl@ifsingle\expandafter{\dtl@firstA}%
@@ -2551,6 +2553,13 @@
\TE@throw\noexpand\dtl@teststartswith{#1}{#2}%
\noexpand\if@dtl@condition
}
+\newcommand*{\DTLisinlist}[2]{%
+ \TE@throw\noexpand\dtl@testinlist{#1}{#2}%
+ \noexpand\if@dtl@condition
+}
+\newcommand*{\dtl@testinlist}[2]{%
+ \DTLifinlist{#1}{#2}{\@dtl@conditiontrue}{\@dtl@conditionfalse}%
+}
\newcommand*{\dtl@testnumclosedbetween}[3]{%
\DTLifnumclosedbetween{#1}{#2}{#3}%
{\@dtl@conditiontrue}{\@dtl@conditionfalse}%