diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/datatool/datatool-user.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/datatool/datatool-user.tex | 57 |
1 files changed, 42 insertions, 15 deletions
diff --git a/Master/texmf-dist/doc/latex/datatool/datatool-user.tex b/Master/texmf-dist/doc/latex/datatool/datatool-user.tex index a1bc741c631..140fe1f1282 100644 --- a/Master/texmf-dist/doc/latex/datatool/datatool-user.tex +++ b/Master/texmf-dist/doc/latex/datatool/datatool-user.tex @@ -1,5 +1,7 @@ \documentclass[report,widecs]{nlctdoc} +\DeleteShortVerb{\|} + \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{ifthen} @@ -46,6 +48,8 @@ \dbs\index{\string\\\actualchar\dbs\encapchar usage}% } +\setlength\marginparwidth{70pt} + %bibliography database \DTLnewdb{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 @@ 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.25} + read \qt{Documented Code for datatool v2.26} \item[INSTALL] Installation instructions. @@ -2193,7 +2196,8 @@ Second paragraph.} \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 @@ provides an example. \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 @@ produces:\par\vskip\baselineskip\noindent \\\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 @@ a table: \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 @@ marks}\label{tab:meanmarks} =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 @@ efficient way of storing the information in databases which has significantly improved the time it takes to \LaTeX\ documents containing large databases. +\clearpage +\phantomsection +\addcontentsline{toc}{chapter}{\indexname} \PrintIndex \end{document} |