summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/datatool
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/source/latex/datatool
parent43acef71933c2d1bbe6f685b4a7896db35cdfb39 (diff)
datatool (11jul15)
git-svn-id: svn://tug.org/texlive/trunk@37837 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/datatool')
-rw-r--r--Master/texmf-dist/source/latex/datatool/datatool.dtx162
-rw-r--r--Master/texmf-dist/source/latex/datatool/datatool.ins4
2 files changed, 109 insertions, 57 deletions
diff --git a/Master/texmf-dist/source/latex/datatool/datatool.dtx b/Master/texmf-dist/source/latex/datatool/datatool.dtx
index 5a7334aacf8..23268df6614 100644
--- a/Master/texmf-dist/source/latex/datatool/datatool.dtx
+++ b/Master/texmf-dist/source/latex/datatool/datatool.dtx
@@ -1,9 +1,12 @@
%\iffalse
% datatool.dtx generated using makedtx version 1.1 (c) Nicola Talbot
% Command line args:
+% -doc "datatool-manual.tex"
+% -codetitle ""
+% -comment "databib\.bst"
% -macrocode "databib\.bst"
+% -author "Nicola Talbot"
% -setambles "databib\.bst=>\nopreamble\nopostamble"
-% -comment "databib\.bst"
% -src "datatool-base.sty\Z=>datatool-base.sty"
% -src "datatool-fp.sty\Z=>datatool-fp.sty"
% -src "datatool-pgfmath.sty\Z=>datatool-pgfmath.sty"
@@ -15,11 +18,8 @@
% -src "dataplot.sty\Z=>dataplot.sty"
% -src "person.sty\Z=>person.sty"
% -src "databib.bst\Z=>databib.bst"
-% -doc "datatool-manual.tex"
-% -author "Nicola Talbot"
-% -codetitle ""
% datatool
-% Created on 2014/6/10 11:44
+% Created on 2015/7/11 16:07
%\fi
%\iffalse
%<*package>
@@ -42,7 +42,7 @@
%\fi
% \iffalse
% Doc-Source file to use with LaTeX2e
-% Copyright (C) 2014 Nicola Talbot, all rights reserved.
+% Copyright (C) 2015 Nicola Talbot, all rights reserved.
% \fi
% \iffalse
%<*driver>
@@ -66,7 +66,7 @@ datatool.dtx
\doxitem{Counter}{counter}{counters}
\doxitem{Option}{option}{package options}
-\CheckSum{23135}
+\CheckSum{23161}
\RecordChanges
\PageIndex
@@ -79,11 +79,11 @@ datatool.dtx
%\fi
%\MakeShortVerb{"}
%
-%\title{Documented Code for datatool v2.22}
+%\title{Documented Code for datatool v2.23}
%\author{Nicola L. C. Talbot\\
%\url{http://www.dickimaw-books.com/}}
%
-%\date{2014-06-10}
+%\date{2015-07-11}
%\maketitle
%
%\pagenumbering{roman}
@@ -117,7 +117,7 @@ datatool.dtx
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-base}[2014/06/10 v2.22 (NLCT)]
+\ProvidesPackage{datatool-base}[2015/07/11 v2.23 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -2802,10 +2802,10 @@ datatool.dtx
{%
\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}{%
@@ -2881,15 +2881,16 @@ datatool.dtx
%\begin{macro}{\dtl@getfirst}
% Gets the first object, and stores in \cs{dtl@first}. The remainder
% is stored in \cs{dtl@rest}.
+%\changes{2.23}{2015-07-11}{changed \cs{end} to \cs{end@dtl@getfirst}}
% \begin{macrocode}
-\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}%
}%
}
% \end{macrocode}
@@ -3042,10 +3043,10 @@ datatool.dtx
% \end{macrocode}
% Get the first object and the remaining text.
% \begin{macrocode}
- \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
% \end{macrocode}
@@ -4032,14 +4033,18 @@ datatool.dtx
\dtl@donext
}
\newcommand*{\@dtl@testifsubstring}[2]{%
- \def\@dtl@argA{#1}%
- \def\@dtl@argB{#2}%
- \ifdefempty{\@dtl@argB}%
+% \end{macrocode}
+%\changes{2.23}{2015-07-11}{bug fix: temp control sequences clash with
+%\cs{@dtl@teststartswith}}
+% \begin{macrocode}
+ \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
}%
@@ -4047,12 +4052,14 @@ datatool.dtx
\@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
@@ -4128,13 +4135,13 @@ datatool.dtx
\@dtl@conditiontrue
}%
{%
- \expandafter\dtl@getfirst\@dtl@argA\end
+ \expandafter\dtl@getfirst\@dtl@argA\end@dtl@getfirst
% \end{macrocode}
% Get the first object and the remaining text.
% \begin{macrocode}
\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
% \end{macrocode}
@@ -4633,6 +4640,26 @@ datatool.dtx
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\DTLisinlist}
+% Tests if first argument starts with second argument.
+%\changes{2.23}{2015-07-11}{new}
+% \begin{macrocode}
+\newcommand*{\DTLisinlist}[2]{%
+ \TE@throw\noexpand\dtl@testinlist{#1}{#2}%
+ \noexpand\if@dtl@condition
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\dtl@testinlist}
+%\changes{2.23}{2015-07-11}{new}
+% \begin{macrocode}
+\newcommand*{\dtl@testinlist}[2]{%
+ \DTLifinlist{#1}{#2}{\@dtl@conditiontrue}{\@dtl@conditionfalse}%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\dtl@testnumclosedbetween}
% Command to test if first number lies between second and third
% numbers. (End points included, all arguments are fixed point
@@ -5205,7 +5232,7 @@ datatool.dtx
% Definitions of fixed-point commands that use the \sty{fp} package.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-fp}[2013/08/29 v2.17 (NLCT)]
+\ProvidesPackage{datatool-fp}[2015/07/11 v2.23 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -5494,7 +5521,7 @@ datatool.dtx
% Definitions of fixed-point commands that use the \sty{pgfmath} package.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-pgfmath}[2013/08/29 v2.17 (NLCT)]
+\ProvidesPackage{datatool-pgfmath}[2015/07/11 v2.23 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -5751,7 +5778,7 @@ datatool.dtx
%\section{Package Declaration}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool}[2014/06/10 v2.22 (NLCT)]
+\ProvidesPackage{datatool}[2015/07/11 v2.23 (NLCT)]
% \end{macrocode}
% Load required packages:
% \begin{macrocode}
@@ -5762,9 +5789,7 @@ datatool.dtx
\RequirePackage{etoolbox}
% \end{macrocode}
%\changes{2.0}{2009 February 27}{added etex as a required package}
-% \begin{macrocode}
-\RequirePackage{etex}
-% \end{macrocode}
+%\changes{??}{??}{removed etex as a required package}
%
%\section{Package Options}
%\begin{macro}{\@dtl@separator}
@@ -5789,17 +5814,26 @@ datatool.dtx
}
% \end{macrocode}
%\end{macro}
+\begingroup
+\catcode`\^^I12
%\begin{macro}{\DTLsettabseparator}
%\cs{DTLsettabseparator} makes it easier to set a tab separator.
%\changes{2.10}{2012-07-18}{changed tab character to
%\texttt{\textasciicircum\textasciicircum I}}
% \begin{macrocode}
-\begingroup
-\catcode`\^^I12
\gdef\DTLsettabseparator{%
\catcode`\^^I12
\DTLsetseparator{^^I}%
}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\DTLmaketabspace}
+%\changes{2.23}{2015-07-11}{restores tab catcode to 10}
+% \begin{macrocode}
+\gdef\DTLmaketabspace{%
+ \catcode`\^^I10\relax
+}
\endgroup
% \end{macrocode}
%\end{macro}
@@ -11390,9 +11424,11 @@ datatool.dtx
%
%\begin{macro}{\@DTLsort}
% Unstarred (case sensitive) version.
+%\changes{2.23}{2015-07-11}{bug fix: replaced \cs{dtlicompare} with
+%\cs{dtlcompare}}
% \begin{macrocode}
\newcommand{\@DTLsort}[3][]{%
- \dtlsort[#1]{#2}{#3}{\dtlicompare}%
+ \dtlsort[#1]{#2}{#3}{\dtlcompare}%
}
% \end{macrocode}
%\end{macro}
@@ -12279,12 +12315,6 @@ datatool.dtx
% \begin{macrocode}
{%
% \end{macrocode}
-% \TeX\ automatically breaks the line every 80 characters when
-% writing to a file. This may break a control sequence. This is a
-% patch that puts the row and column markers on a new line.
-% (Problems may still occur if the database contains very long
-% entries, in which case try loading \sty{morewrites} before
-% \sty{datatool}.)
% \begin{macrocode}
\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}%
@@ -13110,17 +13140,33 @@ datatool.dtx
% Start trimming
%\changes{2.10}{2012-07-18}{added check in the event there's no
%trailing space}
+%\changes{2.23}{2015-07-11}{fixed bug in the event that either argument is
+%in a group}
% \begin{macrocode}
\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
@@ -13325,7 +13371,7 @@ datatool.dtx
% Declare package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datagidx}[2014/01/17 v2.19 (NLCT)]
+\ProvidesPackage{datagidx}[2015/07/11 v2.23 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -19234,7 +19280,7 @@ datatool.dtx
%\section{Package Declaration}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{databib}[2014/06/10 v2.22 (NLCT)]
+\ProvidesPackage{databib}[2015/07/11 v2.23 (NLCT)]
% \end{macrocode}
% Load required packages:
% \begin{macrocode}
@@ -22157,7 +22203,7 @@ already exists}{}}}}
% Declare package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{databar}[2013/06/28 v2.14 (NLCT)]
+\ProvidesPackage{databar}[2015/07/11 v2.23 (NLCT)]
% \end{macrocode}
% Require \sty{xkeyval} package
% \begin{macrocode}
@@ -23464,7 +23510,7 @@ already exists}{}}}}
% Declare package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datapie}[2013/06/28 v2.14 (NLCT)]
+\ProvidesPackage{datapie}[2015/07/11 v2.23 (NLCT)]
% \end{macrocode}
% Require \sty{xkeyval} package
% \begin{macrocode}
@@ -24169,7 +24215,7 @@ Try #2-#1 instead of #1-#2}%
% Declare package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{dataplot}[2013/06/28 v2.14 (NLCT)]
+\ProvidesPackage{dataplot}[2015/07/11 v2.23 (NLCT)]
% \end{macrocode}
% Required packages
% \begin{macrocode}
@@ -25791,7 +25837,7 @@ east,southeast,south,southwest,west,northwest}[northeast]{%
% Package identification:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{person}[2013/06/28 v2.14 (NLCT)]
+\ProvidesPackage{person}[2015/07/11 v2.23 (NLCT)]
% \end{macrocode}
% Requires the \sty{ifthen} package.
% \begin{macrocode}
@@ -26018,11 +26064,12 @@ east,southeast,south,southwest,west,northwest}[northeast]{%
%\begin{macro}{\ifmale}
% If the person given by the label in the first argument is male,
% do the second argument, otherwise do the third argument.
+%\changes{2.23}{2015-07-11}{bug fix: replaced \cs{@thisperson} with \#1}
% \begin{macrocode}
\newcommand{\ifmale}[3]{%
\ifpersonexists{#1}%
{%
- \edef\@gender{\csname person@\@thisperson @gender\endcsname}%
+ \edef\@gender{\csname person@#1@gender\endcsname}%
\ifx\@gender\@male@label
#2%
\else
@@ -26068,11 +26115,12 @@ east,southeast,south,southwest,west,northwest}[northeast]{%
%\begin{macro}{\iffemale}
% If the person given by the label in the first argument is female,
% do the second argument, otherwise do the third argument.
+%\changes{2.23}{2015-07-11}{bug fix: replaced \cs{@thisperson} with \#1}
% \begin{macrocode}
\newcommand{\iffemale}[3]{%
\ifpersonexists{#1}%
{%
- \edef\@gender{\csname person@\@thisperson @gender\endcsname}%
+ \edef\@gender{\csname person@#1@gender\endcsname}%
\ifx\@gender\@female@label
#2%
\else
@@ -26849,9 +26897,11 @@ east,southeast,south,southwest,west,northwest}[northeast]{%
%\begin{macro}{\persongender}
% Displays the given person's gender (\cs{malename} or
% \cs{femalename}).
+%\changes{2.23}{2015-07-11}{bug fix: replaced \cs{ifpersonmale} with
+%\cs{ifmale}}
% \begin{macrocode}
\newcommand*{\persongender}[1]{%
- \ifpersonmale{#1}{\malename}{\femalename}%
+ \ifmale{#1}{\malename}{\femalename}%
}
% \end{macrocode}
%\end{macro}
@@ -26861,9 +26911,11 @@ east,southeast,south,southwest,west,northwest}[northeast]{%
%\begin{macro}{\getpersongender}
% Gets person's gender and stores in first argument which must be
% a control sequence.
+%\changes{2.23}{2015-07-11}{bug fix: replaced \cs{ifpersonmale} with
+%\cs{ifmale}}
% \begin{macrocode}
\newcommand*{\getpersongender}[2]{%
- \ifpersonmale{#2}{\let#1\malename}{\let#1\femalename}%
+ \ifmale{#2}{\let#1\malename}{\let#1\femalename}%
}
% \end{macrocode}
%\end{macro}
diff --git a/Master/texmf-dist/source/latex/datatool/datatool.ins b/Master/texmf-dist/source/latex/datatool/datatool.ins
index 610221b9a3e..74541b91fe8 100644
--- a/Master/texmf-dist/source/latex/datatool/datatool.ins
+++ b/Master/texmf-dist/source/latex/datatool/datatool.ins
@@ -1,10 +1,10 @@
-% datatool.ins generated using makedtx version 1.1 2014/6/10 11:44
+% datatool.ins generated using makedtx version 1.1 2015/7/11 16:07
\input docstrip
\preamble
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