summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/datatool/datatool.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/datatool/datatool.dtx')
-rw-r--r--Master/texmf-dist/source/latex/datatool/datatool.dtx171
1 files changed, 60 insertions, 111 deletions
diff --git a/Master/texmf-dist/source/latex/datatool/datatool.dtx b/Master/texmf-dist/source/latex/datatool/datatool.dtx
index d1de576df24..f6691483ac1 100644
--- a/Master/texmf-dist/source/latex/datatool/datatool.dtx
+++ b/Master/texmf-dist/source/latex/datatool/datatool.dtx
@@ -1,11 +1,6 @@
%\iffalse
% datatool.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
-% -setambles "databib\.bst=>\nopreamble\nopostamble"
-% -comment "databib\.bst"
-% -codetitle ""
-% -macrocode "databib\.bst"
-% -author "Nicola Talbot"
% -src "datatool-base.sty\Z=>datatool-base.sty"
% -src "datatool-fp.sty\Z=>datatool-fp.sty"
% -src "datatool-pgfmath.sty\Z=>datatool-pgfmath.sty"
@@ -17,9 +12,14 @@
% -src "dataplot.sty\Z=>dataplot.sty"
% -src "person.sty\Z=>person.sty"
% -src "databib.bst\Z=>databib.bst"
+% -author "Nicola Talbot"
+% -comment "databib\.bst"
% -doc "datatool-manual.tex"
+% -codetitle ""
+% -setambles "databib\.bst=>\nopreamble\nopostamble"
+% -macrocode "databib\.bst"
% datatool
-% Created on 2017/11/10 16:07
+% Created on 2017/11/12 15:47
%\fi
%\iffalse
%<*package>
@@ -68,7 +68,7 @@ datatool.dtx
\doxitem{Counter}{counter}{counters}
\doxitem{Option}{option}{package options}
-\CheckSum{23978}
+\CheckSum{23959}
\RecordChanges
\PageIndex
@@ -81,11 +81,11 @@ datatool.dtx
%\fi
%\MakeShortVerb{"}
%
-%\title{Documented Code for datatool v2.28}
+%\title{Documented Code for datatool v2.29}
%\author{Nicola L. C. Talbot\\
%\url{http://www.dickimaw-books.com/}}
%
-%\date{2017-11-10}
+%\date{2017-11-12}
%\maketitle
%
%\pagenumbering{roman}
@@ -121,7 +121,7 @@ datatool.dtx
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-base}[2017/11/10 v2.28 (NLCT)]
+\ProvidesPackage{datatool-base}[2017/11/12 v2.29 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -6008,7 +6008,7 @@ datatool.dtx
% Definitions of fixed-point commands that use the \sty{fp} package.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-fp}[2017/11/10 v2.28 (NLCT)]
+\ProvidesPackage{datatool-fp}[2017/11/12 v2.29 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -6297,7 +6297,7 @@ datatool.dtx
% Definitions of fixed-point commands that use the \sty{pgfmath} package.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-pgfmath}[2017/11/10 v2.28 (NLCT)]
+\ProvidesPackage{datatool-pgfmath}[2017/11/12 v2.29 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -6638,7 +6638,7 @@ datatool.dtx
%\section{Package Declaration}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool}[2017/11/10 v2.28 (NLCT)]
+\ProvidesPackage{datatool}[2017/11/12 v2.29 (NLCT)]
% \end{macrocode}
% Load required packages:
% \begin{macrocode}
@@ -6736,9 +6736,21 @@ datatool.dtx
\noexpand\long
\noexpand\def\noexpand\@dtl@lopoff#1##1##2\noexpand\to##3##4{%
\noexpand\ifx#2##1\noexpand\relax
- \noexpand\@dtl@qlopoff#1##1##2\noexpand\to##3##4\relax
+ \noexpand\ifstrempty{##1}%
+ {\noexpand\@dtl@qlopoff#1{}##2\noexpand\to##3##4\relax}%
+ {%
+ \noexpand\dtl@ifsingle{##1}%
+ {\noexpand\@dtl@qlopoff#1##1##2\noexpand\to##3##4\relax}%
+ {\noexpand\@dtl@qlopoff#1{##1}##2\noexpand\to##3##4\relax}%
+ }%
\noexpand\else
- \noexpand\@dtl@lop@ff#1##1##2\noexpand\to##3##4\relax
+ \noexpand\ifstrempty{##1}%
+ {\noexpand\@dtl@lop@ff#1{}##2\noexpand\to##3##4\relax}%
+ {%
+ \noexpand\dtl@ifsingle{##1}%
+ {\noexpand\@dtl@lop@ff#1##1##2\noexpand\to##3##4\relax}
+ {\noexpand\@dtl@lop@ff#1{##1}##2\noexpand\to##3##4\relax}
+ }%
\noexpand\fi
}%
}
@@ -13593,22 +13605,34 @@ datatool.dtx
% \begin{macrocode}
\newcommand*{\@dtl@readline}[2]{%
% \end{macrocode}
-% Read a line from "#1" and store in "#2"
+% Read a line from "#1" and store in "#2" but make sure end of line
+% character is removed.
+%\changes{2.29}{2017-11-12}{changed line read}
% \begin{macrocode}
- \read#1 to #2%
+ \begingroup
+ \catcode\endlinechar=\active%
+ \global\read#1 to #2%
+ \endgroup
% \end{macrocode}
-% Trim the end of line character
+%If empty the row starts with a comment
% \begin{macrocode}
- \ifdefempty{#2}%
- {%
- }%
- {%
- \dtl@trim#2%
+ \ifx#2\empty
+ \else
+ \expandafter\@dtl@stripeol#2%
+ \let#2\@dtl@strippedline
+ \fi
+}
% \end{macrocode}
-%\changes{2.13}{2013-01-15}{removed spurious space}
+%\end{macro}
+%
+%\begin{macro}{\@dtl@stripeol}
+%\changes{2.29}{2017-11-12}{new}
% \begin{macrocode}
- }%
-}
+\begingroup
+\catcode\endlinechar=\active%
+\gdef\@dtl@stripeol#1
+{\gdef\@dtl@strippedline{#1}}
+\endgroup
% \end{macrocode}
%\end{macro}
%
@@ -13625,10 +13649,6 @@ datatool.dtx
% \begin{macrocode}
\@dtl@rawread#1 to #2%
% \end{macrocode}
-% Trim the end of line character
-% \begin{macrocode}
- \dtl@trim#2%
-% \end{macrocode}
% Apply mappings
% \begin{macrocode}
\dtl@domappings\@dtl@line
@@ -14017,79 +14037,6 @@ datatool.dtx
% \end{macrocode}
%\end{macro}
%
-%\begin{macro}{\dtl@trim}
-%\begin{definition}
-%\cs{dtl@trim}\marg{line}
-%\end{definition}
-% Trims the trailing space from \meta{line}.
-%\changes{2.28}{2017-11-10}{fix bug no 123}
-% \begin{macrocode}
-\newcommand{\dtl@trim}[1]{%
- \def\@dtl@trmstr{}%
- \if#1\par
- \else
- \expandafter\@dtl@start@trim#1\@dtl@end@trim
- \fi
- \let#1=\@dtl@trmstr
-}
-% \end{macrocode}
-%\end{macro}
-%\begin{macro}{\@dtl@start@trim}
-%\changes{2.28}{2017-11-10}{new}
-% \begin{macrocode}
-\def\@dtl@start@trim#1 \@dtl@end@trim{%
- \def\@dtl@trmstr{#1}%
-}
-% \end{macrocode}
-%\end{macro}
-%
-%\begin{macro}{\@dtl@starttrim}
-% Start trimming. (No longer used as from v2.28. May be removed in
-% later versions.)
-%\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\tmpA{#1}\show\tmpA
-\def\tmpB{#2}\show\tmpB
- \dtl@ifsingle{#2}%
- {%
- \def\@dtl@tmpB{#2}%
- }%
- {%
- \def\@dtl@tmpB{{#2}}%
- }%
- \ifx\par#1%
- \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{}%
- \let\@dtl@trmstr\@dtl@tmpA
- \else
- \edef\@dtl@dotrim{\noexpand\@dtl@trim
- \expandonce\@dtl@tmpA\expandonce\@dtl@tmpB}%
- \fi
- \fi
- \@dtl@dotrim
-}
-% \end{macrocode}
-%\end{macro}
-%\begin{macro}{\@dtl@trim}
-% No longer used as from v2.28. May be removed in later versions.
-% \begin{macrocode}
-\long\def\@dtl@trim#1 \@nil{\long\def\@dtl@trmstr{#1}}
-% \end{macrocode}
-%\end{macro}
-%
%\begin{macro}{\DTLloadrawdb}
%\begin{definition}
%\cs{DTLloadrawdb}\marg{db name}\marg{filename}
@@ -14147,8 +14094,10 @@ datatool.dtx
\@dtl@activatebraces
\@dtl@doreadraw?1?2>>>
\gdef\@dtl@doreadraw?1?2<\relax
-\read?1 to \tmp
-\protected@xdef?2<\tmp>\relax
+\begingroup\catcode\endlinechar=\active\global\read?1 to \dtl@tmp\endgroup
+\expandafter\@dtl@stripeol\dtl@tmp
+\let\dtl@tmp\@dtl@strippedline
+\protected@xdef?2<\dtl@tmp>\relax
>
\endgroup
% \end{macrocode}
@@ -14283,7 +14232,7 @@ datatool.dtx
% Declare package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datagidx}[2017/11/10 v2.28 (NLCT)]
+\ProvidesPackage{datagidx}[2017/11/12 v2.29 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -20333,7 +20282,7 @@ datatool.dtx
%\section{Package Declaration}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{databib}[2017/11/10 v2.28 (NLCT)]
+\ProvidesPackage{databib}[2017/11/12 v2.29 (NLCT)]
% \end{macrocode}
% Load required packages:
% \begin{macrocode}
@@ -23256,7 +23205,7 @@ already exists}{}}}}
% Declare package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{databar}[2017/11/10 v2.28 (NLCT)]
+\ProvidesPackage{databar}[2017/11/12 v2.29 (NLCT)]
% \end{macrocode}
% Require \sty{xkeyval} package
% \begin{macrocode}
@@ -24563,7 +24512,7 @@ already exists}{}}}}
% Declare package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datapie}[2017/11/10 v2.28 (NLCT)]
+\ProvidesPackage{datapie}[2017/11/12 v2.29 (NLCT)]
% \end{macrocode}
% Require \sty{xkeyval} package
% \begin{macrocode}
@@ -25365,7 +25314,7 @@ already exists}{}}}}
% Declare package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{dataplot}[2017/11/10 v2.28 (NLCT)]
+\ProvidesPackage{dataplot}[2017/11/12 v2.29 (NLCT)]
% \end{macrocode}
% Required packages
% \begin{macrocode}
@@ -26987,7 +26936,7 @@ east,southeast,south,southwest,west,northwest}[northeast]{%
% Package identification:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{person}[2017/11/10 v2.28 (NLCT)]
+\ProvidesPackage{person}[2017/11/12 v2.29 (NLCT)]
% \end{macrocode}
% Requires the \sty{ifthen} package.
% \begin{macrocode}