summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/datatool/datatool-user.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/datatool/datatool-user.tex')
-rw-r--r--Master/texmf-dist/doc/latex/datatool/datatool-user.tex43
1 files changed, 36 insertions, 7 deletions
diff --git a/Master/texmf-dist/doc/latex/datatool/datatool-user.tex b/Master/texmf-dist/doc/latex/datatool/datatool-user.tex
index 372ca7d0299..db2f306c297 100644
--- a/Master/texmf-dist/doc/latex/datatool/datatool-user.tex
+++ b/Master/texmf-dist/doc/latex/datatool/datatool-user.tex
@@ -91,11 +91,11 @@
\MakeShortVerb{"}
\DeleteShortVerb{\|}
- \title{User Manual for datatool bundle version~2.19}
+ \title{User Manual for datatool bundle version~2.20}
\author{Nicola L.C. Talbot\\
\url{http://www.dickimaw-books.com/}}
- \date{2014-01-17}
+ \date{2014-02-03}
\maketitle
\pagenumbering{roman}
@@ -110,7 +110,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.19}
+ read \qt{Documented Code for datatool v2.20}
\item[INSTALL] Installation instructions.
@@ -2227,7 +2227,7 @@ parse files that have newline characters within entries. The
\app{datatooltk} application (see page~\pageref{datatooltk}) can
parse them, so if you have multilined entries in a CSV file, you
can convert it to \sty{datatool}'s internal database format using
-\app{datatooltk} and the input it using \ics{input}. See the
+\app{datatooltk} and the input it using \ics{input} or \ics{DTLloaddbtex}. See the
\app{datatooltk} documentation for further details.
\end{important}
@@ -2498,7 +2498,7 @@ of key=value pairs. The following keys are available:
\item[contcaption] The continuation caption.
-\item[shortcaption] The caption to be used in the list of figures.
+\item[shortcaption] The caption to be used in the list of tables.
\item[label] The label for this table.
@@ -3801,11 +3801,19 @@ This is the null value for a number.
\begin{definition}[\DescribeMacro{\DTLifnull}]%
\cs{DTLifnull}\marg{cmd}\marg{true part}\marg{false part}
\end{definition}
-This checks if \meta{cmd} is null where \meta{cmd} is a command name,
+This checks if \meta{cmd} is null where \meta{cmd} is a control
+sequence,
if it is, then \meta{true part}
is done, otherwise \meta{false part} is done. This macro is
illustrated in \autoref{ex:null} below.
+\begin{definition}[\DescribeMacro{\DTLifnullorempty}]
+\cs{DTLifnullorempty}\marg{cmd}\marg{true part}\marg{false part}
+\end{definition}
+This checks if \meta{cmd} is null or empty, where \meta{cmd} is a
+control sequence. If it is it does \meta{true part}, otherwise
+\meta{false part}.
+
\begin{example}{Null Values}{ex:null}
Consider the following (which creates a database called "emailDB"):
\begin{verbatim}
@@ -4863,7 +4871,14 @@ any use:
\begin{definition}[\DescribeMacro{\DTLprotectedsaverawdb}]%
\cs{DTLprotectedsaverawdb}\marg{db name}\marg{filename}
\end{definition}
-instead.
+instead. The \app{datatooltk} application
+can read and write this raw format. To load a file in this format
+you can just use \cs{input} or you can use:
+\begin{definition}
+\cs{DTLloaddbtex}\marg{cs}\marg{file}
+\end{definition}
+This checks for the file's existence and assigns the database name to the
+control sequence \meta{cs}.
\begin{important}
If you find a~problem caused by \TeX's automatic insertion of a line
@@ -5068,6 +5083,20 @@ This (globally) assigns the list of commands in \meta{assign list}
for row \meta{row idx} in database \meta{db name}, where
\meta{assign list} has the same format as in \ics{DTLforeach}.
+\begin{definition}
+\cs{DTLassignfirstmatch}\marg{db name}\marg{col key}\marg{value}\marg{assign list}
+\end{definition}
+This is similar to \cs{DTLassign} except that it applies to the
+first row in the given database where the column identified by the
+label \meta{col key} has the given value. Note that no expansion is
+performed in the match. The value must be an exact match.
+
+\begin{definition}
+\cs{xDTLassignfirstmatch}\marg{db name}\marg{col key}\marg{value}\marg{assign list}
+\end{definition}
+This is like \cs{DTLassignfirstmatch} but performs a~\emph{one-level}
+expansion on \meta{value}.
+
Two rows can be swapped using:
\begin{definition}[\DescribeMacro{\DTLswaprows}]%
\cs{DTLswaprows}\marg{db name}\marg{row1 index}\marg{row2 index}