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.tex45
1 files changed, 27 insertions, 18 deletions
diff --git a/Master/texmf-dist/doc/latex/datatool/datatool-user.tex b/Master/texmf-dist/doc/latex/datatool/datatool-user.tex
index 15581834dc6..aeefbfea21a 100644
--- a/Master/texmf-dist/doc/latex/datatool/datatool-user.tex
+++ b/Master/texmf-dist/doc/latex/datatool/datatool-user.tex
@@ -103,11 +103,11 @@
\MakeShortVerb{"}
- \title{User Manual for datatool bundle version~2.29}
+ \title{User Manual for datatool bundle version~2.30}
\author{Nicola L.C. Talbot\\
\url{http://www.dickimaw-books.com/}}
- \date{2017-11-12}
+ \date{2018-04-16}
\maketitle
\pagenumbering{roman}
@@ -122,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.29}
+ read \qt{Documented Code for datatool v2.30}
\item[INSTALL] Installation instructions.
@@ -4102,21 +4102,36 @@ The result is shown in \autoref{tab:dyn}.
\end{example}
\section{Null Values}
+\begin{important}
+Note that a null value is not the same as an empty value. Empty
+values can be tested using \sty{etoolbox}'s \ics{ifdefempty} or
+similar.
+\end{important}
+
If a database is created using \cs{DTLnewdb}, \cs{DTLnewrow}
and \cs{DTLnewdbentry} (rather than loading it from an ASCII
file), it is possible for some of the entries to have null values
when a value is not assigned to a given key for a given row.
It's also possible for data fetched from a~SQL database using
-\app{datatooltk} to contain null values\footnote{You can also use
-the \app{datatooltk} GUI to assign null values.}, but data loaded using
+\app{datatooltk} to contain null values, and you can use
+the \app{datatooltk} GUI to assign null values, but data loaded using
\cs{DTLloaddb} (or \cs{DTLloadrawdb}) will have empty not null
-values for any blank cells.
-
-\begin{important}
-Note that a null value is not the same as an empty value. Empty
-values can be tested using \sty{etoolbox}'s \ics{ifdefempty} or
-similar.
-\end{important}
+values for any \emph{blank} cells. However, you will get null values when
+loading a CSV file if cells are missing (rather than empty). For
+example:
+\begin{verbatim}
+Column 1,Column 2,Column 3
+Foo,Bar
+Foo,,Baz
+Foo,Bar,Baz
+\end{verbatim}
+This has an empty cell (the second column in \texttt{Foo,,Baz}) and
+a null cell (the third column in \texttt{Foo,Bar}). If the first
+row of data was instead
+\begin{verbatim}
+Foo,Bar,
+\end{verbatim}
+then the third column is now empty, not null.
When you iterate through the database using \cs{DTLforeach}
(described in \autoref{sec:dbforeach}),
@@ -5449,12 +5464,6 @@ you can just use \cs{input} or you can use:
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
-break every 80 characters when writing to a file, try loading the
-\sty{morewrites} package before \sty{datatool}.
-\end{important}
-
Databases saved using \cs{DTLsavetexdb}, \cs{DTLsaverawdb} and
\cs{DTLprotectedsaverawdb} can be loaded using \LaTeX's standard
\ics{input} command. As from version 2.15, the last line of the