summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/datatool/CHANGES27
-rw-r--r--Master/texmf-dist/doc/latex/datatool/README4
-rw-r--r--Master/texmf-dist/doc/latex/datatool/datatool-code.pdfbin1175201 -> 1183848 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/datatool-user.pdfbin631018 -> 639593 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/datatool-user.tex200
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-autokeys.pdfbin24923 -> 24911 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-barchart.pdfbin35068 -> 35054 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-datatooltk.pdfbin22860 -> 22848 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-dict.pdfbin122588 -> 122418 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-dict.tex13
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-europecv-bib.pdfbin89557 -> 89544 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-gidx.pdfbin179722 -> 179794 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-glossary.pdfbin104379 -> 104427 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-index.pdfbin128779 -> 128777 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-mail-merge.pdfbin21631 -> 22122 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-piechart.pdfbin33957 -> 33945 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-sort.pdfbin89724 -> 89713 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-student-scores.pdfbin34614 -> 34602 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-two-per-row.pdfbin31751 -> 31739 bytes
-rw-r--r--Master/texmf-dist/source/latex/datatool/datatool.dtx438
-rw-r--r--Master/texmf-dist/source/latex/datatool/datatool.ins6
-rw-r--r--Master/texmf-dist/tex/latex/datatool/databar.sty6
-rw-r--r--Master/texmf-dist/tex/latex/datatool/databib.sty6
-rw-r--r--Master/texmf-dist/tex/latex/datatool/datagidx.sty120
-rw-r--r--Master/texmf-dist/tex/latex/datatool/datapie.sty6
-rw-r--r--Master/texmf-dist/tex/latex/datatool/dataplot.sty6
-rw-r--r--Master/texmf-dist/tex/latex/datatool/datatool-base.sty55
-rw-r--r--Master/texmf-dist/tex/latex/datatool/datatool-fp.sty6
-rw-r--r--Master/texmf-dist/tex/latex/datatool/datatool-pgfmath.sty6
-rw-r--r--Master/texmf-dist/tex/latex/datatool/datatool.sty51
-rw-r--r--Master/texmf-dist/tex/latex/datatool/person.sty6
31 files changed, 776 insertions, 180 deletions
diff --git a/Master/texmf-dist/doc/latex/datatool/CHANGES b/Master/texmf-dist/doc/latex/datatool/CHANGES
index 32497e242ed..fbe8768300d 100644
--- a/Master/texmf-dist/doc/latex/datatool/CHANGES
+++ b/Master/texmf-dist/doc/latex/datatool/CHANGES
@@ -1,3 +1,30 @@
+v2.28:
+
+ * datatool.sty:
+
+ - added \xdtlgetrowindex
+
+ - \DTLloadrawdb: changed \xdef to \protected@xdef
+
+ - some bug fixes
+
+ * datatool-base.sty:
+
+ - added \DTLformatlist and accompanying commands
+ \DTLlistformatsep, \DTLlistformatoxford, \DTLlistformatlastsep,
+ \DTLandname and \DTLlistformatitem.
+
+ * datagidx.sty:
+
+ - changed initialisation of label in \datagidx@setfieldvalues
+
+ - \datagidxstripaccents now changes \add@accent@,
+ \@text@composite@x and \@tabacckludge
+
+ - added \datagidxextendedtoascii
+
+ - \printterms uses \twocolumn if balance=false and columns=2
+
v2.27:
* datatool-base:
diff --git a/Master/texmf-dist/doc/latex/datatool/README b/Master/texmf-dist/doc/latex/datatool/README
index cbae48e774e..0f23674cad3 100644
--- a/Master/texmf-dist/doc/latex/datatool/README
+++ b/Master/texmf-dist/doc/latex/datatool/README
@@ -1,6 +1,6 @@
-LaTeX Bundle : datatool v2.27
+LaTeX Bundle : datatool v2.28
-Last Modified : 2016-07-28
+Last Modified : 2017-11-10
Author : Nicola Talbot
diff --git a/Master/texmf-dist/doc/latex/datatool/datatool-code.pdf b/Master/texmf-dist/doc/latex/datatool/datatool-code.pdf
index b2a076679c4..473f0ce7570 100644
--- a/Master/texmf-dist/doc/latex/datatool/datatool-code.pdf
+++ b/Master/texmf-dist/doc/latex/datatool/datatool-code.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datatool/datatool-user.pdf b/Master/texmf-dist/doc/latex/datatool/datatool-user.pdf
index 53f1d9cedf4..0fd37dd87fe 100644
--- a/Master/texmf-dist/doc/latex/datatool/datatool-user.pdf
+++ b/Master/texmf-dist/doc/latex/datatool/datatool-user.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datatool/datatool-user.tex b/Master/texmf-dist/doc/latex/datatool/datatool-user.tex
index b5e65957904..ca1e0098df3 100644
--- a/Master/texmf-dist/doc/latex/datatool/datatool-user.tex
+++ b/Master/texmf-dist/doc/latex/datatool/datatool-user.tex
@@ -6,6 +6,7 @@
\usepackage[utf8]{inputenc}
\usepackage{ifthen}
\usepackage[verbose=false]{datatool}
+\usepackage{mfirstuc}[2017/11/10]
\usepackage{datapie,databar,databib,person,datagidx}
\usepackage{textcomp}
\usepackage{graphicx}
@@ -102,11 +103,11 @@
\MakeShortVerb{"}
- \title{User Manual for datatool bundle version~2.27}
+ \title{User Manual for datatool bundle version~2.28}
\author{Nicola L.C. Talbot\\
\url{http://www.dickimaw-books.com/}}
- \date{2016-07-28}
+ \date{2017-11-10}
\maketitle
\pagenumbering{roman}
@@ -121,7 +122,7 @@ The \styfmt{datatool} bundle comes with the following documentation:
\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.27}
+ read \qt{Documented Code for datatool v2.28}
\item[INSTALL] Installation instructions.
@@ -211,6 +212,12 @@ and the second uses the \sty{pgfmath} package:
\end{enumerate}
+\begin{important}
+Both \sty{fp} and \sty{pgfmath} have some limitations. These limitations
+will therefore also be present in the various packages provided
+with \sty{datatool}, according to the underlying package used.
+\end{important}
+
\cleardoublepage
\pdfbookmark[0]{Contents}{contents}
\tableofcontents
@@ -244,6 +251,12 @@ ascending or descending).
\end{itemize}
Package Options:
\begin{description}
+ \item[\pkgopt{utf8}] Boolean key. May be used to switch off the UTF-8
+ support described on \pageref{utf8support} in \sectionref{sec:sort}.
+ If you both load \sty{inputenc} with UTF-8
+ support and you use accent commands like \cs{'} or \cs{c} then make
+ sure you have at least version 2.05 of \sty{mfirstuc}
+ if you want to use commands like \ics{makefirstuc}.
\item[\pkgopt{verbose}] Boolean key. If
\pkgoptval{true}{verbose}, prints informational messages in
transcript.
@@ -2063,6 +2076,99 @@ a list of elements separated by commands, for example:
This isn't the same as comma-separated files, which is dealt
with in \sectionref{sec:databases}.
+\begin{definition}[\DescribeMacro{\DTLformatlist}]
+\cs{DTLformatlist}\marg{list}
+\end{definition}
+Formats the comma-separated list. The unstarred version scopes
+the internal operation. The starred form doesn't.
+The \meta{list} may either be an explicit comma-separated list or
+a control sequence whose replacement
+text is a comma-separated list. For example:
+\begin{verbatim}
+\newcommand{\mylist}{elephant,ant,zebra,duck}%
+\DTLformatlist{\mylist}
+\end{verbatim}
+which produces:
+\begin{display}
+\newcommand{\mylist}{elephant,ant,zebra,duck}%
+\DTLformatlist{\mylist}
+\end{display}
+The list formatting command inserts
+\begin{definition}[\DescribeMacro\DTLlistformatsep]
+\cs{DTLlistformatsep}
+\end{definition}
+between each item, except for the last pair which uses:
+\begin{definition}[\DescribeMacro\DTLlistformatlastsep]
+\cs{DTLlistformatlastsep}
+\end{definition}
+if there are only two items in the list or
+\begin{definition}[\DescribeMacro\DTLlistformatoxford]
+\cs{DTLlistformatoxford}\cs{DTLlistformatlastsep}
+\end{definition}
+if there are three or more items in the list.
+\cs{DTLlistformatlastsep} uses
+\begin{definition}[\DescribeMacro\DTLandname]
+\cs{DTLandname}
+\end{definition}
+Each item in the list is formatted according to
+\begin{definition}[\DescribeMacro\DTLlistformatitem]
+\cs{DTLlistformatitem}\marg{item}
+\end{definition}
+
+The default definitions are:
+\begin{itemize}
+\item \cs{DTLlistformatitem}\marg{item}: just does \meta{item};
+\item \cs{DTLlistformatsep}: \verb*|, | (comma followed by a space);
+\item \cs{DTLandname}: if \ics{andname} is
+defined this is defined as \cs{andname}
+otherwise it's defined as \verb|\&|;
+\item \cs{DTLlistformatlastsep}: does \verb*| \DTLandname\space|;
+\item \cs{DTLlistformatoxford}: does nothing (so if you want an
+Oxford comma you need to redefine this).
+\end{itemize}
+For example
+\begin{verbatim}
+\renewcommand{\DTLlistformatitem}[1]{\emph{#1}}%
+\renewcommand{\DTLlistformatoxford}{,}%
+\renewcommand{\DTLandname}{and}%
+One: \DTLformatlist{elephant}.
+
+Two: \DTLformatlist{elephant,ant}.
+
+Three: \DTLformatlist{elephant,ant,zebra}.
+
+Four: \DTLformatlist{elephant,ant,zebra,duck}.
+\end{verbatim}
+produces:
+\begin{display}
+\renewcommand{\DTLlistformatitem}[1]{\emph{#1}}%
+\renewcommand{\DTLlistformatoxford}{,}%
+\renewcommand{\DTLandname}{and}%
+One: \DTLformatlist{elephant}.
+
+Two: \DTLformatlist{elephant,ant}.
+
+Three: \DTLformatlist{elephant,ant,zebra}.
+
+Four: \DTLformatlist{elephant,ant,zebra,duck}.
+\end{display}
+
+You can test if an element is contained in a comma-separated list
+using:
+\begin{definition}[\DescribeMacro{\DTLifinlist}]
+\cs{DTLifinlist}\marg{element}\marg{list}\marg{true part}\marg{false part}
+\end{definition}
+If \meta{element} is contained in the comma-separated list given
+by \meta{list}, then this does \meta{true part} otherwise it does false
+part. (Does a one level expansion on \meta{list}, but no
+expansion on \meta{element}.)
+
+\begin{definition}[\DescribeMacro{\DTLnumitemsinlist}]
+\cs{DTLnumitemsinlist}\marg{list}\marg{cmd}
+\end{definition}
+Counts the number of non-empty elements in \meta{list} and stores
+result in \meta{cmd}, which must be a control sequence.
+
\begin{definition}[\DescribeMacro\dtlsortlist]
\cs{dtlsortlist}\marg{list cs}\marg{criteria cs}
\end{definition}
@@ -2075,6 +2181,12 @@ count register should be set to $-1$, if \meta{A} and \meta{B} are
considered the same then the count register should be set to 0,
and if \meta{A} is considered greater than \meta{B}, then the count
register should be set to 1.
+\begin{important}
+It's inefficient to use \TeX\ to sort and comparisons are only
+made according to the character codes and so are inappropriate
+for extended Latin or non-Latin alphabets. It's better to use
+an external tool where possible.
+\end{important}
The \styfmt{datatool-base} package provides some predefined
criteria commands:
@@ -2196,6 +2308,18 @@ files saved using \ics{DTLsaverawdb} or \ics{DTLprotectedsaverawdb} in a~graphic
import data from a~SQL database, a~CSV file or a~\sty{probsoln}
dataset.
+Each database has the data stored internally in a token register and
+the header information is stored in an internal control sequence.
+In general you don't need to worry about the way it's stored, except
+that row indexes start from 1 (the first row of data) and column
+indexes also start from 1. Columns may be referenced by a label
+but rows can only be referenced by the row index. Once the internal
+commands and registers have been set, \styfmt{datatool} doesn't keep
+a record of how or where the information came from (such as a CSV
+file or through a file created by \app{datatooltk}). Changes to the
+data only modify the internal commands and are lost at the end of
+the \LaTeX\ run unless you save the data.
+
\section{Creating a New Database}
\label{sec:newdb}
@@ -2364,6 +2488,8 @@ can convert it to \sty{datatool}'s internal database format using
\app{datatooltk} and the input it using \ics{input} or \ics{DTLloaddbtex}. See the
\app{datatooltk} documentation for further details.
\end{important}
+Remember that row numbers in \sty{datatool} refer to the row index
+of the internal data not to line numbers in the CSV file.
Instead of using the commands described in \autoref{sec:newdb}
to create a new database, you can load a database from an
@@ -2537,7 +2663,7 @@ can use:
\begin{definition}[\DescribeMacro{\DTLloadrawdb}]%
\cs{DTLloadrawdb}\oarg{options}\marg{db name}\marg{filename}
\end{definition}
-This is the same as \ics{DTLloaddb} except that it maps nine of
+This is similar to \ics{DTLloaddb} except that it maps nine of
the ten special characters onto commands which produce that
symbol. The only character that retains its active state is the
backslash character, so you will still need to check the file
@@ -2561,6 +2687,22 @@ As with \ics{DTLloaddb}, you can govern whether or not a new
database should be created with \ics{DTLnewdbonloadtrue} and
\ics{DTLnewdbonloadfalse}.
+Note that \cs{DTLloadrawdb} is not recommended for CSV files that
+contain commands. Any active characters occurring within the
+file must be mapped. The mapping is done through
+expansion. Version 2.28 now uses \cs{xdef} rather than
+\cs{protected@xdef}, but \cs{DTLloadrawdb} isn't intended for files
+containing \LaTeX\ code, but rather for files generated by a
+non-\TeX\ aware method that doesn't guard against \LaTeX\ special
+characters.
+
+If you have UTF-8 data, it's best to use an engine that natively
+supports Unicode. Remember that there's no point using
+\cs{DTLloadrawdb} (instead of \cs{DTLloaddb}) if your file doesn't
+contain any special characters that require mapping. It's less
+efficient to load if each row has to be converted, particularly for
+large files.
+
\begin{table}[htbp]
\caption[Special character mappings used by
\cs{DTLloadrawdb}]{Special character mappings used by
@@ -4193,7 +4335,9 @@ example:
\end{verbatim}
will delete the second row in the database labelled ``scores''.
There is also a starred version that doesn't check for the
-existence of the database.
+existence of the database. Remember that the row index refers to the
+internal data not to a reference in the external source if the data
+has been input.
The following commands may be used in the body of the
\ics{DTLforeach} loop,\footnote{Only the unstarred version of
@@ -4625,6 +4769,12 @@ To determine a person's gender when mail merging, see
\section{Sorting a Database}
\label{sec:sort}
+The sort methods described here use \TeX\ to sort, which is very
+inefficient. The comparison handlers use a character code comparison
+rather than locale-sensitive alphabetic ordering. It's more
+efficient to use \app{datatooltk} to import and sort at the same
+time.
+
\begin{definition}[\DescribeMacro{\dtlsort}]%
\cs{dtlsort}\oarg{replacement key list}\marg{sort criteria}\marg{db
name}\marg{handler}
@@ -4752,6 +4902,7 @@ code for details on the syntax of the handler. (You may want to
consider uploading your handler as a separate package to CTAN if you
think it will be of general use.)
+\label{utf8support}%
As from version 2.24, the predefined handlers now have limited support for UTF-8
characters. \emph{This is still experimental.} The support will
automatically be switched on if the \sty{inputenc} package is loaded
@@ -4769,6 +4920,8 @@ or
\usepackage[utf8]{datatool-base}
\usepackage[utf8]{inputenc}
\end{verbatim}
+(As from version 2.28, you can now also pass the \pkgopt{utf8}
+option to \sty{datatool} and \sty{datagidx}.)
You can also enable this option after \sty{datatool-base} has been loaded
using
\begin{definition}[\DescribeMacro\dtlenableUTFviii]
@@ -5494,20 +5647,6 @@ of the rows to be swapped. For example:
\end{verbatim}
will swap the third and fifth rows.
-\begin{definition}[\DescribeMacro{\DTLifinlist}]
-\cs{DTLifinlist}\marg{element}\marg{list}\marg{true part}\marg{false part}
-\end{definition}
-If \meta{element} is contained in the comma-separated list given
-by \meta{list}, then do \meta{true part} otherwise do false
-part. (Does a one level expansion on \meta{list}, but no
-expansion on \meta{element}.)
-
-\begin{definition}[\DescribeMacro{\DTLnumitemsinlist}]
-\cs{DTLnumitemsinlist}\marg{list}\marg{cmd}
-\end{definition}
-Counts the number of non-empty elements in \meta{list} and stores
-result in \meta{cmd}, which must be a control sequence.
-
\begin{example}{Two Database Rows Per Tabular Row
(Column-Wise)}{ex:twoblocks}
This example adapts \autoref{ex:2rows} so that the list is ordered
@@ -5578,7 +5717,9 @@ This produces \autoref{tab:twoblocks}.
If you want to select from or edit a particular row in a database without having
to iterate through the database using \cs{DTLforeach}, you can use
-the commands described in this section.
+the commands described in this section. Remember that the row index
+is a reference to the internal data and is unrelated to references
+in the original source (such as line numbers in a CSV file).
\begin{definition}[\DescribeMacro{\DTLgetrowindex}]
\cs{DTLgetrowindex}\marg{row cs}\marg{db name}\marg{col
@@ -5604,6 +5745,16 @@ cs}\cs{dtlnovalue}. For example:
\fi
\end{verbatim}
+If you want \meta{value} to be fully expanded before testing
+you can use
+\begin{definition}[\DescribeMacro{\xdtlgetrowindex}]
+\cs{xdtlgetrowindex}\marg{row cs}\marg{db name}\marg{col
+idx}\marg{value}
+\end{definition}
+(The \sty{etoolbox} package provides \cs{expandonce} if you
+only want one level of expansion. See the \sty{etoolbox} manual for
+further details.)
+
\begin{definition}[\DescribeMacro{\dtlgetrow}]
\cs{dtlgetrow}\marg{db name}\marg{row idx}
\end{definition}
@@ -6356,7 +6507,8 @@ be the name of the style. Available styles are listed in
is only applied if \csopt{printterms}{columns} is greater than~1.
If \textsf{true}, the columns are balanced. If \textsf{false}, the
columns aren't balanced. If no value is specified, \textsf{true} is
-assumed.
+assumed. If \verb|balance=false| and \verb|columns=2|
+\ics{twocolumn} is used instead of \env{multicols*}.
\item[\csopt{newgidx}{heading}] The heading at the start of the
index/glossary.
@@ -7617,6 +7769,12 @@ the index/glossary database.
The following package options are available for \styfmt{datagidx}:
\begin{description}
+\item[\pkgopt{utf8}] A boolean option (same as for
+\sty{datatool-base}). If you both load \sty{inputenc} with UTF-8
+support and you use accent commands like \cs{'} or \cs{c} then make
+sure you have at least version 2.05 of \sty{mfirstuc} if you want to
+use commands like \cs{Gls}.
+
\item[\pkgopt{optimize}] Sets the optimization. (See
\autoref{sec:optimize}.)
diff --git a/Master/texmf-dist/doc/latex/datatool/samples/sample-autokeys.pdf b/Master/texmf-dist/doc/latex/datatool/samples/sample-autokeys.pdf
index 066a7dacb8d..cac7938fe64 100644
--- a/Master/texmf-dist/doc/latex/datatool/samples/sample-autokeys.pdf
+++ b/Master/texmf-dist/doc/latex/datatool/samples/sample-autokeys.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datatool/samples/sample-barchart.pdf b/Master/texmf-dist/doc/latex/datatool/samples/sample-barchart.pdf
index 8cfeed51c1f..da792ad297e 100644
--- a/Master/texmf-dist/doc/latex/datatool/samples/sample-barchart.pdf
+++ b/Master/texmf-dist/doc/latex/datatool/samples/sample-barchart.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datatool/samples/sample-datatooltk.pdf b/Master/texmf-dist/doc/latex/datatool/samples/sample-datatooltk.pdf
index 3edcf8f6282..860bc996584 100644
--- a/Master/texmf-dist/doc/latex/datatool/samples/sample-datatooltk.pdf
+++ b/Master/texmf-dist/doc/latex/datatool/samples/sample-datatooltk.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datatool/samples/sample-dict.pdf b/Master/texmf-dist/doc/latex/datatool/samples/sample-dict.pdf
index 0b3c08d8ea7..3b83af7bf01 100644
--- a/Master/texmf-dist/doc/latex/datatool/samples/sample-dict.pdf
+++ b/Master/texmf-dist/doc/latex/datatool/samples/sample-dict.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datatool/samples/sample-dict.tex b/Master/texmf-dist/doc/latex/datatool/samples/sample-dict.tex
index 5f2dbee76dc..fbf32731802 100644
--- a/Master/texmf-dist/doc/latex/datatool/samples/sample-dict.tex
+++ b/Master/texmf-dist/doc/latex/datatool/samples/sample-dict.tex
@@ -14,7 +14,7 @@
% Make a database labelled 'index' with the given title
-\newgidx[heading={\title}]{index}{Sample Dictionary Created Using datagidx}
+\newgidx{index}{Sample Dictionary Created Using datagidx}
% Define some terms for the dictionary
@@ -415,21 +415,16 @@ particular society or organisation}
\par
}
-% Title information
-\author{}
-\date{}
-
\begin{document}
-% don't number the chapters
-\setcounter{secnumdepth}{-1}
\printterms
[
database=index,
- postheading={\maketitle This is an example document illustrating
+ postheading={This is an example document illustrating
the use of the datagidx package. The examples here are taken from
- the Compact Oxford English Dictionary.
+ the Compact Oxford English Dictionary.\medskip
},
+ balance=false,
columns=2,
postdesc=dot,%
childsort=false,% don't sort the child lists
diff --git a/Master/texmf-dist/doc/latex/datatool/samples/sample-europecv-bib.pdf b/Master/texmf-dist/doc/latex/datatool/samples/sample-europecv-bib.pdf
index 354505fe7c0..63dff3a1384 100644
--- a/Master/texmf-dist/doc/latex/datatool/samples/sample-europecv-bib.pdf
+++ b/Master/texmf-dist/doc/latex/datatool/samples/sample-europecv-bib.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datatool/samples/sample-gidx.pdf b/Master/texmf-dist/doc/latex/datatool/samples/sample-gidx.pdf
index 3f45901c694..39ac866b414 100644
--- a/Master/texmf-dist/doc/latex/datatool/samples/sample-gidx.pdf
+++ b/Master/texmf-dist/doc/latex/datatool/samples/sample-gidx.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datatool/samples/sample-glossary.pdf b/Master/texmf-dist/doc/latex/datatool/samples/sample-glossary.pdf
index d2969ec2cb5..130dfab5cc0 100644
--- a/Master/texmf-dist/doc/latex/datatool/samples/sample-glossary.pdf
+++ b/Master/texmf-dist/doc/latex/datatool/samples/sample-glossary.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datatool/samples/sample-index.pdf b/Master/texmf-dist/doc/latex/datatool/samples/sample-index.pdf
index 35e8bdd2a68..4c197d65490 100644
--- a/Master/texmf-dist/doc/latex/datatool/samples/sample-index.pdf
+++ b/Master/texmf-dist/doc/latex/datatool/samples/sample-index.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datatool/samples/sample-mail-merge.pdf b/Master/texmf-dist/doc/latex/datatool/samples/sample-mail-merge.pdf
index b6966f6ef30..2b6f7db9b1c 100644
--- a/Master/texmf-dist/doc/latex/datatool/samples/sample-mail-merge.pdf
+++ b/Master/texmf-dist/doc/latex/datatool/samples/sample-mail-merge.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datatool/samples/sample-piechart.pdf b/Master/texmf-dist/doc/latex/datatool/samples/sample-piechart.pdf
index 6bd3622cb87..bb4bdcdd3d1 100644
--- a/Master/texmf-dist/doc/latex/datatool/samples/sample-piechart.pdf
+++ b/Master/texmf-dist/doc/latex/datatool/samples/sample-piechart.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datatool/samples/sample-sort.pdf b/Master/texmf-dist/doc/latex/datatool/samples/sample-sort.pdf
index 5a2b5fc0220..3a1926d7f9c 100644
--- a/Master/texmf-dist/doc/latex/datatool/samples/sample-sort.pdf
+++ b/Master/texmf-dist/doc/latex/datatool/samples/sample-sort.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datatool/samples/sample-student-scores.pdf b/Master/texmf-dist/doc/latex/datatool/samples/sample-student-scores.pdf
index 7e6084b0e8d..dfc1ef3ea0d 100644
--- a/Master/texmf-dist/doc/latex/datatool/samples/sample-student-scores.pdf
+++ b/Master/texmf-dist/doc/latex/datatool/samples/sample-student-scores.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/datatool/samples/sample-two-per-row.pdf b/Master/texmf-dist/doc/latex/datatool/samples/sample-two-per-row.pdf
index 8d2778b94c4..cd5364234f4 100644
--- a/Master/texmf-dist/doc/latex/datatool/samples/sample-two-per-row.pdf
+++ b/Master/texmf-dist/doc/latex/datatool/samples/sample-two-per-row.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/datatool/datatool.dtx b/Master/texmf-dist/source/latex/datatool/datatool.dtx
index d84c46f7ee0..d1de576df24 100644
--- a/Master/texmf-dist/source/latex/datatool/datatool.dtx
+++ b/Master/texmf-dist/source/latex/datatool/datatool.dtx
@@ -1,9 +1,11 @@
%\iffalse
-% datatool.dtx generated using makedtx version 1.1 (c) Nicola Talbot
+% datatool.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
-% -macrocode "databib\.bst"
-% -comment "databib\.bst"
% -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"
@@ -16,10 +18,8 @@
% -src "person.sty\Z=>person.sty"
% -src "databib.bst\Z=>databib.bst"
% -doc "datatool-manual.tex"
-% -author "Nicola Talbot"
-% -codetitle ""
% datatool
-% Created on 2016/7/28 15:09
+% Created on 2017/11/10 16:07
%\fi
%\iffalse
%<*package>
@@ -42,7 +42,7 @@
%\fi
% \iffalse
% Doc-Source file to use with LaTeX2e
-% Copyright (C) 2016 Nicola Talbot, all rights reserved.
+% Copyright (C) 2017 Nicola Talbot, all rights reserved.
% \fi
% \iffalse
%<*driver>
@@ -68,7 +68,7 @@ datatool.dtx
\doxitem{Counter}{counter}{counters}
\doxitem{Option}{option}{package options}
-\CheckSum{23739}
+\CheckSum{23978}
\RecordChanges
\PageIndex
@@ -81,11 +81,11 @@ datatool.dtx
%\fi
%\MakeShortVerb{"}
%
-%\title{Documented Code for datatool v2.27}
+%\title{Documented Code for datatool v2.28}
%\author{Nicola L. C. Talbot\\
%\url{http://www.dickimaw-books.com/}}
%
-%\date{2016-07-28}
+%\date{2017-11-10}
%\maketitle
%
%\pagenumbering{roman}
@@ -121,7 +121,7 @@ datatool.dtx
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-base}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{datatool-base}[2017/11/10 v2.28 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -767,34 +767,135 @@ datatool.dtx
% \end{macrocode}
%\end{macro}
%
+%This next command is based on the list iteration exercise
+%given at
+%\url{http://www.dickimaw-books.com/latex/admin/html/foreachtips.shtml#oxfordcomma}
+%It's designed to format a comma-separated list using
+%\cs{DTLlistformatsep}
+%between each item except for the last. The separator for the
+%last pair is \cs{DTLlistformatlastsep} if the list only contains two
+%items or \cs{DTLlistformatoxford}\cs{DTLlistformatlastsep} if the list contains three or
+%more items. Each item is formatted according to
+%\cs{DTLlistformatitem}.
+%\begin{macro}{\DTLlistformatsep}
+%\changes{2.28}{2017-11-10}{new}
+% \begin{macrocode}
+\newcommand*{\DTLlistformatsep}{, }
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\DTLlistformatoxford}
+%\changes{2.28}{2017-11-10}{new}
+% \begin{macrocode}
+\newcommand*{\DTLlistformatoxford}{}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\DTLandname}
+%\changes{2.28}{2017-11-10}{new}
+% \begin{macrocode}
+\ifdef\andname
+{\newcommand*{\DTLandname}{\andname}}
+{\newcommand*{\DTLandname}{\&}}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\DTLlistformatlastsep}
+%\changes{2.28}{2017-11-10}{new}
+% \begin{macrocode}
+\newcommand*{\DTLlistformatlastsep}{ \DTLandname\space}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\DTLlistformatitem}
+%\changes{2.28}{2017-11-10}{new}
+% \begin{macrocode}
+\newcommand*{\DTLlistformatitem}[1]{#1}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@dtl@formatlist@handler}
+%\changes{2.28}{2017-11-10}{new}
+% \begin{macrocode}
+\newcommand*{\@dtl@formatlist@handler}[1]{%
+ \@dtl@formatlist@itemsep
+ \@dtl@formatlist@lastitem
+ \renewcommand{\@dtl@formatlist@lastitem}{%
+ \renewcommand{\@dtl@formatlist@itemsep}{%
+ \DTLlistformatsep
+ \renewcommand*{\@dtl@formatlist@prelastitemsep}{%
+ \DTLlistformatoxford}}%
+ \renewcommand{\@dtl@formatlist@prelastitem}{%
+ \@dtl@formatlist@prelastitemsep
+ \DTLlistformatlastsep}%
+ \DTLlistformatitem{#1}%
+ }%
+}%
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\DTLformatlist}
+%\changes{2.28}{2017-11-10}{new}
+%Formats the comma-separated list supplied in its argument.
+%The unstarred version adds grouping.
+% \begin{macrocode}
+\newrobustcmd*{\DTLformatlist}{%
+ \@ifstar{\s@dtlformatlist}{\@dtlformatlist}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\s@dtlformatlist}
+%\changes{2.28}{2017-11-10}{new}
+%Starred version of \cs{DTLformatlist} doesn't add grouping.
+% \begin{macrocode}
+\newcommand*{\s@dtlformatlist}[1]{%
+ \def\@dtl@formatlist@itemsep{}%
+ \def\@dtl@formatlist@lastitem{}%
+ \def\@dtl@formatlist@prelastitem{}%
+ \def\@dtl@formatlist@prelastitemsep{}%
+ \@for\@dtl@formatlist@item:=#1\do{%
+ \expandafter\@dtl@formatlist@handler\expandafter{\@dtl@formatlist@item}%
+ }%
+ \@dtl@formatlist@prelastitem\@dtl@formatlist@lastitem
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@dtlformatlist}
+%\changes{2.28}{2017-11-10}{new}
+%Unstarred version of \cs{DTLformatlist} adds grouping.
+% \begin{macrocode}
+\newcommand*{\@dtlformatlist}[1]{{\s@dtlformatlist{#1}}}
+% \end{macrocode}
+%\end{macro}
+%
% \subsection{General Token Utilities}
-%\begin{macro}{\toks@gput@right@cx}
+%\changes{2.28}{2017-11-10}{renamed \cs{toks@g...} to
+%\cs{dtl@toks@g...}}
+%\begin{macro}{\@dtl@toks@gput@right@cx}
%\begin{definition}
-%\cs{toks@gput@right@cx}\marg{toks name}\marg{stuff}
+%\cs{dtl@toks@gput@right@cx}\marg{toks name}\marg{stuff}
%\end{definition}
% Globally appends stuff to token register \cs{}\meta{toks name}
% \begin{macrocode}
-\newcommand{\toks@gput@right@cx}[2]{%
- \def\@toks@name{#1}%
+\newcommand{\@dtl@toks@gput@right@cx}[2]{%
+ \def\@dtl@toks@name{#1}%
\edef\@dtl@stuff{#2}%
- \global\csname\@toks@name\endcsname\expandafter
+ \global\csname\@dtl@toks@name\endcsname\expandafter
\expandafter\expandafter{\expandafter\the
- \csname\expandafter\@toks@name\expandafter\endcsname\@dtl@stuff}%
+ \csname\expandafter\@dtl@toks@name\expandafter\endcsname\@dtl@stuff}%
}
% \end{macrocode}
%\end{macro}
-%\begin{macro}{\toks@gconcat@middle@cx}
+%\begin{macro}{\@dtl@toks@gconcat@middle@cx}
%\begin{definition}
-%\cs{toks@gconcat@middle@cx}\marg{toks name}\marg{before toks}\marg{stuff}\marg{after toks}
+%\cs{dtl@toks@gconcat@middle@cx}\marg{toks name}\marg{before toks}\marg{stuff}\marg{after toks}
%\end{definition}
% Globally sets token register \cs{}\meta{toks name} to
% the contents of \meta{before toks} concatenated with
% \meta{stuff} (expanded) and the contents of \meta{after toks}
% \begin{macrocode}
-\newcommand{\toks@gconcat@middle@cx}[4]{%
- \def\@toks@name{#1}%
+\newcommand{\@dtl@toks@gconcat@middle@cx}[4]{%
+ \def\@dtl@toks@name{#1}%
\edef\@dtl@stuff{#3}%
- \global\csname\@toks@name\endcsname\expandafter\expandafter
+ \global\csname\@dtl@toks@name\endcsname\expandafter\expandafter
\expandafter\expandafter\expandafter
\expandafter\expandafter{\expandafter\expandafter\expandafter
\the\expandafter\expandafter\expandafter#2%
@@ -5907,7 +6008,7 @@ datatool.dtx
% Definitions of fixed-point commands that use the \sty{fp} package.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-fp}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{datatool-fp}[2017/11/10 v2.28 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -6196,7 +6297,7 @@ datatool.dtx
% Definitions of fixed-point commands that use the \sty{pgfmath} package.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-pgfmath}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{datatool-pgfmath}[2017/11/10 v2.28 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -6537,7 +6638,7 @@ datatool.dtx
%\section{Package Declaration}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{datatool}[2017/11/10 v2.28 (NLCT)]
% \end{macrocode}
% Load required packages:
% \begin{macrocode}
@@ -6741,6 +6842,21 @@ datatool.dtx
% \end{macrocode}
%\end{option}
%
+%\begin{macro}{\@dtl@set@options}
+%\changes{2.28}{2017-11-10}{new}
+% \begin{macrocode}
+\newcommand*{\@dtl@set@options}{}
+% \end{macrocode}
+%\end{macro}
+%\begin{option}{utf8}
+%\changes{2.28}{2017-11-10}{new}
+%Pass to \sty{datatool-base}
+% \begin{macrocode}
+\define@choicekey{datatool.sty}{utf8}{true,false}[true]{%
+ \renewcommand*{\@dtl@set@options}{\setbool{@dtl@utf8}{#1}}%
+}
+% \end{macrocode}
+%\end{option}
% Process package options:
% \begin{macrocode}
\ProcessOptionsX
@@ -6755,6 +6871,10 @@ datatool.dtx
% \begin{macrocode}
\RequirePackage{datatool-base}
% \end{macrocode}
+%Set options that depend on \sty{datatool-base}:
+% \begin{macrocode}
+\@dtl@set@options
+% \end{macrocode}
%
%\begin{macro}{\DTLpar}
% Many of the commands used by this package are short commands.
@@ -7109,7 +7229,7 @@ datatool.dtx
% \end{macrocode}
% Append an empty row to the database
% \begin{macrocode}
- \toks@gput@right@cx{dtldb@#1}{%
+ \@dtl@toks@gput@right@cx{dtldb@#1}{%
\noexpand\db@row@elt@w%
\noexpand\db@row@id@w \number\csname dtlrows@#1\endcsname
\noexpand\db@row@id@end@%
@@ -7660,7 +7780,7 @@ datatool.dtx
% \end{macrocode}
% Update required
% \begin{macrocode}
- \toks@gconcat@middle@cx{dtlkeys@#1}%
+ \@dtl@toks@gconcat@middle@cx{dtlkeys@#1}%
{\@dtl@before}%
{%
\noexpand\db@plist@elt@w% start of key block
@@ -7687,7 +7807,7 @@ datatool.dtx
\csname dtlcols@#1\endcsname by 1\relax
\dtlcolumnnum=\csname dtlcols@#1\endcsname\relax
% \end{macrocode}
-% Set column index for this key
+% Set column index for this key.
% \begin{macrocode}
\expandafter\xdef\csname dtl@ci@#1@#2\endcsname{%
\number\dtlcolumnnum}%
@@ -7705,7 +7825,7 @@ datatool.dtx
% \end{macrocode}
% Append to property list
% \begin{macrocode}
- \toks@gput@right@cx{dtlkeys@#1}%
+ \@dtl@toks@gput@right@cx{dtlkeys@#1}%
{%
\noexpand\db@plist@elt@w
\noexpand\db@col@id@w \the\dtlcolumnnum
@@ -7799,7 +7919,7 @@ datatool.dtx
% Reconstruct property list
% \begin{macrocode}
\edef\@dtl@colnum{\number#2}\relax
- \toks@gconcat@middle@cx{dtlkeys@#1}%
+ \@dtl@toks@gconcat@middle@cx{dtlkeys@#1}%
{\@dtl@before}%
{%
\noexpand\db@plist@elt@w% start of block
@@ -7903,7 +8023,7 @@ datatool.dtx
% There are no entries in this row for the given column.
% Add this entry.
% \begin{macrocode}
- \toks@gconcat@middle@cx{dtldb@#1}%
+ \@dtl@toks@gconcat@middle@cx{dtldb@#1}%
{\dtlbeforerow}%
{%
% \end{macrocode}
@@ -8532,7 +8652,7 @@ datatool.dtx
% \cs{dtlcurrentrow} and \cs{dtlafterrow}
% \begin{macrocode}
\newcommand*{\dtlrecombine}{%
- \toks@gconcat@middle@cx{dtldb@\dtldbname}%
+ \@dtl@toks@gconcat@middle@cx{dtldb@\dtldbname}%
{\dtlbeforerow}%
{%
% \end{macrocode}
@@ -8582,7 +8702,7 @@ datatool.dtx
% \cs{dtlbeforerow} and \cs{dtlafterrow}
% \begin{macrocode}
\csname dtldb@\dtldbname\endcsname=\dtlbeforerow
- \toks@gput@right@cx{dtldb@\dtldbname}{\the\dtlafterrow}%
+ \@dtl@toks@gput@right@cx{dtldb@\dtldbname}{\the\dtlafterrow}%
\dtl@message{Removed row \number\dtlrownum\space in database
`\dtldbname'}%
}
@@ -8805,7 +8925,7 @@ datatool.dtx
% \end{macrocode}
% Append this entry to the current row.
% \begin{macrocode}
- \toks@gput@right@cx{dtlcurrentrow}%
+ \@dtl@toks@gput@right@cx{dtlcurrentrow}%
{%
% \end{macrocode}
% Begin column index specs:
@@ -8878,7 +8998,7 @@ datatool.dtx
% \end{macrocode}
% Append this entry to the current row.
% \begin{macrocode}
- \toks@gput@right@cx{dtlcurrentrow}%
+ \@dtl@toks@gput@right@cx{dtlcurrentrow}%
{%
% \end{macrocode}
% Begin column index specs:
@@ -9024,9 +9144,24 @@ datatool.dtx
% \end{macrocode}
%\end{macro}
%
-%\begin{macro}{\DTLgetrowindex}
+%\begin{macro}{\xdtlgetrowindex}
%\begin{definition}
-%\cs{DTLgetrowindex}\marg{row cs}\marg{database}\marg{column index}%
+%\cs{xdtlgetrowindex}\marg{row cs}\marg{database}\marg{column index}%
+%\marg{value}
+%\end{definition}
+% As above but expands the value.
+%\changes{2.28}{2017-11-10}{new}
+% \begin{macrocode}
+\newcommand*{\xdtlgetrowindex}[4]{%
+ \protected@edef\dtl@dogetrowindex{\noexpand\@dtlgetrowindex{\noexpand#1}{#2}{\number#3}{#4}}%
+ \dtl@dogetrowindex
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@dtlgetrowindex}
+%\begin{definition}
+%\cs{@dtlgetrowindex}\marg{row cs}\marg{database}\marg{column index}%
%\marg{value}
%\end{definition}
% Column index must be fully expanded.
@@ -9762,7 +9897,7 @@ datatool.dtx
\dtlforeachlevel\endcsname
\@dtl@after=\csname @dtl@next\romannumeral
\dtlforeachlevel\endcsname
- \toks@gconcat@middle@cx{dtldb@#2}%
+ \@dtl@toks@gconcat@middle@cx{dtldb@#2}%
{\@dtl@before}%
{%
% \end{macrocode}
@@ -10099,7 +10234,7 @@ datatool.dtx
% \end{macrocode}
% Append this entry to the current row.
% \begin{macrocode}
- \toks@gput@right@cx{@dtl@cur\romannumeral\dtlforeachlevel}%
+ \@dtl@toks@gput@right@cx{@dtl@cur\romannumeral\dtlforeachlevel}%
{%
\noexpand\db@col@id@w \number\dtlcolumnnum
\noexpand\db@col@id@end@
@@ -10309,7 +10444,7 @@ datatool.dtx
\expandafter\@dtl@toks\expandafter{\@dtl@tmp}% new value
\expandafter\@dtl@before\expandafter{\dtl@pre}%
\expandafter\@dtl@after\expandafter{\dtl@post}%
- \toks@gconcat@middle@cx
+ \@dtl@toks@gconcat@middle@cx
{@dtl@cur\romannumeral\dtlforeachlevel}%
{\@dtl@before}%
{%
@@ -13887,22 +14022,38 @@ datatool.dtx
%\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{}%
- \expandafter\@dtl@starttrim#1\@nil
+ \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
+% 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}%
@@ -13933,6 +14084,7 @@ datatool.dtx
% \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}
@@ -13996,10 +14148,11 @@ datatool.dtx
\@dtl@doreadraw?1?2>>>
\gdef\@dtl@doreadraw?1?2<\relax
\read?1 to \tmp
-\xdef?2<\tmp>\relax
+\protected@xdef?2<\tmp>\relax
>
\endgroup
% \end{macrocode}
+%\changes{2.28}{2017-11-10}{changed \cs{xdef} to \cs{protected@xdef}}.
%\end{macro}
%\begin{macro}{\@dtl@activatebraces}
% \cs{@dtl@activatebraces} resets braces for \cs{@dtl@rawread}
@@ -14130,7 +14283,7 @@ datatool.dtx
% Declare package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datagidx}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{datagidx}[2017/11/10 v2.28 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -14887,6 +15040,15 @@ datatool.dtx
% \end{macrocode}
%\end{option}
%
+%\begin{option}{utf8}
+%\changes{2.28}{2017-11-10}{new}
+% \begin{macrocode}
+\define@choicekey{datatool.sty}{utf8}{true,false}[true]{%
+ \setbool{@dtl@utf8}{#1}%
+}
+% \end{macrocode}
+%\end{option}
+%
% These options govern the general layout of the glossary/index.
%\begin{option}{columns}
% The number of columns used by \env{multicols} (or
@@ -17347,11 +17509,22 @@ datatool.dtx
\define@key{newgloss}{postheading}{%
\renewcommand*{\datagidx@postheading}{#1}%
}
+% \end{macrocode}
+%\begin{macro}{\ifdatagidxbalance}
+%\changes{2.28}{2017-11-10}{new}
+% \begin{macrocode}
+\newif\ifdatagidxbalance
+\datagidxbalancetrue
+% \end{macrocode}
+%\end{macro}
+% \begin{macrocode}
\define@choicekey{newgloss}{balance}[\val\nr]{true,false}[true]{%
\ifcase\nr\relax
\renewcommand*{\datagidx@multicols}{multicols}%
+ \datagidxbalancetrue
\or
\renewcommand*{\datagidx@multicols}{multicols*}%
+ \datagidxbalancefalse
\fi
}
\define@key{newgloss}{sort}{\renewcommand*{\datagidx@sort}{#1}}
@@ -18025,13 +18198,71 @@ datatool.dtx
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\datagidxextendedtoascii}
+% Convert commands like \ics{aa} into the closest ASCII equivalent.
+%\changes{2.28}{2017-11-10}{new}
+% \begin{macrocode}
+\newcommand{\datagidxextendedtoascii}{%
+ \def\AE{AE}%
+ \def\ae{ae}%
+ \def\OE{OE}%
+ \def\oe{oe}%
+ \def\AA{AA}%
+ \def\aa{aa}%
+ \def\L{L}%
+ \def\l{l}%
+ \def\O{O}%
+ \def\o{o}%
+ \def\SS{SS}%
+ \def\ss{ss}%
+ \def\th{th}%
+ \def\TH{TH}%
+ \def\dh{dh}%
+ \def\DH{DH}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\datagidxconvertchars}
+% Convert commands like \cs{\&}.
+%\changes{2.28}{2017-11-10}{new}
+% \begin{macrocode}
+\newcommand*{\datagidxconvertchars}{%
+ \let~\space
+ \ifdef\andname
+ {%
+ \let\&\andname
+ }%
+ {%
+ \def\&{\expandafter\@gobble\string\&}%
+ }%
+ \def\_{\string_}%
+ \def\${\string$}%
+ \def\#{\expandafter\@gobble\string\#}%
+ \def\%{\expandafter\@gobble\string\%}%
+ \def\{{\expandafter\@gobble\string\{}%
+ \def\}{\expandafter\@gobble\string\}}%
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\datagidxstripaccents}
% Strip accents so they don't interfere with the label and sort.
% If you want to write your own comparison handler macro, you'll
% need to redefine this if you want accented letters to be sorted
-% differently from the unaccented version.
+% differently from the unaccented version. This command should
+% only be used within a scope.
% \begin{macrocode}
\newcommand*{\datagidxstripaccents}{%
+% \end{macrocode}
+% These redefinitions will only work with \cs{edef} or \cs{xdef}:
+% \begin{macrocode}
+ \let\add@accent@\@secondoftwo
+ \let\@text@composite@x\@secondoftwo
+ \let\@tabacckludge\@secondoftwo
+% \end{macrocode}
+% The following are need with \cs{protected@edef} or \cs{protected@xdef}:
+% \begin{macrocode}
\expandafter\def\csname \encodingdefault-cmd\endcsname##1##2##3{##3}%
\expandafter\def\csname OT1-cmd\endcsname##1##2##3{##3}%
\expandafter\def\csname T1-cmd\endcsname##1##2##3{##3}%
@@ -18047,12 +18278,7 @@ datatool.dtx
%\end{definition}
% Defaults to normal behaviour.
% \begin{macrocode}
-\ifdef\newterm
-{%
-}%
-{%
- \newcommand{\newterm}{\datagidx@newterm}
-}
+\providecommand{\newterm}{\datagidx@newterm}
% \end{macrocode}
%\end{macro}
%
@@ -18127,14 +18353,10 @@ datatool.dtx
\let\textsl\DTLgidxNoFormat
\let\emph\DTLgidxNoFormat
\let\textsuperscript\DTLgidxNoFormat
- \let~\space
- \ifdef\andname
- {%
- \let\&\andname
- }%
- {%
- \def\&{and}%
- }%
+% \end{macrocode}
+% Convert character commands like \cs{\&}.
+% \begin{macrocode}
+ \datagidxconvertchars
% \end{macrocode}
% Strip \cs{ensuremath}.
% \begin{macrocode}
@@ -18156,10 +18378,15 @@ datatool.dtx
% Strip accent commands so they don't interfere with the label.
% \begin{macrocode}
\datagidxstripaccents
+ \datagidxextendedtoascii
% \end{macrocode}
% Allow user to hook into this.
% \begin{macrocode}
\newtermlabelhook
+% \end{macrocode}
+%There shouldn't really be any fragile commands in \verb|#2| but
+%using \cs{protected@xdef} to be on the safe side.
+% \begin{macrocode}
\protected@xdef\newterm@label{\newterm@label}%
% \end{macrocode}
% These commands behave differently for the sort key:
@@ -18175,6 +18402,10 @@ datatool.dtx
\let\DTLgidxRank\datagidx@rank
\let\DTLgidxParticle\datagidx@particle
\let\DTLgidxNameNum\datagidx@namenum
+% \end{macrocode}
+%Need to use \cs{protected@xdef} here, which means limited support
+%for stripping accents.
+% \begin{macrocode}
\protected@xdef\newterm@sort{\newterm@sort}%
\egroup
}
@@ -19705,6 +19936,60 @@ datatool.dtx
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\printtermsstartpar}
+%\changes{2.28}{2017-11-10}{new}
+% \begin{macrocode}
+\newcommand{\printtermsstartpar}{\par}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\printterms@setupmulticol}
+%\changes{2.28}{2017-11-10}{new}
+% \begin{macrocode}
+\newcommand*{\printterms@setupmulticol}{%
+ \ifdefempty\datagidx@postheading
+ {%
+ \edef\datagidx@prestart{%
+ \noexpand\datagidx@heading{\noexpand\datagidx@title}%
+ \noexpand\begin{\datagidx@multicols}{\datagidx@columns}%
+ }%
+ }%
+ {%
+ \edef\datagidx@prestart{%
+ \noexpand\datagidx@heading{\noexpand\datagidx@title}%
+ \noexpand\begin{\datagidx@multicols}{\datagidx@columns}%
+ [\noexpand\datagidx@postheading]%
+ }%
+ }%
+ \edef\datagidx@postend{%
+ \noexpand\end{\datagidx@multicols}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\printterms@setuptwocol}
+%\changes{2.28}{2017-11-10}{new}
+% \begin{macrocode}
+\newcommand*{\printterms@setuptwocol}{%
+ \def\datagidx@prestart{%
+ \twocolumn[\datagidx@heading{\datagidx@title}%
+ \datagidx@postheading]}%
+ \if@twocolumn
+ \def\datagidx@postend{}%
+ \else
+ \def\datagidx@postend{\printtermsrestoreonecolumn}%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\printtermsrestoreonecolumn}
+% \begin{macrocode}
+\newcommand{\printtermsrestoreonecolumn}{\onecolumn}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\printterms}
%\begin{definition}
%\cs{printterms}[options]
@@ -19773,12 +20058,15 @@ datatool.dtx
% Do we need to use \env{multicols}?
% \begin{macrocode}
\ifnum\datagidx@columns>1\relax
- \edef\datagidx@prestart{%
- \noexpand\begin{\datagidx@multicols}{\datagidx@columns}%
- }%
- \edef\datagidx@postend{%
- \noexpand\end{\datagidx@multicols}%
- }%
+ \ifnum\datagidx@columns=2\relax
+ \ifdatagidxbalance
+ \printterms@setupmulticol
+ \else
+ \printterms@setuptwocol
+ \fi
+ \else
+ \printterms@setupmulticol
+ \fi
\else
\def\datagidx@prestart{}%
\def\datagidx@postend{}%
@@ -19793,10 +20081,16 @@ datatool.dtx
% Now display the glossary/index:
% \begin{macrocode}
\def\datagidx@labellist{}%
- \datagidx@heading{\datagidx@title}%
- \datagidx@postheading
+ \ifnum\datagidx@columns=1\relax
+ \datagidx@heading{\datagidx@title}%
+ \datagidx@postheading
+ \fi
\datagidx@do@sort
\datagidx@prestart
+% \end{macrocode}
+%\changes{2.28}{2017-11-10}{added paragraph break at the start}:
+% \begin{macrocode}
+ \printtermsstartpar
\datagidxstart
\let\DTLgidxName\datagidx@invert
\let\DTLgidxPlace\datagidx@invert
@@ -20039,7 +20333,7 @@ datatool.dtx
%\section{Package Declaration}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{databib}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{databib}[2017/11/10 v2.28 (NLCT)]
% \end{macrocode}
% Load required packages:
% \begin{macrocode}
@@ -22962,7 +23256,7 @@ already exists}{}}}}
% Declare package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{databar}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{databar}[2017/11/10 v2.28 (NLCT)]
% \end{macrocode}
% Require \sty{xkeyval} package
% \begin{macrocode}
@@ -24269,7 +24563,7 @@ already exists}{}}}}
% Declare package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datapie}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{datapie}[2017/11/10 v2.28 (NLCT)]
% \end{macrocode}
% Require \sty{xkeyval} package
% \begin{macrocode}
@@ -25071,7 +25365,7 @@ already exists}{}}}}
% Declare package:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{dataplot}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{dataplot}[2017/11/10 v2.28 (NLCT)]
% \end{macrocode}
% Required packages
% \begin{macrocode}
@@ -26693,7 +26987,7 @@ east,southeast,south,southwest,west,northwest}[northeast]{%
% Package identification:
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{person}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{person}[2017/11/10 v2.28 (NLCT)]
% \end{macrocode}
% Requires the \sty{ifthen} package.
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/datatool/datatool.ins b/Master/texmf-dist/source/latex/datatool/datatool.ins
index e8f57a2928b..27f87c7c334 100644
--- a/Master/texmf-dist/source/latex/datatool/datatool.ins
+++ b/Master/texmf-dist/source/latex/datatool/datatool.ins
@@ -1,14 +1,14 @@
-% datatool.ins generated using makedtx version 1.1 2016/7/28 15:09
+% datatool.ins generated using makedtx version 1.2 2017/11/10 16:07
\input docstrip
\preamble
datatool.dtx
- Copyright 2016 Nicola Talbot
+ Copyright 2017 Nicola Talbot
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
- of this license of (at your option) any later version.
+ of this license or (at your option) any later version.
The latest version of this license is in
http://www.latex-project.org/lppl.txt
and version 1.3 or later is part of all distributions of LaTeX
diff --git a/Master/texmf-dist/tex/latex/datatool/databar.sty b/Master/texmf-dist/tex/latex/datatool/databar.sty
index 4ac4e031e06..4747467b428 100644
--- a/Master/texmf-dist/tex/latex/datatool/databar.sty
+++ b/Master/texmf-dist/tex/latex/datatool/databar.sty
@@ -7,11 +7,11 @@
%% datatool.dtx (with options: `databar.sty,package')
%%
%% datatool.dtx
-%% Copyright 2016 Nicola Talbot
+%% Copyright 2017 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license of (at your option) any later version.
+%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{databar}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{databar}[2017/11/10 v2.28 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{dataplot}
\newif\ifDTLcolorbarchart
diff --git a/Master/texmf-dist/tex/latex/datatool/databib.sty b/Master/texmf-dist/tex/latex/datatool/databib.sty
index 528f05adbdd..aef44e924d3 100644
--- a/Master/texmf-dist/tex/latex/datatool/databib.sty
+++ b/Master/texmf-dist/tex/latex/datatool/databib.sty
@@ -7,11 +7,11 @@
%% datatool.dtx (with options: `databib.sty,package')
%%
%% datatool.dtx
-%% Copyright 2016 Nicola Talbot
+%% Copyright 2017 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license of (at your option) any later version.
+%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{databib}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{databib}[2017/11/10 v2.28 (NLCT)]
\RequirePackage{datatool}
\newcommand*{\dtlbib@style}{plain}
\define@choicekey{databib.sty}{style}{plain,abbrv,alpha}{%
diff --git a/Master/texmf-dist/tex/latex/datatool/datagidx.sty b/Master/texmf-dist/tex/latex/datatool/datagidx.sty
index 8818f59428e..6c61620a65e 100644
--- a/Master/texmf-dist/tex/latex/datatool/datagidx.sty
+++ b/Master/texmf-dist/tex/latex/datatool/datagidx.sty
@@ -7,11 +7,11 @@
%% datatool.dtx (with options: `datagidx.sty,package')
%%
%% datatool.dtx
-%% Copyright 2016 Nicola Talbot
+%% Copyright 2017 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license of (at your option) any later version.
+%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datagidx}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{datagidx}[2017/11/10 v2.28 (NLCT)]
\RequirePackage{datatool}
\RequirePackage{etoolbox}
\RequirePackage{xkeyval}
@@ -406,6 +406,9 @@
\@datagidx@warntrue
\fi
}
+\define@choicekey{datatool.sty}{utf8}{true,false}[true]{%
+ \setbool{@dtl@utf8}{#1}%
+}
\define@key{datagidx.sty}{columns}%
{%
\DTLgidxSetColumns{#1}%
@@ -1906,11 +1909,15 @@
\define@key{newgloss}{postheading}{%
\renewcommand*{\datagidx@postheading}{#1}%
}
+\newif\ifdatagidxbalance
+\datagidxbalancetrue
\define@choicekey{newgloss}{balance}[\val\nr]{true,false}[true]{%
\ifcase\nr\relax
\renewcommand*{\datagidx@multicols}{multicols}%
+ \datagidxbalancetrue
\or
\renewcommand*{\datagidx@multicols}{multicols*}%
+ \datagidxbalancefalse
\fi
}
\define@key{newgloss}{sort}{\renewcommand*{\datagidx@sort}{#1}}
@@ -2180,19 +2187,51 @@
\def\Psi{Psi}%
\def\Omega{Omega}%
}
+\newcommand{\datagidxextendedtoascii}{%
+ \def\AE{AE}%
+ \def\ae{ae}%
+ \def\OE{OE}%
+ \def\oe{oe}%
+ \def\AA{AA}%
+ \def\aa{aa}%
+ \def\L{L}%
+ \def\l{l}%
+ \def\O{O}%
+ \def\o{o}%
+ \def\SS{SS}%
+ \def\ss{ss}%
+ \def\th{th}%
+ \def\TH{TH}%
+ \def\dh{dh}%
+ \def\DH{DH}%
+}
+\newcommand*{\datagidxconvertchars}{%
+ \let~\space
+ \ifdef\andname
+ {%
+ \let\&\andname
+ }%
+ {%
+ \def\&{\expandafter\@gobble\string\&}%
+ }%
+ \def\_{\string_}%
+ \def\${\string$}%
+ \def\#{\expandafter\@gobble\string\#}%
+ \def\%{\expandafter\@gobble\string\%}%
+ \def\{{\expandafter\@gobble\string\{}%
+ \def\}{\expandafter\@gobble\string\}}%
+}
\newcommand*{\datagidxstripaccents}{%
+ \let\add@accent@\@secondoftwo
+ \let\@text@composite@x\@secondoftwo
+ \let\@tabacckludge\@secondoftwo
\expandafter\def\csname \encodingdefault-cmd\endcsname##1##2##3{##3}%
\expandafter\def\csname OT1-cmd\endcsname##1##2##3{##3}%
\expandafter\def\csname T1-cmd\endcsname##1##2##3{##3}%
\expandafter\def\csname PD1-cmd\endcsname##1##2##3{##3}%
\def\IeC##1{\@gobbletwo##1}%
}
-\ifdef\newterm
-{%
-}%
-{%
- \newcommand{\newterm}{\datagidx@newterm}
-}
+\providecommand{\newterm}{\datagidx@newterm}
\@onlypreamble\newterm
\newcommand{\datagidx@setfieldvalues}[2]{%
\def\newterm@name{#2}%
@@ -2232,14 +2271,7 @@
\let\textsl\DTLgidxNoFormat
\let\emph\DTLgidxNoFormat
\let\textsuperscript\DTLgidxNoFormat
- \let~\space
- \ifdef\andname
- {%
- \let\&\andname
- }%
- {%
- \def\&{and}%
- }%
+ \datagidxconvertchars
\let\ensuremath\DTLgidxNoFormat
\let\DTLgidxParen\@gobble
\let\DTLgidxName\@secondoftwo
@@ -2249,6 +2281,7 @@
\let\DTLgidxParticle\datagidx@bothoftwo
\datagidxwordifygreek
\datagidxstripaccents
+ \datagidxextendedtoascii
\newtermlabelhook
\protected@xdef\newterm@label{\newterm@label}%
\let\DTLgidxName\datagidx@person
@@ -3013,6 +3046,37 @@
}
\newcommand*{\printterms@condition}{\boolean{true}}
\define@key{printterms}{condition}{\renewcommand*{\printterms@condition}{#1}}
+\newcommand{\printtermsstartpar}{\par}
+\newcommand*{\printterms@setupmulticol}{%
+ \ifdefempty\datagidx@postheading
+ {%
+ \edef\datagidx@prestart{%
+ \noexpand\datagidx@heading{\noexpand\datagidx@title}%
+ \noexpand\begin{\datagidx@multicols}{\datagidx@columns}%
+ }%
+ }%
+ {%
+ \edef\datagidx@prestart{%
+ \noexpand\datagidx@heading{\noexpand\datagidx@title}%
+ \noexpand\begin{\datagidx@multicols}{\datagidx@columns}%
+ [\noexpand\datagidx@postheading]%
+ }%
+ }%
+ \edef\datagidx@postend{%
+ \noexpand\end{\datagidx@multicols}%
+ }%
+}
+\newcommand*{\printterms@setuptwocol}{%
+ \def\datagidx@prestart{%
+ \twocolumn[\datagidx@heading{\datagidx@title}%
+ \datagidx@postheading]}%
+ \if@twocolumn
+ \def\datagidx@postend{}%
+ \else
+ \def\datagidx@postend{\printtermsrestoreonecolumn}%
+ \fi
+}
+\newcommand{\printtermsrestoreonecolumn}{\onecolumn}
\newcommand{\printterms}[1][]{%
\bgroup
\let\newterm@database\datagidx@defaultdatabase
@@ -3051,12 +3115,15 @@
\edef\dtl@do@setkeys{\noexpand\setkeys{newgloss}{\expandonce\newterm@styles}}%
\dtl@do@setkeys
\ifnum\datagidx@columns>1\relax
- \edef\datagidx@prestart{%
- \noexpand\begin{\datagidx@multicols}{\datagidx@columns}%
- }%
- \edef\datagidx@postend{%
- \noexpand\end{\datagidx@multicols}%
- }%
+ \ifnum\datagidx@columns=2\relax
+ \ifdatagidxbalance
+ \printterms@setupmulticol
+ \else
+ \printterms@setuptwocol
+ \fi
+ \else
+ \printterms@setupmulticol
+ \fi
\else
\def\datagidx@prestart{}%
\def\datagidx@postend{}%
@@ -3065,10 +3132,13 @@
\csuse{datagidxshowgroups\datagidx@showgroups}%
\datagidxsetstyle{\datagidx@style}%
\def\datagidx@labellist{}%
- \datagidx@heading{\datagidx@title}%
- \datagidx@postheading
+ \ifnum\datagidx@columns=1\relax
+ \datagidx@heading{\datagidx@title}%
+ \datagidx@postheading
+ \fi
\datagidx@do@sort
\datagidx@prestart
+ \printtermsstartpar
\datagidxstart
\let\DTLgidxName\datagidx@invert
\let\DTLgidxPlace\datagidx@invert
diff --git a/Master/texmf-dist/tex/latex/datatool/datapie.sty b/Master/texmf-dist/tex/latex/datatool/datapie.sty
index 59bd0ac835f..29947301e0f 100644
--- a/Master/texmf-dist/tex/latex/datatool/datapie.sty
+++ b/Master/texmf-dist/tex/latex/datatool/datapie.sty
@@ -7,11 +7,11 @@
%% datatool.dtx (with options: `datapie.sty,package')
%%
%% datatool.dtx
-%% Copyright 2016 Nicola Talbot
+%% Copyright 2017 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license of (at your option) any later version.
+%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datapie}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{datapie}[2017/11/10 v2.28 (NLCT)]
\RequirePackage{xkeyval}
\newif\ifDTLcolorpiechart
\DTLcolorpiecharttrue
diff --git a/Master/texmf-dist/tex/latex/datatool/dataplot.sty b/Master/texmf-dist/tex/latex/datatool/dataplot.sty
index eaa2d1b8ab8..e4946d3b55f 100644
--- a/Master/texmf-dist/tex/latex/datatool/dataplot.sty
+++ b/Master/texmf-dist/tex/latex/datatool/dataplot.sty
@@ -7,11 +7,11 @@
%% datatool.dtx (with options: `dataplot.sty,package')
%%
%% datatool.dtx
-%% Copyright 2016 Nicola Talbot
+%% Copyright 2017 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license of (at your option) any later version.
+%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{dataplot}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{dataplot}[2017/11/10 v2.28 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{tikz}
\RequirePackage{datatool}
diff --git a/Master/texmf-dist/tex/latex/datatool/datatool-base.sty b/Master/texmf-dist/tex/latex/datatool/datatool-base.sty
index 8ab7d44a1a4..81c32e0cb7b 100644
--- a/Master/texmf-dist/tex/latex/datatool/datatool-base.sty
+++ b/Master/texmf-dist/tex/latex/datatool/datatool-base.sty
@@ -7,11 +7,11 @@
%% datatool.dtx (with options: `datatool-base.sty,package')
%%
%% datatool.dtx
-%% Copyright 2016 Nicola Talbot
+%% Copyright 2017 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license of (at your option) any later version.
+%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-base}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{datatool-base}[2017/11/10 v2.28 (NLCT)]
\RequirePackage{etoolbox}
\RequirePackage{amsmath}
\RequirePackage{xkeyval}
@@ -363,17 +363,52 @@
}
\newif\if@dtl@insertdone
\newcount\dtl@sortresult
-\newcommand{\toks@gput@right@cx}[2]{%
- \def\@toks@name{#1}%
+\newcommand*{\DTLlistformatsep}{, }
+\newcommand*{\DTLlistformatoxford}{}
+\ifdef\andname
+{\newcommand*{\DTLandname}{\andname}}
+{\newcommand*{\DTLandname}{\&}}
+\newcommand*{\DTLlistformatlastsep}{ \DTLandname\space}
+\newcommand*{\DTLlistformatitem}[1]{#1}
+\newcommand*{\@dtl@formatlist@handler}[1]{%
+ \@dtl@formatlist@itemsep
+ \@dtl@formatlist@lastitem
+ \renewcommand{\@dtl@formatlist@lastitem}{%
+ \renewcommand{\@dtl@formatlist@itemsep}{%
+ \DTLlistformatsep
+ \renewcommand*{\@dtl@formatlist@prelastitemsep}{%
+ \DTLlistformatoxford}}%
+ \renewcommand{\@dtl@formatlist@prelastitem}{%
+ \@dtl@formatlist@prelastitemsep
+ \DTLlistformatlastsep}%
+ \DTLlistformatitem{#1}%
+ }%
+}%
+\newrobustcmd*{\DTLformatlist}{%
+ \@ifstar{\s@dtlformatlist}{\@dtlformatlist}%
+}
+\newcommand*{\s@dtlformatlist}[1]{%
+ \def\@dtl@formatlist@itemsep{}%
+ \def\@dtl@formatlist@lastitem{}%
+ \def\@dtl@formatlist@prelastitem{}%
+ \def\@dtl@formatlist@prelastitemsep{}%
+ \@for\@dtl@formatlist@item:=#1\do{%
+ \expandafter\@dtl@formatlist@handler\expandafter{\@dtl@formatlist@item}%
+ }%
+ \@dtl@formatlist@prelastitem\@dtl@formatlist@lastitem
+}
+\newcommand*{\@dtlformatlist}[1]{{\s@dtlformatlist{#1}}}
+\newcommand{\@dtl@toks@gput@right@cx}[2]{%
+ \def\@dtl@toks@name{#1}%
\edef\@dtl@stuff{#2}%
- \global\csname\@toks@name\endcsname\expandafter
+ \global\csname\@dtl@toks@name\endcsname\expandafter
\expandafter\expandafter{\expandafter\the
- \csname\expandafter\@toks@name\expandafter\endcsname\@dtl@stuff}%
+ \csname\expandafter\@dtl@toks@name\expandafter\endcsname\@dtl@stuff}%
}
-\newcommand{\toks@gconcat@middle@cx}[4]{%
- \def\@toks@name{#1}%
+\newcommand{\@dtl@toks@gconcat@middle@cx}[4]{%
+ \def\@dtl@toks@name{#1}%
\edef\@dtl@stuff{#3}%
- \global\csname\@toks@name\endcsname\expandafter\expandafter
+ \global\csname\@dtl@toks@name\endcsname\expandafter\expandafter
\expandafter\expandafter\expandafter
\expandafter\expandafter{\expandafter\expandafter\expandafter
\the\expandafter\expandafter\expandafter#2%
diff --git a/Master/texmf-dist/tex/latex/datatool/datatool-fp.sty b/Master/texmf-dist/tex/latex/datatool/datatool-fp.sty
index 665b0cb2f90..6358eaf4f41 100644
--- a/Master/texmf-dist/tex/latex/datatool/datatool-fp.sty
+++ b/Master/texmf-dist/tex/latex/datatool/datatool-fp.sty
@@ -7,11 +7,11 @@
%% datatool.dtx (with options: `datatool-fp.sty,package')
%%
%% datatool.dtx
-%% Copyright 2016 Nicola Talbot
+%% Copyright 2017 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license of (at your option) any later version.
+%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-fp}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{datatool-fp}[2017/11/10 v2.28 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{fp}
\RequirePackage{datatool-base}
diff --git a/Master/texmf-dist/tex/latex/datatool/datatool-pgfmath.sty b/Master/texmf-dist/tex/latex/datatool/datatool-pgfmath.sty
index 2c46893738e..a5cd567b589 100644
--- a/Master/texmf-dist/tex/latex/datatool/datatool-pgfmath.sty
+++ b/Master/texmf-dist/tex/latex/datatool/datatool-pgfmath.sty
@@ -7,11 +7,11 @@
%% datatool.dtx (with options: `datatool-pgfmath.sty,package')
%%
%% datatool.dtx
-%% Copyright 2016 Nicola Talbot
+%% Copyright 2017 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license of (at your option) any later version.
+%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-pgfmath}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{datatool-pgfmath}[2017/11/10 v2.28 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{pgfrcs,pgfkeys,pgfmath}
\ProcessOptionsX
diff --git a/Master/texmf-dist/tex/latex/datatool/datatool.sty b/Master/texmf-dist/tex/latex/datatool/datatool.sty
index 688f37a7312..ea7835d4dcb 100644
--- a/Master/texmf-dist/tex/latex/datatool/datatool.sty
+++ b/Master/texmf-dist/tex/latex/datatool/datatool.sty
@@ -7,11 +7,11 @@
%% datatool.dtx (with options: `datatool.sty,package')
%%
%% datatool.dtx
-%% Copyright 2016 Nicola Talbot
+%% Copyright 2017 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license of (at your option) any later version.
+%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{datatool}[2017/11/10 v2.28 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{ifthen}
\RequirePackage{xfor}
@@ -116,9 +116,14 @@
\renewcommand*\@dtl@mathprocessor{#1}%
}
\providecommand*{\@dtl@mathprocessor}{fp}
+\newcommand*{\@dtl@set@options}{}
+\define@choicekey{datatool.sty}{utf8}{true,false}[true]{%
+ \renewcommand*{\@dtl@set@options}{\setbool{@dtl@utf8}{#1}}%
+}
\ProcessOptionsX
\@dtl@construct@lopoffs
\RequirePackage{datatool-base}
+\@dtl@set@options
\DeclareRobustCommand{\DTLpar}{\par}
\newcommand*{\DTLnewdb}[1]{%
\DTLifdbexists{#1}%
@@ -244,7 +249,7 @@
}
\newcommand*{\@sDTLnewrow}[1]{%
\global\advance\csname dtlrows@#1\endcsname by 1\relax
- \toks@gput@right@cx{dtldb@#1}{%
+ \@dtl@toks@gput@right@cx{dtldb@#1}{%
\noexpand\db@row@elt@w%
\noexpand\db@row@id@w \number\csname dtlrows@#1\endcsname
\noexpand\db@row@id@end@%
@@ -462,7 +467,7 @@
}%
\ifx\@dtl@oldtype\@dtl@type
\else
- \toks@gconcat@middle@cx{dtlkeys@#1}%
+ \@dtl@toks@gconcat@middle@cx{dtlkeys@#1}%
{\@dtl@before}%
{%
\noexpand\db@plist@elt@w% start of key block
@@ -495,7 +500,7 @@
\@dtl@checknumerical{#3}%
\edef\@dtl@type{\number\@dtl@datatype}%
}%
- \toks@gput@right@cx{dtlkeys@#1}%
+ \@dtl@toks@gput@right@cx{dtlkeys@#1}%
{%
\noexpand\db@plist@elt@w
\noexpand\db@col@id@w \the\dtlcolumnnum
@@ -541,7 +546,7 @@
\@dtl@dogetprops
\@dtl@colhead={#3}%
\edef\@dtl@colnum{\number#2}\relax
- \toks@gconcat@middle@cx{dtlkeys@#1}%
+ \@dtl@toks@gconcat@middle@cx{dtlkeys@#1}%
{\@dtl@before}%
{%
\noexpand\db@plist@elt@w% start of block
@@ -588,7 +593,7 @@
\dtl@dogetentry
\ifx\dtl@entry\dtlnovalue
\@dtl@setnewvalue{#3}%
- \toks@gconcat@middle@cx{dtldb@#1}%
+ \@dtl@toks@gconcat@middle@cx{dtldb@#1}%
{\dtlbeforerow}%
{%
\noexpand\db@row@elt@w%
@@ -825,7 +830,7 @@
\@dtl@getrow#1\q@nil
}
\newcommand*{\dtlrecombine}{%
- \toks@gconcat@middle@cx{dtldb@\dtldbname}%
+ \@dtl@toks@gconcat@middle@cx{dtldb@\dtldbname}%
{\dtlbeforerow}%
{%
\noexpand\db@row@elt@w
@@ -843,7 +848,7 @@
\newcommand{\dtlrecombineomitcurrent}{%
\dtl@decrementrows{\dtlafterrow}{\dtlrownum}
\csname dtldb@\dtldbname\endcsname=\dtlbeforerow
- \toks@gput@right@cx{dtldb@\dtldbname}{\the\dtlafterrow}%
+ \@dtl@toks@gput@right@cx{dtldb@\dtldbname}{\the\dtlafterrow}%
\dtl@message{Removed row \number\dtlrownum\space in database
`\dtldbname'}%
}
@@ -936,7 +941,7 @@
\ifx\dtl@entry\dtlnovalue
\protected@edef\@dtl@tmp{#2}%
\expandafter\@dtl@toks\expandafter{\@dtl@tmp}%
- \toks@gput@right@cx{dtlcurrentrow}%
+ \@dtl@toks@gput@right@cx{dtlcurrentrow}%
{%
\noexpand\db@col@id@w
\number\dtlcolumnnum
@@ -966,7 +971,7 @@
\ifx\dtl@entry\dtlnovalue
\protected@edef\@dtl@tmp{#2}%
\expandafter\@dtl@toks\expandafter{\@dtl@tmp}%
- \toks@gput@right@cx{dtlcurrentrow}%
+ \@dtl@toks@gput@right@cx{dtlcurrentrow}%
{%
\noexpand\db@col@id@w
\number\dtlcolumnnum
@@ -1044,6 +1049,10 @@
\edef\dtl@dogetrowindex{\noexpand\@dtlgetrowindex{\noexpand#1}{#2}{\number#3}{\the\toks@}}%
\dtl@dogetrowindex
}
+\newcommand*{\xdtlgetrowindex}[4]{%
+ \protected@edef\dtl@dogetrowindex{\noexpand\@dtlgetrowindex{\noexpand#1}{#2}{\number#3}{#4}}%
+ \dtl@dogetrowindex
+}
\newcommand*{\@dtlgetrowindex}[4]{%
\def\@dtl@getrowindex##1% stuff before value
\db@col@elt@w #4\db@col@elt@end@% value
@@ -1404,7 +1413,7 @@
\dtlforeachlevel\endcsname
\@dtl@after=\csname @dtl@next\romannumeral
\dtlforeachlevel\endcsname
- \toks@gconcat@middle@cx{dtldb@#2}%
+ \@dtl@toks@gconcat@middle@cx{dtldb@#2}%
{\@dtl@before}%
{%
\noexpand\db@row@elt@w%
@@ -1566,7 +1575,7 @@
\ifx\dtl@entry\dtlnovalue
\protected@edef\@dtl@tmp{#2}%
\expandafter\@dtl@toks\expandafter{\@dtl@tmp}%
- \toks@gput@right@cx{@dtl@cur\romannumeral\dtlforeachlevel}%
+ \@dtl@toks@gput@right@cx{@dtl@cur\romannumeral\dtlforeachlevel}%
{%
\noexpand\db@col@id@w \number\dtlcolumnnum
\noexpand\db@col@id@end@
@@ -1682,7 +1691,7 @@
\expandafter\@dtl@toks\expandafter{\@dtl@tmp}% new value
\expandafter\@dtl@before\expandafter{\dtl@pre}%
\expandafter\@dtl@after\expandafter{\dtl@post}%
- \toks@gconcat@middle@cx
+ \@dtl@toks@gconcat@middle@cx
{@dtl@cur\romannumeral\dtlforeachlevel}%
{\@dtl@before}%
{%
@@ -3248,10 +3257,18 @@
}
\newcommand{\dtl@trim}[1]{%
\def\@dtl@trmstr{}%
- \expandafter\@dtl@starttrim#1\@nil
+ \if#1\par
+ \else
+ \expandafter\@dtl@start@trim#1\@dtl@end@trim
+ \fi
\let#1=\@dtl@trmstr
}
+\def\@dtl@start@trim#1 \@dtl@end@trim{%
+ \def\@dtl@trmstr{#1}%
+}
\long\def\@dtl@starttrim#1#2{%
+\def\tmpA{#1}\show\tmpA
+\def\tmpB{#2}\show\tmpB
\dtl@ifsingle{#2}%
{%
\def\@dtl@tmpB{#2}%
@@ -3318,7 +3335,7 @@
\@dtl@doreadraw?1?2>>>
\gdef\@dtl@doreadraw?1?2<\relax
\read?1 to \tmp
-\xdef?2<\tmp>\relax
+\protected@xdef?2<\tmp>\relax
>
\endgroup
\begingroup
diff --git a/Master/texmf-dist/tex/latex/datatool/person.sty b/Master/texmf-dist/tex/latex/datatool/person.sty
index ec001c01820..3cf1d931bbf 100644
--- a/Master/texmf-dist/tex/latex/datatool/person.sty
+++ b/Master/texmf-dist/tex/latex/datatool/person.sty
@@ -7,11 +7,11 @@
%% datatool.dtx (with options: `person.sty,package')
%%
%% datatool.dtx
-%% Copyright 2016 Nicola Talbot
+%% Copyright 2017 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license of (at your option) any later version.
+%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{person}[2016/07/28 v2.27 (NLCT)]
+\ProvidesPackage{person}[2017/11/10 v2.28 (NLCT)]
\RequirePackage{ifthen}
\RequirePackage{datatool}
\newcounter{people}