texlive[41744] Master/texmf-dist: datatool (21jul16)
commits+karl at tug.org
commits+karl at tug.org
Thu Jul 21 23:17:50 CEST 2016
Revision: 41744
http://tug.org/svn/texlive?view=revision&revision=41744
Author: karl
Date: 2016-07-21 23:17:50 +0200 (Thu, 21 Jul 2016)
Log Message:
-----------
datatool (21jul16)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/datatool/CHANGES
trunk/Master/texmf-dist/doc/latex/datatool/README
trunk/Master/texmf-dist/doc/latex/datatool/datatool-code.pdf
trunk/Master/texmf-dist/doc/latex/datatool/datatool-user.pdf
trunk/Master/texmf-dist/doc/latex/datatool/datatool-user.tex
trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-autokeys.pdf
trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-barchart.pdf
trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-datatooltk.pdf
trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-dict.pdf
trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-europecv-bib.pdf
trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-gidx.pdf
trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-glossary.pdf
trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-index.pdf
trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-mail-merge.pdf
trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-piechart.pdf
trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-sort.pdf
trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-student-scores.pdf
trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-two-per-row.pdf
trunk/Master/texmf-dist/source/latex/datatool/datatool.dtx
trunk/Master/texmf-dist/source/latex/datatool/datatool.ins
trunk/Master/texmf-dist/tex/latex/datatool/databar.sty
trunk/Master/texmf-dist/tex/latex/datatool/databib.sty
trunk/Master/texmf-dist/tex/latex/datatool/datagidx.sty
trunk/Master/texmf-dist/tex/latex/datatool/datapie.sty
trunk/Master/texmf-dist/tex/latex/datatool/dataplot.sty
trunk/Master/texmf-dist/tex/latex/datatool/datatool-base.sty
trunk/Master/texmf-dist/tex/latex/datatool/datatool-fp.sty
trunk/Master/texmf-dist/tex/latex/datatool/datatool-pgfmath.sty
trunk/Master/texmf-dist/tex/latex/datatool/datatool.sty
trunk/Master/texmf-dist/tex/latex/datatool/person.sty
Modified: trunk/Master/texmf-dist/doc/latex/datatool/CHANGES
===================================================================
--- trunk/Master/texmf-dist/doc/latex/datatool/CHANGES 2016-07-21 01:10:40 UTC (rev 41743)
+++ trunk/Master/texmf-dist/doc/latex/datatool/CHANGES 2016-07-21 21:17:50 UTC (rev 41744)
@@ -1,3 +1,19 @@
+v2.26:
+
+ * datatool-base:
+
+ - fixed bug in \dtl at insertinto
+
+ * datatool-pgfmath:
+
+ - fixed bug in \dtlround and \dtltrunc
+
+ * datapie:
+
+ - fixed bug in \DTLpiechart caused by truncation error
+
+ - \FP... code replaced by \dtl... code
+
v2.25:
* datatool-base:
Modified: trunk/Master/texmf-dist/doc/latex/datatool/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/datatool/README 2016-07-21 01:10:40 UTC (rev 41743)
+++ trunk/Master/texmf-dist/doc/latex/datatool/README 2016-07-21 21:17:50 UTC (rev 41744)
@@ -1,6 +1,6 @@
-LaTeX Bundle : datatool v2.25
+LaTeX Bundle : datatool v2.26
-Last Modified : 2016-01-18
+Last Modified : 2016-07-20
Author : Nicola Talbot
Modified: trunk/Master/texmf-dist/doc/latex/datatool/datatool-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datatool/datatool-user.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datatool/datatool-user.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/datatool/datatool-user.tex 2016-07-21 01:10:40 UTC (rev 41743)
+++ trunk/Master/texmf-dist/doc/latex/datatool/datatool-user.tex 2016-07-21 21:17:50 UTC (rev 41744)
@@ -1,5 +1,7 @@
\documentclass[report,widecs]{nlctdoc}
+\DeleteShortVerb{\|}
+
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{ifthen}
@@ -46,7 +48,9 @@
\dbs\index{\string\\\actualchar\dbs\encapchar usage}%
}
+\setlength\marginparwidth{70pt}
+
%bibliography database
\DTLnewdb{docbib}
\DTLnewrow{docbib}
@@ -97,13 +101,12 @@
\setlength{\parindent}{1em}%
\MakeShortVerb{"}
-\DeleteShortVerb{\|}
- \title{User Manual for datatool bundle version~2.25}
+ \title{User Manual for datatool bundle version~2.26}
\author{Nicola L.C. Talbot\\
\url{http://www.dickimaw-books.com/}}
- \date{2016-01-18}
+ \date{2016-07-20}
\maketitle
\pagenumbering{roman}
@@ -118,7 +121,7 @@
\item[\url{datatool-code.pdf}]
Advanced users wishing to know more about the inner workings of
all the packages provided in the \styfmt{datatool} bundle should
- read \qt{Documented Code for datatool v2.25}
+ read \qt{Documented Code for datatool v2.26}
\item[INSTALL] Installation instructions.
@@ -2193,7 +2196,8 @@
\end{verbatim}
\begin{definition}[\DescribeMacro{\DTLaddentryforrow}]%
-\cs{DTLaddentryforrow}\marg{db}\marg{assign list}\marg{condition}\marg{key}\marg{value}
+\cs{DTLaddentryforrow}\marg{db}\marg{assign list}%
+\marg{condition}\marg{key}\allowbreak\marg{value}
\end{definition}
This adds the entry with the key given by \meta{key} and value
given by \meta{value} to the first row in the database
@@ -2682,10 +2686,22 @@
\end{important}
In addition to the \cs{dtl}\meta{type}"align" commands above, you
-can also modify the \env{tabular} column styles by redefining
-\DescribeMacro{\dtlbeforecols}\cs{dtlbeforecols},
-\DescribeMacro{\dtlbetweencols}\cs{dtlbetweencols} and
-\DescribeMacro{\dtlaftercols}\cs{dtlaftercols}. For example, to
+can also modify the \env{tabular} column styles by redefining the
+following three commands:
+\begin{definition}[\DescribeMacro{\dtlbeforecols}]
+\cs{dtlbeforecols}
+\end{definition}
+(before the first column)
+\begin{definition}[\DescribeMacro{\dtlbetweencols}]
+\cs{dtlbetweencols}
+\end{definition}
+(between each column) and
+\begin{definition}[\DescribeMacro{\dtlaftercols}]
+\cs{dtlaftercols}
+\end{definition}
+(after the last column).
+
+For example, to
place a vertical line before the start of the first column and
after the last column, do:
\begin{verbatim}
@@ -4039,6 +4055,8 @@
\\\firstname & \surname & \emailI & \DTLifnull{\emailII}{}{\emailII} & \DTLifnull{\regnum}{}{\regnum}}\relax
\end{tabular}
+\medskip
+
Now the missing entries are simply blank instead of containing
\emph{Missing}. This is because they're empty not null. In this
case, you may prefer to use \cs{DTLifnullorempty} instead of
@@ -4177,11 +4195,17 @@
\bfseries Assign 2 &
\bfseries Assign 3 &
\bfseries Average Mark%
-\DTLforeach{marks}{\surname=Surname,\firstname=FirstName,\average
-=Average,\assignI=Assignment 1,\assignII=Assignment 2,\assignIII
-=Assignment 3}{\\\surname
-& \firstname & \assignI & \assignII & \assignIII &
-\DTLround{\average}{\average}{2}\DTLclip{\average}\average}\relax
+\DTLforeach{marks}%
+{% assign variable
+ \surname=Surname,\firstname=FirstName,%
+ \average=Average,\assignI=Assignment 1,%
+ \assignII=Assignment 2,\assignIII=Assignment 3}%
+{% start new row
+ \\\surname & \firstname & \assignI & \assignII & \assignIII &
+ \DTLround{\average}{\average}{2}% round to 2 dp
+ \DTLclip{\average}{average}%clip unnecessary 0s
+ \average
+}\relax
\end{tabular}
\end{table}
\end{verbatim}
@@ -4208,7 +4232,7 @@
=Average,\assignI=Assignment 1,\assignII=Assignment 2,\assignIII
=Assignment 3}{\\\surname
& \firstname & \assignI & \assignII & \assignIII &
-\DTLround{\average}{\average}{2}\DTLclip{\average}\average}\relax
+\DTLround{\average}{\average}{2}\DTLclip{\average}{\average}\average}\relax
\end{tabular}
\end{table}
@@ -11059,6 +11083,9 @@
has significantly improved the time it takes to \LaTeX\ documents
containing large databases.
+\clearpage
+\phantomsection
+\addcontentsline{toc}{chapter}{\indexname}
\PrintIndex
\end{document}
Modified: trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-autokeys.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-barchart.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-datatooltk.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-dict.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-europecv-bib.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-gidx.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-glossary.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-index.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-mail-merge.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-piechart.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-sort.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-student-scores.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/datatool/samples/sample-two-per-row.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/datatool/datatool.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/datatool/datatool.dtx 2016-07-21 01:10:40 UTC (rev 41743)
+++ trunk/Master/texmf-dist/source/latex/datatool/datatool.dtx 2016-07-21 21:17:50 UTC (rev 41744)
@@ -3,7 +3,10 @@
% Command line args:
% -macrocode "databib\.bst"
% -codetitle ""
+% -comment "databib\.bst"
% -author "Nicola Talbot"
+% -setambles "databib\.bst=>\nopreamble\nopostamble"
+% -doc "datatool-manual.tex"
% -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"
-% -comment "databib\.bst"
-% -setambles "databib\.bst=>\nopreamble\nopostamble"
-% -doc "datatool-manual.tex"
% datatool
-% Created on 2016/1/18 9:48
+% Created on 2016/7/20 19:31
%\fi
%\iffalse
%<*package>
@@ -66,7 +66,7 @@
\doxitem{Counter}{counter}{counters}
\doxitem{Option}{option}{package options}
-\CheckSum{23461}
+\CheckSum{23620}
\RecordChanges
\PageIndex
@@ -79,11 +79,11 @@
%\fi
%\MakeShortVerb{"}
%
-%\title{Documented Code for datatool v2.25}
+%\title{Documented Code for datatool v2.26}
%\author{Nicola L. C. Talbot\\
%\url{http://www.dickimaw-books.com/}}
%
-%\date{2016-01-18}
+%\date{2016-07-20}
%\maketitle
%
%\pagenumbering{roman}
@@ -98,6 +98,8 @@
%\pagenumbering{arabic}
%
%\StopEventually{%
+% \clearpage\phantomsection
+% \addcontentsline{toc}{chapter}{Index}%
% \PrintIndex
% \clearpage\phantomsection
% \addcontentsline{toc}{chapter}{History}\PrintChanges
@@ -117,7 +119,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-base}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{datatool-base}[2016/07/20 v2.26 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -563,19 +565,39 @@
\def\@dtl at newsortedlist{}%
\@dtl at insertdonefalse
\@for\dtl at srtelement:=#2\do{%
+ \expandafter\DTLifSubString\expandafter{\dtl at srtelement}{,}
+ {%
+ \expandafter\toks@\expandafter{\dtl at srtelement}%
+ \edef\dtl at srtelement{{\the\toks@}}%
+ }%
+ {%
+ }
\if at dtl@insertdone
- \expandafter\toks@\expandafter{\dtl at srtelement}%
- \edef\@dtl at newstuff{{\the\toks@}}%
+ \let\@dtl at newstuff\dtl at srtelement
\else
- \expandafter#3\expandafter{\dtl at srtelement}{#1}%
- \ifnum\dtl at sortresult<0\relax
+% \end{macrocode}
+%\changes{2.26}{2016-07-20}{fixed bug (missing \cs{dtl at sortresult})}
+% \begin{macrocode}
+ \expandafter#3\expandafter\dtl at sortresult\expandafter
+ {\dtl at srtelement}{#1}%
+% \end{macrocode}
+%\changes{2.26}{2016-07-20}{fixed bug (incorrect inequality sign)}
+% \begin{macrocode}
+ \ifnum\dtl at sortresult>0\relax
+ \DTLifSubString{#1}{,}%
+ {%
+ \@dtl at toks{{#1}}%
+ }%
+ {%
+ \@dtl at toks{#1}%
+ }%
\expandafter\toks@\expandafter{\dtl at srtelement}%
- \@dtl at toks{#1}%
- \edef\@dtl at newstuff{{\the\@dtl at toks},{\the\toks@}}%
+ \edef\@dtl at newstuff{\the\@dtl at toks,\the\toks@}%
\@dtl at insertdonetrue
\else
\expandafter\toks@\expandafter{\dtl at srtelement}%
\edef\@dtl at newstuff{{\the\toks@}}%
+ \let\@dtl at newstuff\dtl at srtelement
\fi
\fi
\ifdefempty{\@dtl at newsortedlist}%
@@ -592,15 +614,27 @@
}%
\ifdefempty{\@dtl at newsortedlist}%
{%
- \@dtl at toks{#1}%
- \edef\@dtl at newsortedlist{{\the\@dtl at toks}}%
+ \DTLifSubString{#1}{,}%
+ {%
+ \@dtl at toks{{#1}}%
+ }%
+ {%
+ \@dtl at toks{#1}%
+ }%
+ \edef\@dtl at newsortedlist{\the\@dtl at toks}%
}%
{%
\if at dtl@insertdone
\else
+ \DTLifSubString{#1}{,}%
+ {%
+ \@dtl at toks{{#1}}%
+ }%
+ {%
+ \@dtl at toks{#1}%
+ }%
\expandafter\toks@\expandafter{\@dtl at newsortedlist}%
- \@dtl at toks{#1}%
- \edef\@dtl at newsortedlist{\the\toks@,{\the\@dtl at toks}}%
+ \edef\@dtl at newsortedlist{\the\toks@,\the\@dtl at toks}%
\fi
}%
\global\let#2=\@dtl at newsortedlist
@@ -725,8 +759,8 @@
\noexpand\def\noexpand\@dtl at fracpart{0}%
}%
{%
- \noexpand\@dtl at getfracpart##2\noexpand\relax
- \noexpand\@dtl at choptrailingzeroes{\noexpand\@dtl at fracpart}%
+ \noexpand\@dtl at getfracpart##2\noexpand\relax
+ \noexpand\@dtl at choptrailingzeroes{\noexpand\@dtl at fracpart}%
}%
}%
\noexpand\def\noexpand\@dtl at getfracpart##1#1\noexpand\relax{%
@@ -5761,7 +5795,7 @@
% Definitions of fixed-point commands that use the \sty{fp} package.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-fp}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{datatool-fp}[2016/07/20 v2.26 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -6050,7 +6084,7 @@
% Definitions of fixed-point commands that use the \sty{pgfmath} package.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-pgfmath}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{datatool-pgfmath}[2016/07/20 v2.26 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -6075,13 +6109,17 @@
%\end{definition}
% Does \meta{true part} if \meta{num1}=\meta{num2}, otherwise does
% \meta{false part}. The numbers must use a full stop as the decimal
-% character and no number group separator.
+% character and no number group separator. The \verb|\number0| part
+% allows an empty argument to be treated as zero. (\cs{number}
+% required to prevent a zero prefix indicating an octal number.)
%\changes{2.12}{2012/10/06}{fixed bug causing premature expansion}
+%\changes{2.26}{2016-07-20}{added \cs{number}}
% \begin{macrocode}
\newcommand*{\dtlifnumeq}[4]{%
\def\@dtl at truepart{#3}%
\def\@dtl at falsepart{#4}%
- \pgfmathifthenelse{0#1==0#2}{"\noexpand\@dtl at truepart"}{"\noexpand\@dtl at falsepart"}%
+ \pgfmathifthenelse{\number0#1==\number0#2}%
+ {"\noexpand\@dtl at truepart"}{"\noexpand\@dtl at falsepart"}%
\pgfmathresult
}
% \end{macrocode}
@@ -6102,11 +6140,13 @@
% \meta{false part}. The numbers must use a full stop as the decimal
% character and no number group separator.
%\changes{2.12}{2012/10/06}{fixed bug causing premature expansion}
+%\changes{2.26}{2016-07-20}{added \cs{number}}
% \begin{macrocode}
\newcommand*{\dtlifnumlt}[4]{%
\def\@dtl at truepart{#3}%
\def\@dtl at falsepart{#4}%
- \pgfmathifthenelse{0#1 < 0#2}{"\noexpand\@dtl at truepart"}{"\noexpand\@dtl at falsepart"}%
+ \pgfmathifthenelse{\number0#1 < \number0#2}%
+ {"\noexpand\@dtl at truepart"}{"\noexpand\@dtl at falsepart"}%
\pgfmathresult
}
% \end{macrocode}
@@ -6121,11 +6161,13 @@
% \meta{false part}. The numbers must use a full stop as the decimal
% character and no number group separator.
%\changes{2.12}{2012/10/06}{fixed bug causing premature expansion}
+%\changes{2.26}{2016-07-20}{added \cs{number}}
% \begin{macrocode}
\newcommand*{\dtlifnumgt}[4]{%
\def\@dtl at truepart{#3}%
\def\@dtl at falsepart{#4}%
- \pgfmathifthenelse{0#1 > 0#2}{"\noexpand\@dtl at truepart"}{"\noexpand\@dtl at falsepart"}%
+ \pgfmathifthenelse{\number0#1 > \number0#2}%
+ {"\noexpand\@dtl at truepart"}{"\noexpand\@dtl at falsepart"}%
\pgfmathresult
}
% \end{macrocode}
@@ -6138,11 +6180,13 @@
% Determines if \meta{min} $<$ \meta{num} $<$ \meta{max} where
% all numerical arguments are in standard fixed point notation.
%\changes{2.12}{2012/10/06}{fixed bug causing premature expansion}
+%\changes{2.26}{2016-07-20}{added \cs{number}}
% \begin{macrocode}
\newcommand*{\dtlifnumopenbetween}[5]{%
\def\@dtl at truepart{#4}%
\def\@dtl at falsepart{#5}%
- \pgfmathifthenelse{(0#2 < 0#1) && (0#1 < 0#3)}
+ \pgfmathifthenelse
+ {(\number0#2 < \number0#1) && (\number0#1 < \number0#3)}%
{"\noexpand\@dtl at truepart"}{"\noexpand\@dtl at falsepart"}%
\pgfmathresult
}
@@ -6156,11 +6200,13 @@
% Determines if \meta{min} $\leq$ \meta{num} $\leq$ \meta{max} where
% all numerical arguments are in standard fixed point notation.
%\changes{2.12}{2012/10/06}{fixed bug causing premature expansion}
+%\changes{2.26}{2016-07-20}{added \cs{number}}
% \begin{macrocode}
\newcommand*{\dtlifnumclosedbetween}[5]{%
\def\@dtl at truepart{#4}%
\def\@dtl at falsepart{#5}%
- \pgfmathifthenelse{(0#2 <= #1) && (0#1 <= 0#3)}
+ \pgfmathifthenelse
+ {(\number0#2 <= \number0#1) && (\number0#1 <= \number0#3)}
{"\noexpand\@dtl at truepart"}{"\noexpand\@dtl at falsepart"}%
\pgfmathresult
}
@@ -6220,25 +6266,97 @@
%
%\begin{macro}{\dtlround}
% Rounds using PGF math engine.
+%\changes{2.26}{2016-07-20}{fixed bug cause by rounding}
% \begin{macrocode}
\newcommand*{\dtlround}[3]{%
- \pgfmathparse{10^#3}%
- \let\dtl at tmpshift\pgfmathresult
- \pgfmathparse{round(#2 * \dtl at tmpshift) / \dtl at tmpshift}%
- \let#1\pgfmathresult
+ \ifnum#3=0\relax
+ \pgfmathparse{int(round(#2))}%
+ \let#1\pgfmathresult
+ \else
+ \pgfmathparse{int(10^#3)}%
+ \let\dtl at tmpshift\pgfmathresult
+% \end{macrocode}
+%Need to be careful not to trigger the dimension too large error,
+%so this is a bit convoluted.
+% \begin{macrocode}
+ \pgfmathparse{int(floor(#2))}%
+ \let\dtl at int@round\pgfmathresult
+ \pgfmathparse{int(round((#2-\dtl at int@round) * \dtl at tmpshift))}%
+% \end{macrocode}
+%\changes{2.26}{2016-07-20}{fixed bug caused by rounding errors}
+% This bit is awkward because simply dividing by multiples
+% of 10 in pgfmath can cause rounding errors, so need to
+% employ another method.
+% \begin{macrocode}
+ \@dtl at tmpcount=0\relax
+ \expandafter\@dtl at countdigits\pgfmathresult.\relax
+ \advance\@dtl at tmpcount by -#3\relax
+ \def\@dtl at intpart{}%
+ \def\@dtl at fracpart{}%
+ \expandafter\@dtl at gatherintfrac\pgfmathresult\relax
+ \edef\@dtl at intpart{\number\numexpr\dtl at int@round
+ +\number0\@dtl at intpart}%
+ \edef#1{\@dtl at intpart.\@dtl at fracpart}%
+ \fi
}
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\@dtl at gatherintfrac}
+%\changes{2.26}{2016-07-20}{new}
+% \begin{macrocode}
+\newcommand*{\@dtl at gatherintfrac}[1]{%
+ \ifx\relax#1\relax
+ \else
+ \advance\@dtl at tmpcount by -1\relax
+ \ifnum\@dtl at tmpcount<0\relax
+ \edef\@dtl at fracpart{\@dtl at fracpart#1}%
+ \else
+ \edef\@dtl at intpart{\@dtl at intpart#1}%
+ \fi
+ \expandafter\@dtl at gatherintfrac
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\dtltrunc}
% Truncates using PGF math engine.
% (Third argument is the number of digits.)
+%\changes{2.26}{2016-07-20}{new}
+%This suffers from the same problems as \cs{dtlround}. Can
+% cause dimension too large error or rounding errors.
% \begin{macrocode}
\newcommand*{\dtltrunc}[3]{%
- \pgfmathparse{10^#3}%
- \let\dtl at tmpshift\pgfmathresult
- \pgfmathparse{floor(#2 * \dtl at tmpshift) / \dtl at tmpshift}%
- \let#1\pgfmathresult
+ \ifnum#3=0\relax
+ \pgfmathparse{int(floor(#2))}%
+ \let#1\pgfmathresult
+ \else
+ \pgfmathparse{int(10^#3)}%
+ \let\dtl at tmpshift\pgfmathresult
+% \end{macrocode}
+%Need to be careful not to trigger the dimension too large error,
+%so this is a bit convoluted.
+% \begin{macrocode}
+ \pgfmathparse{int(floor(#2))}%
+ \let\dtl at int@trunc\pgfmathresult
+ \pgfmathparse{int(floor((#2-\dtl at int@trunc) * \dtl at tmpshift))}%
+% \end{macrocode}
+%\changes{2.26}{2016-07-20}{fixed bug caused by rounding errors}
+% This bit is awkward because simply dividing by multiples
+% of 10 in pgfmath can cause rounding errors, so need to
+% employ another method.
+% \begin{macrocode}
+ \@dtl at tmpcount=0\relax
+ \expandafter\@dtl at countdigits\pgfmathresult.\relax
+ \advance\@dtl at tmpcount by -#3\relax
+ \def\@dtl at intpart{}%
+ \def\@dtl at fracpart{}%
+ \expandafter\@dtl at gatherintfrac\pgfmathresult\relax
+ \edef\@dtl at intpart{\number\numexpr\dtl at int@trunc
+ +\number0\@dtl at intpart}%
+ \edef#1{\@dtl at intpart.\@dtl at fracpart}%
+ \fi
}
% \end{macrocode}
%\end{macro}
@@ -6307,7 +6425,7 @@
%\section{Package Declaration}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{datatool}[2016/07/20 v2.26 (NLCT)]
% \end{macrocode}
% Load required packages:
% \begin{macrocode}
@@ -6318,7 +6436,7 @@
\RequirePackage{etoolbox}
% \end{macrocode}
%\changes{2.0}{2009 February 27}{added etex as a required package}
-%\changes{??}{??}{removed etex as a required package}
+%\changes{2.23}{2015-07-11}{removed etex as a required package}
%
%\section{Package Options}
%\begin{macro}{\@dtl at separator}
@@ -13900,7 +14018,7 @@
% Declare package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datagidx}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{datagidx}[2016/07/20 v2.26 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -19809,7 +19927,7 @@
%\section{Package Declaration}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{databib}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{databib}[2016/07/20 v2.26 (NLCT)]
% \end{macrocode}
% Load required packages:
% \begin{macrocode}
@@ -22732,7 +22850,7 @@
% Declare package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{databar}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{databar}[2016/07/20 v2.26 (NLCT)]
% \end{macrocode}
% Require \sty{xkeyval} package
% \begin{macrocode}
@@ -23282,23 +23400,23 @@
\fi
}%
\else
-% \@for\dtl at thislabel:=\dtlbar at yticlabels\do{%
-% \ifDTLverticalbars
-% \settowidth{\dtl at tmplength}{%
-% \DTLbardisplayYticklabel{\dtl at thislabel}}%
-% \else
-% \settoheight{\dtl at tmplength}{%
-% \DTLbardisplayYticklabel{\dtl at thislabel}}%
-% \edef\@dtl at h{\the\dtl at tmplength}%
-% \settodepth{\dtl at tmplength}{%
-% \DTLbardisplayYticklabel{\dtl at thislabel}}%
-% \addtolength{\dtl at tmplength}{\@dtl at h}%
-% \addtolength{\dtl at tmplength}{\baselineskip}%
-% \fi
-% \ifdim\dtl at tmplength>\dtl at yticlabelwidth
-% \setlength{\dtl at yticlabelwidth}{\dtl at tmplength}%
-% \fi
-% }%
+ \@for\dtl at thislabel:=\dtlbar at yticlabels\do{%
+ \ifDTLverticalbars
+ \settowidth{\dtl at tmplength}{%
+ \DTLbardisplayYticklabel{\dtl at thislabel}}%
+ \else
+ \settoheight{\dtl at tmplength}{%
+ \DTLbardisplayYticklabel{\dtl at thislabel}}%
+ \edef\@dtl at h{\the\dtl at tmplength}%
+ \settodepth{\dtl at tmplength}{%
+ \DTLbardisplayYticklabel{\dtl at thislabel}}%
+ \addtolength{\dtl at tmplength}{\@dtl at h}%
+ \addtolength{\dtl at tmplength}{\baselineskip}%
+ \fi
+ \ifdim\dtl at tmplength>\dtl at yticlabelwidth
+ \setlength{\dtl at yticlabelwidth}{\dtl at tmplength}%
+ \fi
+ }%
\fi
\fi
\fi
@@ -24039,7 +24157,7 @@
% Declare package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datapie}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{datapie}[2016/07/20 v2.26 (NLCT)]
% \end{macrocode}
% Require \sty{xkeyval} package
% \begin{macrocode}
@@ -24401,6 +24519,7 @@
% include \texttt{variable}\texttt{=}\meta{cmd}, where \meta{cmd}
% is included in \meta{assign list}. The optional argument
% \meta{conditions} is the same as that for \cs{DTLforeach}.
+%\changes{2.26}{2016-07-20}{replaced fp commands}
% \begin{macrocode}
\newcommand*{\DTLpiechart}[4][\boolean{true}]{%
\bgroup
@@ -24420,7 +24539,7 @@
\let\dtl at oldtotal=\dtl at total
\expandafter\DTLconverttodecimal\expandafter
{\DTLpievariable}{\dtl at variable}%
- \FPadd{\dtl at total}{\dtl at variable}{\dtl at total}%
+ \dtladd{\dtl at total}{\dtl at variable}{\dtl at total}%
}%
% \end{macrocode}
% Compute the angles
@@ -24430,17 +24549,17 @@
\@sDTLforeach[#1]{#3}{#4}{%
\expandafter\DTLconverttodecimal\expandafter
{\DTLpievariable}{\dtl at variable}%
- \dtl at computeangles{%
- \csname c at DTLrow\romannumeral\dtlforeachlevel\endcsname}{%
- \dtl at variable}%
+ \dtl at computeangles
+ {\csname c at DTLrow\romannumeral\dtlforeachlevel\endcsname}%
+ {\dtl at variable}%
\expandafter\@dtl at seg\expandafter=
- \csname c at DTLrow\romannumeral\dtlforeachlevel\endcsname%
- \FPmul{\dtl at tmp}{\dtl at variable}{100}%
+ \csname c at DTLrow\romannumeral\dtlforeachlevel\endcsname%
+ \dtlmul{\dtl at tmp}{\dtl at variable}{100}%
\let\dtl at old=\dtl at tmp
- \FPdiv{\dtl at tmp}{\dtl at old}{\dtl at total}%
- \expandafter\FPround
- \csname dtl at piepercent@\romannumeral\@dtl at seg\endcsname\dtl at tmp
- \c at DTLpieroundvar
+ \dtldiv{\dtl at tmp}{\dtl at old}{\dtl at total}%
+ \expandafter\dtlround
+ \csname dtl at piepercent@\romannumeral\@dtl at seg\endcsname\dtl at tmp
+ \c at DTLpieroundvar
}%
% \end{macrocode}
% Compute the offsets for each cut away segment
@@ -24477,7 +24596,7 @@
% \end{macrocode}
% Compute the end angle
% \begin{macrocode}
- \FPadd{\dtl at endangle}{\dtl at start}{\dtl at extent}%
+ \dtladd{\dtl at endangle}{\dtl at start}{\dtl at extent}%
% \end{macrocode}
% Compute the shift.
% \begin{macrocode}
@@ -24486,7 +24605,7 @@
\let\dtl at old=\dtl at angle
\dtl at truncatedecimal\dtl at angle
\ifnum\dtl at angle>180\relax
- \FPsub{\dtl at angle}{\dtl at old}{360}%
+ \dtlsub{\dtl at angle}{\dtl at old}{360}%
\dtl at truncatedecimal\dtl at angle
\fi
\edef\dtl at cutlen{%
@@ -24496,14 +24615,16 @@
% \end{macrocode}
% Compute the mid way angle.
% \begin{macrocode}
- \FPmul{\dtl at angle}{\dtl at extent}{0.5}%
- \FPadd{\dtl at midangle}{\dtl at angle}{\dtl at start}%
+ \dtlmul{\dtl at angle}{\dtl at extent}{0.5}%
+ \dtladd{\dtl at midangle}{\dtl at angle}{\dtl at start}%
% \end{macrocode}
% Draw the segment.
% \begin{macrocode}
\begin{scope}[shift={\@dtl at shift}]%
- \dtl at truncatedecimal\dtl at start
- \dtl at truncatedecimal\dtl at endangle
+% \end{macrocode}
+%\changes{2.26}{2016-07-20}{removed truncation (caused minor gap between
+%first and last segments)}
+% \begin{macrocode}
\fill[color=\DTLgetpiesegmentcolor\@dtl at seg] (0,0) --
(\dtl at start:\DTLradius)
arc (\dtl at start:\dtl at endangle:\DTLradius) -- cycle;
@@ -24527,11 +24648,20 @@
% \end{macrocode}
% If the mid way angle is between 90 and 270, the text will look
% upside-down, so adjust accordingly.
+%\changes{2.26}{2016-07-20}{replaced \cs{ifthen}}
% \begin{macrocode}
- \ifthenelse{\(\dtl at midangle > 90 \and \dtl at midangle < 270\)
- \TE at or \dtl at midangle < -90}%
+ \dtlifnumopenbetween{\dtl at midangle}{90}{270}%
{%
- \FPsub{\dtl at labelangle}{\dtl at midangle}{180}%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \dtlifnumlt{\dtl at midangle}{-90}%
+ {\let\@dtl at next\@firstoftwo}%
+ {\let\@dtl at next\@secondoftwo}%
+ }%
+ \@dtl at next
+ {%
+ \dtlsub{\dtl at labelangle}{\dtl at midangle}{180}%
\dtl at truncatedecimal\dtl at labelangle
\edef\dtl at innernodeopt{anchor=east,rotate=\dtl at labelangle}%
}%
@@ -24552,10 +24682,18 @@
% If the mid way angle is between 90 and 270, the text will look
% upside-down, so adjust accordingly.
% \begin{macrocode}
- \ifthenelse{\(\dtl at midangle > 90 \and \dtl at midangle < 270\)
- \TE at or \dtl at midangle < -90}%
+ \dtlifnumopenbetween{\dtl at midangle}{90}{270}%
{%
- \FPsub{\dtl at labelangle}{\dtl at midangle}{180}%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \dtlifnumlt{\dtl at midangle}{-90}%
+ {\let\@dtl at next\@firstoftwo}%
+ {\let\@dtl at next\@secondoftwo}%
+ }%
+ \@dtl at next
+ {%
+ \dtlsub{\dtl at labelangle}{\dtl at midangle}{180}%
\dtl at truncatedecimal\dtl at labelangle
\edef\dtl at outernodeopt{anchor=east,rotate=\dtl at labelangle}%
}%
@@ -24566,10 +24704,30 @@
% Don't rotate outer labels
% \begin{macrocode}
\else
- \ifthenelse{\(\dtl at midangle<45\and\dtl at midangle>-45\)
- \TE at or \dtl at midangle=45
- \TE at or \dtl at midangle>315}%
+% \end{macrocode}
+% If ($\theta>-45$ and $\theta < 45$) or $\theta=45$ or $\theta>315$
+% \begin{macrocode}
+ \dtlifnumeq{\dtl at midangle}{45}
{%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \dtlifnumgt{\dtl at midangle}{315}
+ {%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \dtlifnumopenbetween{\dtl at midangle}{-45}{45}%
+ {%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \let\@dtl at next\@secondoftwo
+ }%
+ }%
+ }%
+ \@dtl at next
+ {%
% \end{macrocode}
% East quadrant
% \begin{macrocode}
@@ -24576,9 +24734,21 @@
\edef\dtl at outernodeopt{anchor=west}%
}%
{%
- \ifthenelse{\(\dtl at midangle<135\and\dtl at midangle>45\)
- \TE at or \dtl at midangle=135}%
+ \dtlifnumopenbetween{\dtl at midangle}{45}{135}%
{%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \dtlifnumeq{\dtl at midangle}{135}%
+ {%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \let\@dtl at next\@secondoftwo
+ }%
+ }%
+ \@dtl at next
+ {%
% \end{macrocode}
% North quadrant
% \begin{macrocode}
@@ -24585,11 +24755,37 @@
\edef\dtl at outernodeopt{anchor=south}%
}%
{%
- \ifthenelse{\(\dtl at midangle<225\and\dtl at midangle>135\)
- \TE at or \dtl at midangle=225
- \TE at or \dtl at midangle=-135
- \TE at or \dtl at midangle<-135}%
+% \end{macrocode}
+%If ($\theta>135$ and $\theta<225$) or $\theta=225$ or $\theta=-135$
+%or $\theta<-135$
+% \begin{macrocode}
+ \dtlifnumopenbetween{\dtl at midangle}{135}{225}%
{%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \dtlifnumeq{\dtl at midangle}{225}%
+ {%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \dtlifnumeq{\dtl at midangle}{-135}%
+ {%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \dtlifnumlt{\dtl at midangle}{-135}%
+ {%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \let\@dtl at next\@secondoftwo
+ }%
+ }%
+ }%
+ }%
+ \@dtl at next
+ {%
% \end{macrocode}
% West quadrant
% \begin{macrocode}
@@ -24635,30 +24831,43 @@
% \cs{dtl at angle@}\meta{n} (extent angle),
% \cs{dtl at cut@angle@}\meta{n} (cut away angle) and
% \cs{dtl at cut@len@}\meta{n} (cut away length).
+%\changes{2.26}{2016-07-20}{replaced fp commands}
% \begin{macrocode}
\newcommand*{\dtl at computeangles}[2]{%
-\FPifgt{\@dtl at start}{180}%
-% if startangle > 180
+ \dtlifnumgt{\@dtl at start}{180}%
+ {%
+% \end{macrocode}
+% if $\mathrm{startangle} > 180$
+% \begin{macrocode}
+ \let\dtl at old=\@dtl at start
+% \end{macrocode}
+% $\mathrm{startangle} := \mathrm{startangle} - 360$
+% \begin{macrocode}
+ \dtlsub{\@dtl at start}{\dtl at old}{360}%
+ }%
+ {}%
+ \dtlifnumlt{\@dtl at start}{-180}%
+ {%
+% \end{macrocode}
+% if $\mathrm{startangle} < -180$
+% \begin{macrocode}
+ \let\dtl at old=\@dtl at start
+% \end{macrocode}
+% $\mathrm{startangle} = \mathrm{startangle} + 360$
+% \begin{macrocode}
+ \dtladd{\@dtl at start}{\dtl at old}{360}%
+ }%
+ {}%
+ \expandafter\edef\csname dtl at sang@\romannumeral#1\endcsname{%
+ \@dtl at start}%
+ \dtlmul{\dtl at angle}{360}{#2}%
+ \let\dtl at old=\dtl at angle
+ \dtldiv{\dtl at angle}{\dtl at old}{\dtl at total}%
+ \expandafter\let\csname dtl at angle@\romannumeral#1\endcsname=\dtl at angle
\let\dtl at old=\@dtl at start
-% startangle = startangle - 360
- \FPsub{\@dtl at start}{\dtl at old}{360}%
-\fi
-\FPiflt{\@dtl at start}{-180}%
-% if startangle < -180
- \let\dtl at old=\@dtl at start
-% startangle = startangle + 360
- \FPadd{\@dtl at start}{\dtl at old}{360}%
-\fi
-\expandafter\edef\csname dtl at sang@\romannumeral#1\endcsname{%
-\@dtl at start}%
-\FPmul{\dtl at angle}{360}{#2}%
-\let\dtl at old=\dtl at angle
-\FPdiv{\dtl at angle}{\dtl at old}{\dtl at total}%
-\expandafter\let\csname dtl at angle@\romannumeral#1\endcsname=\dtl at angle
-\let\dtl at old=\@dtl at start
-\FPadd{\@dtl at start}{\dtl at old}{\dtl at angle}%
-\expandafter\def\csname dtl at cut@angle@\romannumeral#1\endcsname{0}%
-\expandafter\def\csname dtl at cut@len@\romannumeral#1\endcsname{0cm}%
+ \dtladd{\@dtl at start}{\dtl at old}{\dtl at angle}%
+ \expandafter\def\csname dtl at cut@angle@\romannumeral#1\endcsname{0}%
+ \expandafter\def\csname dtl at cut@len@\romannumeral#1\endcsname{0cm}%
}
% \end{macrocode}
%\end{macro}
@@ -24667,25 +24876,30 @@
%\begin{macro}{\@dtl at set@off}
% \begin{macrocode}
\def\@dtl at set@off#1-#2\relax{%
-\ifthenelse{\equal{#2}{}}{%
-\@@dtl at set@off{#1}}{%
-\@@dtl at set@offr#1-#2\relax}%
+ \ifstrempty{#2}%
+ {%
+ \@@dtl at set@off{#1}%
+ }%
+ {%
+ \@@dtl at set@offr#1-#2\relax
+ }%
}
% \end{macrocode}
%\end{macro}
% Set offset for individual segment:
%\begin{macro}{\@@dtl at set@off}
+%\changes{2.26}{2016-07-20}{replaced fp commands}
% \begin{macrocode}
\newcommand*{\@@dtl at set@off}[1]{%
-\edef\dtl at old{\csname dtl at angle@\romannumeral#1\endcsname}%
-\FPmul{\dtl at angle}{\dtl at old}{0.5}%
-\let\dtl at old=\dtl at angle
-\edef\dtl at sang{\csname dtl at sang@\romannumeral#1\endcsname}%
-\FPadd{\dtl at angle}{\dtl at old}{\dtl at sang}%
-\expandafter\edef\csname dtl at cut@angle@\romannumeral#1\endcsname{%
-\dtl at angle}%
-\expandafter\edef\csname dtl at cut@len@\romannumeral#1\endcsname{%
- \the\dtl at cutawayoffset}
+ \edef\dtl at old{\csname dtl at angle@\romannumeral#1\endcsname}%
+ \dtlmul{\dtl at angle}{\dtl at old}{0.5}%
+ \let\dtl at old=\dtl at angle
+ \edef\dtl at sang{\csname dtl at sang@\romannumeral#1\endcsname}%
+ \dtladd{\dtl at angle}{\dtl at old}{\dtl at sang}%
+ \expandafter\edef\csname dtl at cut@angle@\romannumeral#1\endcsname{%
+ \dtl at angle}%
+ \expandafter\edef\csname dtl at cut@len@\romannumeral#1\endcsname{%
+ \the\dtl at cutawayoffset}%
}
% \end{macrocode}
%\end{macro}
@@ -24697,36 +24911,37 @@
%\end{macro}
%\begin{macro}{\@@dtl at setoffr}
% Set offset for a range of segments
+%\changes{2.26}{2016-07-20}{replaced fp commands}
% \begin{macrocode}
\def\@@dtl at set@offr#1-#2-\relax{%
-\ifnum#1>#2\relax
- \PackageError{datapie}{Segment ranges must go in ascending order}{%
-Try #2-#1 instead of #1-#2}%
-\else
- \def\dtl at angle{0}%
- \@dtl at seg=#1\relax
- \whiledo{\not\(\@dtl at seg > #2\)}{%
- \let\dtl at old=\dtl at angle
- \edef\dtl at segang{\csname dtl at angle@\romannumeral\@dtl at seg\endcsname}%
- \FPadd{\dtl at angle}{\dtl at old}{\dtl at segang}%
- \advance\@dtl at seg by 1\relax
- }%
- \let\dtl at old=\dtl at angle
- \FPmul{\dtl at angle}{\dtl at old}{0.5}%
- \edef\dtl at sang{\csname dtl at sang@\romannumeral#1\endcsname}%
- \let\dtl at old=\dtl at angle
- \FPadd{\dtl at angle}{\dtl at old}{\dtl at sang}%
- \@dtl at seg=#1\relax
- \whiledo{\not\(\@dtl at seg > #2\)}{%
- \expandafter
- \let\csname dtl at cut@angle@\romannumeral\@dtl at seg\endcsname
- =\dtl at angle
- \expandafter
- \edef\csname dtl at cut@len@\romannumeral\@dtl at seg\endcsname{%
- \the\dtl at cutawayoffset}
- \advance\@dtl at seg by 1\relax
- }%
-\fi
+ \ifnum#1>#2\relax
+ \PackageError{datapie}{Segment ranges must go in ascending order}{%
+ Try #2-#1 instead of #1-#2}%
+ \else
+ \def\dtl at angle{0}%
+ \@dtl at seg=#1\relax
+ \whiledo{\not\(\@dtl at seg > #2\)}{%
+ \let\dtl at old=\dtl at angle
+ \edef\dtl at segang{\csname dtl at angle@\romannumeral\@dtl at seg\endcsname}%
+ \dtladd{\dtl at angle}{\dtl at old}{\dtl at segang}%
+ \advance\@dtl at seg by 1\relax
+ }%
+ \let\dtl at old=\dtl at angle
+ \dtlmul{\dtl at angle}{\dtl at old}{0.5}%
+ \edef\dtl at sang{\csname dtl at sang@\romannumeral#1\endcsname}%
+ \let\dtl at old=\dtl at angle
+ \dtladd{\dtl at angle}{\dtl at old}{\dtl at sang}%
+ \@dtl at seg=#1\relax
+ \whiledo{\not\(\@dtl at seg > #2\)}{%
+ \expandafter
+ \let\csname dtl at cut@angle@\romannumeral\@dtl at seg\endcsname
+ =\dtl at angle
+ \expandafter
+ \edef\csname dtl at cut@len@\romannumeral\@dtl at seg\endcsname{%
+ \the\dtl at cutawayoffset}
+ \advance\@dtl at seg by 1\relax
+ }%
+ \fi
}
% \end{macrocode}
%\end{macro}
@@ -24744,7 +24959,7 @@
% Declare package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{dataplot}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{dataplot}[2016/07/20 v2.26 (NLCT)]
% \end{macrocode}
% Required packages
% \begin{macrocode}
@@ -26366,7 +26581,7 @@
% Package identification:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{person}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{person}[2016/07/20 v2.26 (NLCT)]
% \end{macrocode}
% Requires the \sty{ifthen} package.
% \begin{macrocode}
Modified: trunk/Master/texmf-dist/source/latex/datatool/datatool.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/datatool/datatool.ins 2016-07-21 01:10:40 UTC (rev 41743)
+++ trunk/Master/texmf-dist/source/latex/datatool/datatool.ins 2016-07-21 21:17:50 UTC (rev 41744)
@@ -1,4 +1,4 @@
-% datatool.ins generated using makedtx version 1.1 2016/1/18 9:48
+% datatool.ins generated using makedtx version 1.1 2016/7/20 19:31
\input docstrip
\preamble
Modified: trunk/Master/texmf-dist/tex/latex/datatool/databar.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool/databar.sty 2016-07-21 01:10:40 UTC (rev 41743)
+++ trunk/Master/texmf-dist/tex/latex/datatool/databar.sty 2016-07-21 21:17:50 UTC (rev 41744)
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{databar}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{databar}[2016/07/20 v2.26 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{dataplot}
\newif\ifDTLcolorbarchart
@@ -296,6 +296,23 @@
\fi
}%
\else
+ \@for\dtl at thislabel:=\dtlbar at yticlabels\do{%
+ \ifDTLverticalbars
+ \settowidth{\dtl at tmplength}{%
+ \DTLbardisplayYticklabel{\dtl at thislabel}}%
+ \else
+ \settoheight{\dtl at tmplength}{%
+ \DTLbardisplayYticklabel{\dtl at thislabel}}%
+ \edef\@dtl at h{\the\dtl at tmplength}%
+ \settodepth{\dtl at tmplength}{%
+ \DTLbardisplayYticklabel{\dtl at thislabel}}%
+ \addtolength{\dtl at tmplength}{\@dtl at h}%
+ \addtolength{\dtl at tmplength}{\baselineskip}%
+ \fi
+ \ifdim\dtl at tmplength>\dtl at yticlabelwidth
+ \setlength{\dtl at yticlabelwidth}{\dtl at tmplength}%
+ \fi
+ }%
\fi
\fi
\fi
Modified: trunk/Master/texmf-dist/tex/latex/datatool/databib.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool/databib.sty 2016-07-21 01:10:40 UTC (rev 41743)
+++ trunk/Master/texmf-dist/tex/latex/datatool/databib.sty 2016-07-21 21:17:50 UTC (rev 41744)
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{databib}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{databib}[2016/07/20 v2.26 (NLCT)]
\RequirePackage{datatool}
\newcommand*{\dtlbib at style}{plain}
\define at choicekey{databib.sty}{style}{plain,abbrv,alpha}{%
Modified: trunk/Master/texmf-dist/tex/latex/datatool/datagidx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool/datagidx.sty 2016-07-21 01:10:40 UTC (rev 41743)
+++ trunk/Master/texmf-dist/tex/latex/datatool/datagidx.sty 2016-07-21 21:17:50 UTC (rev 41744)
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datagidx}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{datagidx}[2016/07/20 v2.26 (NLCT)]
\RequirePackage{datatool}
\RequirePackage{etoolbox}
\RequirePackage{xkeyval}
Modified: trunk/Master/texmf-dist/tex/latex/datatool/datapie.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool/datapie.sty 2016-07-21 01:10:40 UTC (rev 41743)
+++ trunk/Master/texmf-dist/tex/latex/datatool/datapie.sty 2016-07-21 21:17:50 UTC (rev 41744)
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datapie}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{datapie}[2016/07/20 v2.26 (NLCT)]
\RequirePackage{xkeyval}
\newif\ifDTLcolorpiechart
\DTLcolorpiecharttrue
@@ -165,7 +165,7 @@
\let\dtl at oldtotal=\dtl at total
\expandafter\DTLconverttodecimal\expandafter
{\DTLpievariable}{\dtl at variable}%
- \FPadd{\dtl at total}{\dtl at variable}{\dtl at total}%
+ \dtladd{\dtl at total}{\dtl at variable}{\dtl at total}%
}%
\expandafter\DTLconverttodecimal\expandafter
{\DTLstartangle}{\@dtl at start}%
@@ -172,17 +172,17 @@
\@sDTLforeach[#1]{#3}{#4}{%
\expandafter\DTLconverttodecimal\expandafter
{\DTLpievariable}{\dtl at variable}%
- \dtl at computeangles{%
- \csname c at DTLrow\romannumeral\dtlforeachlevel\endcsname}{%
- \dtl at variable}%
+ \dtl at computeangles
+ {\csname c at DTLrow\romannumeral\dtlforeachlevel\endcsname}%
+ {\dtl at variable}%
\expandafter\@dtl at seg\expandafter=
- \csname c at DTLrow\romannumeral\dtlforeachlevel\endcsname%
- \FPmul{\dtl at tmp}{\dtl at variable}{100}%
+ \csname c at DTLrow\romannumeral\dtlforeachlevel\endcsname%
+ \dtlmul{\dtl at tmp}{\dtl at variable}{100}%
\let\dtl at old=\dtl at tmp
- \FPdiv{\dtl at tmp}{\dtl at old}{\dtl at total}%
- \expandafter\FPround
- \csname dtl at piepercent@\romannumeral\@dtl at seg\endcsname\dtl at tmp
- \c at DTLpieroundvar
+ \dtldiv{\dtl at tmp}{\dtl at old}{\dtl at total}%
+ \expandafter\dtlround
+ \csname dtl at piepercent@\romannumeral\@dtl at seg\endcsname\dtl at tmp
+ \c at DTLpieroundvar
}%
\@for\dtl at row:=\dtl at piecutaways\do{%
\expandafter\@dtl at set@off\dtl at row-\relax
@@ -198,13 +198,13 @@
\csname dtl at sang@\romannumeral\@dtl at seg\endcsname}%
\edef\dtl at extent{%
\csname dtl at angle@\romannumeral\@dtl at seg\endcsname}%
- \FPadd{\dtl at endangle}{\dtl at start}{\dtl at extent}%
+ \dtladd{\dtl at endangle}{\dtl at start}{\dtl at extent}%
\edef\dtl at angle{%
\csname dtl at cut@angle@\romannumeral\@dtl at seg\endcsname}%
\let\dtl at old=\dtl at angle
\dtl at truncatedecimal\dtl at angle
\ifnum\dtl at angle>180\relax
- \FPsub{\dtl at angle}{\dtl at old}{360}%
+ \dtlsub{\dtl at angle}{\dtl at old}{360}%
\dtl at truncatedecimal\dtl at angle
\fi
\edef\dtl at cutlen{%
@@ -211,11 +211,9 @@
\csname dtl at cut@len@\romannumeral\@dtl at seg\endcsname
}%
\edef\@dtl at shift{(\dtl at angle:\dtl at cutlen)}%
- \FPmul{\dtl at angle}{\dtl at extent}{0.5}%
- \FPadd{\dtl at midangle}{\dtl at angle}{\dtl at start}%
+ \dtlmul{\dtl at angle}{\dtl at extent}{0.5}%
+ \dtladd{\dtl at midangle}{\dtl at angle}{\dtl at start}%
\begin{scope}[shift={\@dtl at shift}]%
- \dtl at truncatedecimal\dtl at start
- \dtl at truncatedecimal\dtl at endangle
\fill[color=\DTLgetpiesegmentcolor\@dtl at seg] (0,0) --
(\dtl at start:\DTLradius)
arc (\dtl at start:\dtl at endangle:\DTLradius) -- cycle;
@@ -227,10 +225,18 @@
\fi
\dtl at truncatedecimal\dtl at midangle
\ifDTLrotateinner
- \ifthenelse{\(\dtl at midangle > 90 \and \dtl at midangle < 270\)
- \TE at or \dtl at midangle < -90}%
+ \dtlifnumopenbetween{\dtl at midangle}{90}{270}%
{%
- \FPsub{\dtl at labelangle}{\dtl at midangle}{180}%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \dtlifnumlt{\dtl at midangle}{-90}%
+ {\let\@dtl at next\@firstoftwo}%
+ {\let\@dtl at next\@secondoftwo}%
+ }%
+ \@dtl at next
+ {%
+ \dtlsub{\dtl at labelangle}{\dtl at midangle}{180}%
\dtl at truncatedecimal\dtl at labelangle
\edef\dtl at innernodeopt{anchor=east,rotate=\dtl at labelangle}%
}%
@@ -241,10 +247,18 @@
\edef\dtl at innernodeopt{anchor=center}%
\fi
\ifDTLrotateouter
- \ifthenelse{\(\dtl at midangle > 90 \and \dtl at midangle < 270\)
- \TE at or \dtl at midangle < -90}%
+ \dtlifnumopenbetween{\dtl at midangle}{90}{270}%
{%
- \FPsub{\dtl at labelangle}{\dtl at midangle}{180}%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \dtlifnumlt{\dtl at midangle}{-90}%
+ {\let\@dtl at next\@firstoftwo}%
+ {\let\@dtl at next\@secondoftwo}%
+ }%
+ \@dtl at next
+ {%
+ \dtlsub{\dtl at labelangle}{\dtl at midangle}{180}%
\dtl at truncatedecimal\dtl at labelangle
\edef\dtl at outernodeopt{anchor=east,rotate=\dtl at labelangle}%
}%
@@ -252,24 +266,75 @@
\edef\dtl at outernodeopt{anchor=west,rotate=\dtl at midangle}%
}%
\else
- \ifthenelse{\(\dtl at midangle<45\and\dtl at midangle>-45\)
- \TE at or \dtl at midangle=45
- \TE at or \dtl at midangle>315}%
+ \dtlifnumeq{\dtl at midangle}{45}
{%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \dtlifnumgt{\dtl at midangle}{315}
+ {%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \dtlifnumopenbetween{\dtl at midangle}{-45}{45}%
+ {%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \let\@dtl at next\@secondoftwo
+ }%
+ }%
+ }%
+ \@dtl at next
+ {%
\edef\dtl at outernodeopt{anchor=west}%
}%
{%
- \ifthenelse{\(\dtl at midangle<135\and\dtl at midangle>45\)
- \TE at or \dtl at midangle=135}%
+ \dtlifnumopenbetween{\dtl at midangle}{45}{135}%
{%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \dtlifnumeq{\dtl at midangle}{135}%
+ {%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \let\@dtl at next\@secondoftwo
+ }%
+ }%
+ \@dtl at next
+ {%
\edef\dtl at outernodeopt{anchor=south}%
}%
{%
- \ifthenelse{\(\dtl at midangle<225\and\dtl at midangle>135\)
- \TE at or \dtl at midangle=225
- \TE at or \dtl at midangle=-135
- \TE at or \dtl at midangle<-135}%
+ \dtlifnumopenbetween{\dtl at midangle}{135}{225}%
{%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \dtlifnumeq{\dtl at midangle}{225}%
+ {%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \dtlifnumeq{\dtl at midangle}{-135}%
+ {%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \dtlifnumlt{\dtl at midangle}{-135}%
+ {%
+ \let\@dtl at next\@firstoftwo
+ }%
+ {%
+ \let\@dtl at next\@secondoftwo
+ }%
+ }%
+ }%
+ }%
+ \@dtl at next
+ {%
\edef\dtl at outernodeopt{anchor=east}%
}%
{%
@@ -298,71 +363,79 @@
\egroup
}
\newcommand*{\dtl at computeangles}[2]{%
-\FPifgt{\@dtl at start}{180}%
+ \dtlifnumgt{\@dtl at start}{180}%
+ {%
+ \let\dtl at old=\@dtl at start
+ \dtlsub{\@dtl at start}{\dtl at old}{360}%
+ }%
+ {}%
+ \dtlifnumlt{\@dtl at start}{-180}%
+ {%
+ \let\dtl at old=\@dtl at start
+ \dtladd{\@dtl at start}{\dtl at old}{360}%
+ }%
+ {}%
+ \expandafter\edef\csname dtl at sang@\romannumeral#1\endcsname{%
+ \@dtl at start}%
+ \dtlmul{\dtl at angle}{360}{#2}%
+ \let\dtl at old=\dtl at angle
+ \dtldiv{\dtl at angle}{\dtl at old}{\dtl at total}%
+ \expandafter\let\csname dtl at angle@\romannumeral#1\endcsname=\dtl at angle
\let\dtl at old=\@dtl at start
- \FPsub{\@dtl at start}{\dtl at old}{360}%
-\fi
-\FPiflt{\@dtl at start}{-180}%
- \let\dtl at old=\@dtl at start
- \FPadd{\@dtl at start}{\dtl at old}{360}%
-\fi
-\expandafter\edef\csname dtl at sang@\romannumeral#1\endcsname{%
-\@dtl at start}%
-\FPmul{\dtl at angle}{360}{#2}%
-\let\dtl at old=\dtl at angle
-\FPdiv{\dtl at angle}{\dtl at old}{\dtl at total}%
-\expandafter\let\csname dtl at angle@\romannumeral#1\endcsname=\dtl at angle
-\let\dtl at old=\@dtl at start
-\FPadd{\@dtl at start}{\dtl at old}{\dtl at angle}%
-\expandafter\def\csname dtl at cut@angle@\romannumeral#1\endcsname{0}%
-\expandafter\def\csname dtl at cut@len@\romannumeral#1\endcsname{0cm}%
+ \dtladd{\@dtl at start}{\dtl at old}{\dtl at angle}%
+ \expandafter\def\csname dtl at cut@angle@\romannumeral#1\endcsname{0}%
+ \expandafter\def\csname dtl at cut@len@\romannumeral#1\endcsname{0cm}%
}
\def\@dtl at set@off#1-#2\relax{%
-\ifthenelse{\equal{#2}{}}{%
-\@@dtl at set@off{#1}}{%
-\@@dtl at set@offr#1-#2\relax}%
+ \ifstrempty{#2}%
+ {%
+ \@@dtl at set@off{#1}%
+ }%
+ {%
+ \@@dtl at set@offr#1-#2\relax
+ }%
}
\newcommand*{\@@dtl at set@off}[1]{%
-\edef\dtl at old{\csname dtl at angle@\romannumeral#1\endcsname}%
-\FPmul{\dtl at angle}{\dtl at old}{0.5}%
-\let\dtl at old=\dtl at angle
-\edef\dtl at sang{\csname dtl at sang@\romannumeral#1\endcsname}%
-\FPadd{\dtl at angle}{\dtl at old}{\dtl at sang}%
-\expandafter\edef\csname dtl at cut@angle@\romannumeral#1\endcsname{%
-\dtl at angle}%
-\expandafter\edef\csname dtl at cut@len@\romannumeral#1\endcsname{%
- \the\dtl at cutawayoffset}
+ \edef\dtl at old{\csname dtl at angle@\romannumeral#1\endcsname}%
+ \dtlmul{\dtl at angle}{\dtl at old}{0.5}%
+ \let\dtl at old=\dtl at angle
+ \edef\dtl at sang{\csname dtl at sang@\romannumeral#1\endcsname}%
+ \dtladd{\dtl at angle}{\dtl at old}{\dtl at sang}%
+ \expandafter\edef\csname dtl at cut@angle@\romannumeral#1\endcsname{%
+ \dtl at angle}%
+ \expandafter\edef\csname dtl at cut@len@\romannumeral#1\endcsname{%
+ \the\dtl at cutawayoffset}%
}
\newcount\@dtl at seg
\def\@@dtl at set@offr#1-#2-\relax{%
-\ifnum#1>#2\relax
- \PackageError{datapie}{Segment ranges must go in ascending order}{%
-Try #2-#1 instead of #1-#2}%
-\else
- \def\dtl at angle{0}%
- \@dtl at seg=#1\relax
- \whiledo{\not\(\@dtl at seg > #2\)}{%
- \let\dtl at old=\dtl at angle
- \edef\dtl at segang{\csname dtl at angle@\romannumeral\@dtl at seg\endcsname}%
- \FPadd{\dtl at angle}{\dtl at old}{\dtl at segang}%
- \advance\@dtl at seg by 1\relax
- }%
- \let\dtl at old=\dtl at angle
- \FPmul{\dtl at angle}{\dtl at old}{0.5}%
- \edef\dtl at sang{\csname dtl at sang@\romannumeral#1\endcsname}%
- \let\dtl at old=\dtl at angle
- \FPadd{\dtl at angle}{\dtl at old}{\dtl at sang}%
- \@dtl at seg=#1\relax
- \whiledo{\not\(\@dtl at seg > #2\)}{%
- \expandafter
- \let\csname dtl at cut@angle@\romannumeral\@dtl at seg\endcsname
- =\dtl at angle
- \expandafter
- \edef\csname dtl at cut@len@\romannumeral\@dtl at seg\endcsname{%
- \the\dtl at cutawayoffset}
- \advance\@dtl at seg by 1\relax
- }%
-\fi
+ \ifnum#1>#2\relax
+ \PackageError{datapie}{Segment ranges must go in ascending order}{%
+ Try #2-#1 instead of #1-#2}%
+ \else
+ \def\dtl at angle{0}%
+ \@dtl at seg=#1\relax
+ \whiledo{\not\(\@dtl at seg > #2\)}{%
+ \let\dtl at old=\dtl at angle
+ \edef\dtl at segang{\csname dtl at angle@\romannumeral\@dtl at seg\endcsname}%
+ \dtladd{\dtl at angle}{\dtl at old}{\dtl at segang}%
+ \advance\@dtl at seg by 1\relax
+ }%
+ \let\dtl at old=\dtl at angle
+ \dtlmul{\dtl at angle}{\dtl at old}{0.5}%
+ \edef\dtl at sang{\csname dtl at sang@\romannumeral#1\endcsname}%
+ \let\dtl at old=\dtl at angle
+ \dtladd{\dtl at angle}{\dtl at old}{\dtl at sang}%
+ \@dtl at seg=#1\relax
+ \whiledo{\not\(\@dtl at seg > #2\)}{%
+ \expandafter
+ \let\csname dtl at cut@angle@\romannumeral\@dtl at seg\endcsname
+ =\dtl at angle
+ \expandafter
+ \edef\csname dtl at cut@len@\romannumeral\@dtl at seg\endcsname{%
+ \the\dtl at cutawayoffset}
+ \advance\@dtl at seg by 1\relax
+ }%
+ \fi
}
\endinput
%%
Modified: trunk/Master/texmf-dist/tex/latex/datatool/dataplot.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool/dataplot.sty 2016-07-21 01:10:40 UTC (rev 41743)
+++ trunk/Master/texmf-dist/tex/latex/datatool/dataplot.sty 2016-07-21 21:17:50 UTC (rev 41744)
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{dataplot}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{dataplot}[2016/07/20 v2.26 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{tikz}
\RequirePackage{datatool}
Modified: trunk/Master/texmf-dist/tex/latex/datatool/datatool-base.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool/datatool-base.sty 2016-07-21 01:10:40 UTC (rev 41743)
+++ trunk/Master/texmf-dist/tex/latex/datatool/datatool-base.sty 2016-07-21 21:17:50 UTC (rev 41744)
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-base}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{datatool-base}[2016/07/20 v2.26 (NLCT)]
\RequirePackage{etoolbox}
\RequirePackage{amsmath}
\RequirePackage{xkeyval}
@@ -235,19 +235,33 @@
\def\@dtl at newsortedlist{}%
\@dtl at insertdonefalse
\@for\dtl at srtelement:=#2\do{%
+ \expandafter\DTLifSubString\expandafter{\dtl at srtelement}{,}
+ {%
+ \expandafter\toks@\expandafter{\dtl at srtelement}%
+ \edef\dtl at srtelement{{\the\toks@}}%
+ }%
+ {%
+ }
\if at dtl@insertdone
- \expandafter\toks@\expandafter{\dtl at srtelement}%
- \edef\@dtl at newstuff{{\the\toks@}}%
+ \let\@dtl at newstuff\dtl at srtelement
\else
- \expandafter#3\expandafter{\dtl at srtelement}{#1}%
- \ifnum\dtl at sortresult<0\relax
+ \expandafter#3\expandafter\dtl at sortresult\expandafter
+ {\dtl at srtelement}{#1}%
+ \ifnum\dtl at sortresult>0\relax
+ \DTLifSubString{#1}{,}%
+ {%
+ \@dtl at toks{{#1}}%
+ }%
+ {%
+ \@dtl at toks{#1}%
+ }%
\expandafter\toks@\expandafter{\dtl at srtelement}%
- \@dtl at toks{#1}%
- \edef\@dtl at newstuff{{\the\@dtl at toks},{\the\toks@}}%
+ \edef\@dtl at newstuff{\the\@dtl at toks,\the\toks@}%
\@dtl at insertdonetrue
\else
\expandafter\toks@\expandafter{\dtl at srtelement}%
\edef\@dtl at newstuff{{\the\toks@}}%
+ \let\@dtl at newstuff\dtl at srtelement
\fi
\fi
\ifdefempty{\@dtl at newsortedlist}%
@@ -264,15 +278,27 @@
}%
\ifdefempty{\@dtl at newsortedlist}%
{%
- \@dtl at toks{#1}%
- \edef\@dtl at newsortedlist{{\the\@dtl at toks}}%
+ \DTLifSubString{#1}{,}%
+ {%
+ \@dtl at toks{{#1}}%
+ }%
+ {%
+ \@dtl at toks{#1}%
+ }%
+ \edef\@dtl at newsortedlist{\the\@dtl at toks}%
}%
{%
\if at dtl@insertdone
\else
+ \DTLifSubString{#1}{,}%
+ {%
+ \@dtl at toks{{#1}}%
+ }%
+ {%
+ \@dtl at toks{#1}%
+ }%
\expandafter\toks@\expandafter{\@dtl at newsortedlist}%
- \@dtl at toks{#1}%
- \edef\@dtl at newsortedlist{\the\toks@,{\the\@dtl at toks}}%
+ \edef\@dtl at newsortedlist{\the\toks@,\the\@dtl at toks}%
\fi
}%
\global\let#2=\@dtl at newsortedlist
@@ -313,8 +339,8 @@
\noexpand\def\noexpand\@dtl at fracpart{0}%
}%
{%
- \noexpand\@dtl at getfracpart##2\noexpand\relax
- \noexpand\@dtl at choptrailingzeroes{\noexpand\@dtl at fracpart}%
+ \noexpand\@dtl at getfracpart##2\noexpand\relax
+ \noexpand\@dtl at choptrailingzeroes{\noexpand\@dtl at fracpart}%
}%
}%
\noexpand\def\noexpand\@dtl at getfracpart##1#1\noexpand\relax{%
Modified: trunk/Master/texmf-dist/tex/latex/datatool/datatool-fp.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool/datatool-fp.sty 2016-07-21 01:10:40 UTC (rev 41743)
+++ trunk/Master/texmf-dist/tex/latex/datatool/datatool-fp.sty 2016-07-21 21:17:50 UTC (rev 41744)
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-fp}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{datatool-fp}[2016/07/20 v2.26 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{fp}
\RequirePackage{datatool-base}
Modified: trunk/Master/texmf-dist/tex/latex/datatool/datatool-pgfmath.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool/datatool-pgfmath.sty 2016-07-21 01:10:40 UTC (rev 41743)
+++ trunk/Master/texmf-dist/tex/latex/datatool/datatool-pgfmath.sty 2016-07-21 21:17:50 UTC (rev 41744)
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-pgfmath}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{datatool-pgfmath}[2016/07/20 v2.26 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{pgfrcs,pgfkeys,pgfmath}
\ProcessOptionsX
@@ -47,7 +47,8 @@
\newcommand*{\dtlifnumeq}[4]{%
\def\@dtl at truepart{#3}%
\def\@dtl at falsepart{#4}%
- \pgfmathifthenelse{0#1==0#2}{"\noexpand\@dtl at truepart"}{"\noexpand\@dtl at falsepart"}%
+ \pgfmathifthenelse{\number0#1==\number0#2}%
+ {"\noexpand\@dtl at truepart"}{"\noexpand\@dtl at falsepart"}%
\pgfmathresult
}
\RequirePackage{datatool-base}
@@ -54,19 +55,22 @@
\newcommand*{\dtlifnumlt}[4]{%
\def\@dtl at truepart{#3}%
\def\@dtl at falsepart{#4}%
- \pgfmathifthenelse{0#1 < 0#2}{"\noexpand\@dtl at truepart"}{"\noexpand\@dtl at falsepart"}%
+ \pgfmathifthenelse{\number0#1 < \number0#2}%
+ {"\noexpand\@dtl at truepart"}{"\noexpand\@dtl at falsepart"}%
\pgfmathresult
}
\newcommand*{\dtlifnumgt}[4]{%
\def\@dtl at truepart{#3}%
\def\@dtl at falsepart{#4}%
- \pgfmathifthenelse{0#1 > 0#2}{"\noexpand\@dtl at truepart"}{"\noexpand\@dtl at falsepart"}%
+ \pgfmathifthenelse{\number0#1 > \number0#2}%
+ {"\noexpand\@dtl at truepart"}{"\noexpand\@dtl at falsepart"}%
\pgfmathresult
}
\newcommand*{\dtlifnumopenbetween}[5]{%
\def\@dtl at truepart{#4}%
\def\@dtl at falsepart{#5}%
- \pgfmathifthenelse{(0#2 < 0#1) && (0#1 < 0#3)}
+ \pgfmathifthenelse
+ {(\number0#2 < \number0#1) && (\number0#1 < \number0#3)}%
{"\noexpand\@dtl at truepart"}{"\noexpand\@dtl at falsepart"}%
\pgfmathresult
}
@@ -73,7 +77,8 @@
\newcommand*{\dtlifnumclosedbetween}[5]{%
\def\@dtl at truepart{#4}%
\def\@dtl at falsepart{#5}%
- \pgfmathifthenelse{(0#2 <= #1) && (0#1 <= 0#3)}
+ \pgfmathifthenelse
+ {(\number0#2 <= \number0#1) && (\number0#1 <= \number0#3)}
{"\noexpand\@dtl at truepart"}{"\noexpand\@dtl at falsepart"}%
\pgfmathresult
}
@@ -98,16 +103,58 @@
\let#1\pgfmathresult
}
\newcommand*{\dtlround}[3]{%
- \pgfmathparse{10^#3}%
- \let\dtl at tmpshift\pgfmathresult
- \pgfmathparse{round(#2 * \dtl at tmpshift) / \dtl at tmpshift}%
- \let#1\pgfmathresult
+ \ifnum#3=0\relax
+ \pgfmathparse{int(round(#2))}%
+ \let#1\pgfmathresult
+ \else
+ \pgfmathparse{int(10^#3)}%
+ \let\dtl at tmpshift\pgfmathresult
+ \pgfmathparse{int(floor(#2))}%
+ \let\dtl at int@round\pgfmathresult
+ \pgfmathparse{int(round((#2-\dtl at int@round) * \dtl at tmpshift))}%
+ \@dtl at tmpcount=0\relax
+ \expandafter\@dtl at countdigits\pgfmathresult.\relax
+ \advance\@dtl at tmpcount by -#3\relax
+ \def\@dtl at intpart{}%
+ \def\@dtl at fracpart{}%
+ \expandafter\@dtl at gatherintfrac\pgfmathresult\relax
+ \edef\@dtl at intpart{\number\numexpr\dtl at int@round
+ +\number0\@dtl at intpart}%
+ \edef#1{\@dtl at intpart.\@dtl at fracpart}%
+ \fi
}
+\newcommand*{\@dtl at gatherintfrac}[1]{%
+ \ifx\relax#1\relax
+ \else
+ \advance\@dtl at tmpcount by -1\relax
+ \ifnum\@dtl at tmpcount<0\relax
+ \edef\@dtl at fracpart{\@dtl at fracpart#1}%
+ \else
+ \edef\@dtl at intpart{\@dtl at intpart#1}%
+ \fi
+ \expandafter\@dtl at gatherintfrac
+ \fi
+}
\newcommand*{\dtltrunc}[3]{%
- \pgfmathparse{10^#3}%
- \let\dtl at tmpshift\pgfmathresult
- \pgfmathparse{floor(#2 * \dtl at tmpshift) / \dtl at tmpshift}%
- \let#1\pgfmathresult
+ \ifnum#3=0\relax
+ \pgfmathparse{int(floor(#2))}%
+ \let#1\pgfmathresult
+ \else
+ \pgfmathparse{int(10^#3)}%
+ \let\dtl at tmpshift\pgfmathresult
+ \pgfmathparse{int(floor(#2))}%
+ \let\dtl at int@trunc\pgfmathresult
+ \pgfmathparse{int(floor((#2-\dtl at int@trunc) * \dtl at tmpshift))}%
+ \@dtl at tmpcount=0\relax
+ \expandafter\@dtl at countdigits\pgfmathresult.\relax
+ \advance\@dtl at tmpcount by -#3\relax
+ \def\@dtl at intpart{}%
+ \def\@dtl at fracpart{}%
+ \expandafter\@dtl at gatherintfrac\pgfmathresult\relax
+ \edef\@dtl at intpart{\number\numexpr\dtl at int@trunc
+ +\number0\@dtl at intpart}%
+ \edef#1{\@dtl at intpart.\@dtl at fracpart}%
+ \fi
}
\newcommand*{\dtlclip}[2]{%
\edef#1{#2}%
Modified: trunk/Master/texmf-dist/tex/latex/datatool/datatool.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool/datatool.sty 2016-07-21 01:10:40 UTC (rev 41743)
+++ trunk/Master/texmf-dist/tex/latex/datatool/datatool.sty 2016-07-21 21:17:50 UTC (rev 41744)
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{datatool}[2016/07/20 v2.26 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{ifthen}
\RequirePackage{xfor}
Modified: trunk/Master/texmf-dist/tex/latex/datatool/person.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/datatool/person.sty 2016-07-21 01:10:40 UTC (rev 41743)
+++ trunk/Master/texmf-dist/tex/latex/datatool/person.sty 2016-07-21 21:17:50 UTC (rev 41744)
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{person}[2016/01/18 v2.25 (NLCT)]
+\ProvidesPackage{person}[2016/07/20 v2.26 (NLCT)]
\RequirePackage{ifthen}
\RequirePackage{datatool}
\newcounter{people}
More information about the tex-live-commits
mailing list