diff options
author | Karl Berry <karl@freefriends.org> | 2012-09-26 22:30:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-09-26 22:30:53 +0000 |
commit | 23c31c37f42516ec286c308a8b7aabe4af68da61 (patch) | |
tree | c55a2b5883ae9172b5ba0ff1a7c182908191520b /Master | |
parent | 21d48443cf41d93582f2b299b10ed2edb65e5814 (diff) |
datatool (26sep12)
git-svn-id: svn://tug.org/texlive/trunk@27818 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
16 files changed, 408 insertions, 58 deletions
diff --git a/Master/texmf-dist/doc/latex/datatool/CHANGES b/Master/texmf-dist/doc/latex/datatool/CHANGES index 7236ed455d9..018d5368546 100644 --- a/Master/texmf-dist/doc/latex/datatool/CHANGES +++ b/Master/texmf-dist/doc/latex/datatool/CHANGES @@ -1,3 +1,22 @@ +v2.11: + + * datatool.sty: + + - removed unwanted space in \@dtl@updatekeys + + - fixed typo in user guide (should be \dtlforcolumnidx not + \dtlforcolumnindex) + + - added \dtldisplayvalign + + - added \DTLaddcolumn + + - added \dtlgetrowforvalue + + - added \dtlupdateentryincurrentrow + + - added \DTLgetrowindex and \dtlgetrowindex + v2.10 (2012/07/18): * datatool.sty: diff --git a/Master/texmf-dist/doc/latex/datatool/README b/Master/texmf-dist/doc/latex/datatool/README index 23c357ae670..8395e3a7e3c 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.10 +LaTeX Bundle : datatool v2.11 -Last Modified : 2012-07-18 +Last Modified : 2012-09-25 Author : Nicola Talbot @@ -124,5 +124,5 @@ dtx and ins file located in texmf/source. This material is subject to the LaTeX Project Public License. See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for the details of that license. -http://theoval.cmp.uea.ac.uk/~nlct/ +http://www.dickimaw-books.com/ diff --git a/Master/texmf-dist/doc/latex/datatool/datatool-user.pdf b/Master/texmf-dist/doc/latex/datatool/datatool-user.pdf Binary files differindex 59d242c0cee..ce9ffcf3c5e 100644 --- a/Master/texmf-dist/doc/latex/datatool/datatool-user.pdf +++ b/Master/texmf-dist/doc/latex/datatool/datatool-user.pdf diff --git a/Master/texmf-dist/doc/latex/datatool/datatool-user.tex b/Master/texmf-dist/doc/latex/datatool/datatool-user.tex index 86ac37d6af7..6560eb60c0c 100644 --- a/Master/texmf-dist/doc/latex/datatool/datatool-user.tex +++ b/Master/texmf-dist/doc/latex/datatool/datatool-user.tex @@ -56,15 +56,11 @@ \MakeShortVerb{"} \DeleteShortVerb{\|} - \title{User Manual for datatool bundle version~2.10} - \author{Nicola L.C. Talbot\\[10pt] -School of Computing Sciences\\ -University of East Anglia\\ -Norwich. Norfolk\\ -NR4 7TJ. United Kingdom.\\ -\url{http://theoval.cmp.uea.ac.uk/~nlct/}} - - \date{2012-07-18} + \title{User Manual for datatool bundle version~2.11} + \author{Nicola L.C. Talbot\\ +\url{http://www.dickimaw-books.com/}} + + \date{2012-09-25} \maketitle \pagenumbering{roman} @@ -79,7 +75,7 @@ The \styfmt{datatool} bundle comes with the following documentation: \item[\url{datatool.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.10} + read \qt{Documented Code for datatool v2.11} \item[INSTALL] Installation instructions. @@ -2119,6 +2115,14 @@ For example: \DTLsetheader{mydata}{Price}{Price (\$)} \end{verbatim} +\begin{definition}[\DescribeMacro{\DTLaddcolumn}] +\cs{DTLaddcolumn}\marg{db}\marg{key} +\end{definition} +Adds a new column with the given key to the database \meta{db}. This +doesn't add any data to the column, just identifies it as an +available column. The starred version doesn't check if the database +exists. + \section{Loading a Database from an External ASCII File} \label{sec:loaddb} @@ -2570,6 +2574,13 @@ This specifies how to format each entry in the columns that contain only currency or currency mixed with real numbers and/or integers. This defaults to just displaying \meta{text}. +\begin{definition}[\DescribeMacro{\dtldisplayvalign}] +\cs{dtldisplayvalign} +\end{definition} +Specifies the vertical alignment of the \env{tabular} environment +used by \cs{DTLdisplaydb}. Defaults to \texttt{c} (centred). May be redefined +to \texttt{t} (top) or \texttt{b} (bottom). + \begin{definition}[\DescribeMacro{\dtldisplaystarttab}]% \cs{dtldisplaystarttab} \end{definition} @@ -4584,8 +4595,8 @@ iteration, \meta{cs} (which must be a control sequence) is set to the current element in the column and may be used in \meta{body}. Alternatively, if you want to identify the column by its index rather than its key, use: -\begin{definition}[\DescribeMacro{\dtlforcolumnindex}]% -\cs{dtlforcolumnindex}\marg{cs}\marg{db}\marg{col index}\marg{body} +\begin{definition}[\DescribeMacro{\dtlforcolumnidx}]% +\cs{dtlforcolumnidx}\marg{cs}\marg{db}\marg{col index}\marg{body} \end{definition} \begin{definition}[\DescribeMacro{\DTLifdbexists}] @@ -4765,11 +4776,35 @@ 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. +\begin{definition}[\DescribeMacro{\DTLgetrowindex}] +\cs{DTLgetrowindex}\marg{row cs}\marg{db name}\marg{col +idx}\marg{value} +\end{definition} +Gets the row index of the first row in database \meta{db name} where +the value for column \meta{col idx} matches \meta{value} and stores +the result in \meta{row cs}, which must be a control sequence. +An error message is given if not found. +\begin{definition}[\DescribeMacro{\dtlgetrowindex}] +\cs{dtlgetrowindex}\marg{row cs}\marg{db name}\marg{col +idx}\marg{value} +\end{definition} +Similar to \cs{DTLgetrowindex} but doesn't produce an error if no match is +found. You can test the result by using \cs{ifx}\meta{row +cs}\cs{dtlnovalue}. For example: +\begin{verbatim} +\dtlgetrowindex{\myrowidx}{data}{\dtlcolumnindex{data}{Surname}}{Smith} +\ifx\myrowidx\dtlnovalue + Not Found +\else + Found in row \myrowidx. +\fi +\end{verbatim} + \begin{definition}[\DescribeMacro{\dtlgetrow}] \cs{dtlgetrow}\marg{db name}\marg{row idx} \end{definition} Gets the row with index \meta{row idx} from the database \meta{db -name}. The required row is stored in the token register +name}. The required row is stored in the token register \begin{definition}[\DescribeMacro{\dtlcurrentrow}] \cs{dtlcurrentrow} \end{definition} @@ -4796,6 +4831,13 @@ inserted} error if you misspell the database name and a \qt{Runaway argument} error if you specify a row index that is out of range. \end{important} +\begin{definition}[\DescribeMacro{\dtlgetrowforvalue}] +\cs{dtlgetrowforvalue}\marg{db name}\marg{column index}\marg{value} +\end{definition} +Like \cs{dtlgetrow}, but this gets the row where the entry in column +\meta{column index} matches \meta{value}. This command produces an +error if no match is found. + You can use the commands below to access or edit \cs{dtlcurrentrow}, but they won't change the database. Instead, once you've finished editing \cs{dtlcurrentrow}, you need to reconstruct the database @@ -4853,8 +4895,15 @@ the column indices). \cs{dtlappendentrytocurrentrow}\marg{key}\marg{value} \end{definition} Appends \meta{value} to the current row for column given by -\meta{key}. (Note this is the only command in this section to -reference by key rather than by index.) +\meta{key}. (Produces an error if there is already an entry for that +column in the current row.) + +\begin{definition}[\DescribeMacro{\dtlappendentrytocurrentrow}] +\cs{dtlupdateentryincurrentrow}\marg{key}\marg{value} +\end{definition} +Behaves like \cs{dtlappendentrytocurrentrow} if the current row +doesn't contain an entry for the column given by \meta{key}, +otherwise behaves like \cs{dtlreplaceentryincurrentrow}. \chapter{Pie Charts (\texorpdfstring{\sty{datapie}}{datapie} package)} \label{sec:datapie} diff --git a/Master/texmf-dist/doc/latex/datatool/datatool.pdf b/Master/texmf-dist/doc/latex/datatool/datatool.pdf Binary files differindex bd25ebec2ea..d55c219c3ad 100644 --- a/Master/texmf-dist/doc/latex/datatool/datatool.pdf +++ b/Master/texmf-dist/doc/latex/datatool/datatool.pdf diff --git a/Master/texmf-dist/source/latex/datatool/datatool.dtx b/Master/texmf-dist/source/latex/datatool/datatool.dtx index 48dbc515cb4..45457a7cdf2 100644 --- a/Master/texmf-dist/source/latex/datatool/datatool.dtx +++ b/Master/texmf-dist/source/latex/datatool/datatool.dtx @@ -16,7 +16,7 @@ % -author "Nicola Talbot" % -codetitle "" % datatool -% Created on 2012/7/19 16:34 +% Created on 2012/9/25 22:56 %\fi %\iffalse %<*package> @@ -63,7 +63,7 @@ datatool.dtx \doxitem{Counter}{counter}{counters} \doxitem{Option}{option}{package options} -\CheckSum{16856} +\CheckSum{17022} \RecordChanges \PageIndex @@ -76,15 +76,11 @@ datatool.dtx %\fi %\MakeShortVerb{"} % -%\title{Documented Code for datatool v2.10} -%\author{Nicola L. C. Talbot\\[10pt] -%School of Computing Sciences\\ -%University of East Anglia\\ -%Norwich. Norfolk\\ -%NR4 7TJ. United Kingdom\\ -%\url{http://theoval.cmp.uea.ac.uk/~nlct/}} +%\title{Documented Code for datatool v2.11} +%\author{Nicola L. C. Talbot\\ +%\url{http://www.dickimaw-books.com/}} % -%\date{2012-07-18} +%\date{2012-09-25} %\maketitle % %\pagenumbering{roman} @@ -119,7 +115,7 @@ datatool.dtx % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{datatool-base}[2012/07/18 v2.10 (NLCT)] +\ProvidesPackage{datatool-base}[2012/09/25 v2.11 (NLCT)] % \end{macrocode} % Required packages: % \begin{macrocode} @@ -4381,7 +4377,7 @@ datatool.dtx % Definitions of fixed-point commands that use the \sty{fp} package. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{datatool-fp}[2012/07/18 v2.10 (NLCT)] +\ProvidesPackage{datatool-fp}[2012/09/25 v2.11 (NLCT)] % \end{macrocode} % Required packages: % \begin{macrocode} @@ -4670,7 +4666,7 @@ datatool.dtx % Definitions of fixed-point commands that use the \sty{pgfmath} package. % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{datatool-pgfmath}[2012/07/18 v2.10 (NLCT)] +\ProvidesPackage{datatool-pgfmath}[2012/09/25 v2.11 (NLCT)] % \end{macrocode} % Required packages: % \begin{macrocode} @@ -4910,7 +4906,7 @@ datatool.dtx %\section{Package Declaration} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{datatool}[2012/07/18 v2.10 (NLCT)] +\ProvidesPackage{datatool}[2012/09/25 v2.11 (NLCT)] % \end{macrocode} % Load required packages: % \begin{macrocode} @@ -5796,6 +5792,30 @@ datatool.dtx % \end{macrocode} %\end{macro} % +%\begin{macro}{\DTLaddcolumn} +%\begin{definition} +%\cs{DTLaddcolumn}\marg{db}\marg{key} +%\end{definition} +% Adds a column with given key to given column. No data is added to +% the column. The starred version doesn't check for the existence of +% the database. +%\changes{2.11}{2012-09-25}{new} +% \begin{macrocode} +\newcommand*{\DTLaddcolumn}{% + \@ifstar\@sDTLaddcolumn\@DTLaddcolumn +} +\newcommand{\@DTLaddcolumn}[2]{% + \DTLifdbexists{#1}% + {\@dtl@updatekeys{#1}{#2}{}}% + {\PackageError{datatool}{Can't add new column to database `#1': + database doesn't exist}{}}% +} +\newcommand{\s@DTLaddcolumn}[2]{% + \@dtl@updatekeys{#1}{#2}{}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\@dtl@updatekeys} %\begin{definition} %\cs{@dtl@updatekeys}\marg{db}\marg{key}\marg{value} @@ -5819,12 +5839,13 @@ datatool.dtx =\dtlcolumnindex{#1}{#2}\relax % \end{macrocode} % Get the properties for this column +%\changes{2.11}{2012-09-25}{remove unwanted space} % \begin{macrocode} \edef\@dtl@dogetprops{\noexpand\@dtl@getprops {\noexpand\@dtl@key}{\noexpand\@dtl@type}% {\noexpand\@dtl@colhead}{\noexpand\@dtl@before}% {\noexpand\@dtl@after}{\the\csname dtlkeys@#1\endcsname}% - {\number\dtlcolumnnum}} + {\number\dtlcolumnnum}}% \@dtl@dogetprops % \end{macrocode} % Is the value empty? @@ -6522,7 +6543,7 @@ datatool.dtx \newtoks\dtlafterrow % \end{macrocode} %\end{macro} -% + %\begin{macro}{\dtlgetrow} %\begin{definition} %\cs{dtlgetrow}\marg{db}\marg{row idx} @@ -6543,6 +6564,31 @@ datatool.dtx } % \end{macrocode} %\end{macro} +%\begin{macro}{\dtlgetrowforvalue} +%\begin{definition} +%\cs{dtlgetrowforvalue}\marg{db}\marg{column idx}\marg{value} +%\end{definition} +% Like \cs{dtlgetrow}, but gets the row where the entry in column +% \meta{column index} matches \meta{value}. Produces an error if row +% not found. +%\changes{2012-09-25}{2.11}{new} +% \begin{macrocode} +\newcommand*{\dtlgetrowforvalue}[3]{% + \dtlgetrowindex{\dtl@rowidx}{#1}{#2}{#3}% + \ifx\dtl@rowidx\dtlnovalue + \PackageError{datatool}{No row found in database `#1' for + column `\number#2' matching `#3'}{}% + \else + \dtlrownum=\dtl@rowidx\relax + \edef\dtldbname{#1}% + \expandafter\toks@\expandafter=\csname dtldb@#1\endcsname + \edef\@dtl@dogetrow{\noexpand\@dtlgetrow{\the\toks@}{\dtl@rowidx}}% + \@dtl@dogetrow + \fi +} +% \end{macrocode} +%\end{macro} +% % %\begin{macro}{\@dtlgetrow} %\begin{definition} @@ -6883,6 +6929,82 @@ datatool.dtx % \end{macrocode} %\end{macro} % +%\begin{macro}{\dtlupdateentryincurrentrow} +%\begin{definition} +%\cs{dtlupdateentryincurrentrow}\marg{key}\marg{value} +%\end{definition} +% Appends entry to \cs{dtlcurrentrow} if column with given key +% doesn't exist, otherwise updates the value. +%\changes{2.11}{2012-09-25}{new} +% \begin{macrocode} +\newcommand*{\dtlupdateentryincurrentrow}[2]{% +% \end{macrocode} +% Update information about this column (adding new column if +% necessary) +% \begin{macrocode} + \@dtl@updatekeys{\dtldbname}{#1}{#2}% +% \end{macrocode} +% Get column index and store in \cs{dtlcolumnnum} +% \begin{macrocode} + \expandafter\dtlcolumnnum\expandafter + =\dtlcolumnindex{\dtldbname}{#1}\relax +% \end{macrocode} +% Does this row already have an entry with this key? +% \begin{macrocode} + \edef\dtl@dogetentry{\noexpand\dtlgetentryfromcurrentrow + {\noexpand\dtl@entry}{\number\dtlcolumnnum}% + }% + \dtl@dogetentry + \ifx\dtl@entry\dtlnovalue +% \end{macrocode} +% There are no entries in this row for the given key. +% Expand entry value before storing. +% \begin{macrocode} + \protected@edef\@dtl@tmp{#2}% + \expandafter\@dtl@toks\expandafter{\@dtl@tmp}% +% \end{macrocode} +% Append this entry to the current row. +% \begin{macrocode} + \toks@gput@right@cx{dtlcurrentrow}% + {% +% \end{macrocode} +% Begin column index specs: +% \begin{macrocode} + \noexpand\db@col@id@w + \number\dtlcolumnnum + \noexpand\db@col@id@end@ +% \end{macrocode} +% New entry: +% \begin{macrocode} + \noexpand\db@col@elt@w + \the\@dtl@toks + \noexpand\db@col@elt@end@ +% \end{macrocode} +% End column index specs: +% \begin{macrocode} + \noexpand\db@col@id@w + \number\dtlcolumnnum + \noexpand\db@col@id@end@ + }% +% \end{macrocode} +% Print information to terminal and log file if in verbose mode. +% \begin{macrocode} + \dtl@message{Appended #1\space -> #2\space to database + `\dtldbname'}% + \else +% \end{macrocode} +% There is already an entry in this row for the given key +% \begin{macrocode} + \toks@{#2}% + \edef\do@dtlreplaceincurrentrow{% + \noexpand\dtlreplaceentryincurrentrow{\the\toks@}{\number\dtlcolumnnum}% + }% + \do@dtlreplaceincurrentrow + \fi +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\DTLgetvalue} %\begin{definition} %\cs{DTLgetvalue}\marg{cs}\marg{db}\marg{r}\marg{c} @@ -6915,7 +7037,7 @@ datatool.dtx \db@col@elt@w \@dtlnovalue\db@col@elt@end@% undefined value \q@nil \ifx#1\dtlnovalue - \PackageError{datatool}{There is no element at (row=#3, + \PackageError{datatool}{There is no element at (row=#3,\space column=#4) in database `#2'}{}% \fi } @@ -6945,12 +7067,76 @@ datatool.dtx \db@row@id@w \@dtlnovalue\db@row@id@end@% undefined row id \q@nil \ifx#1\dtlnovalue - \PackageError{datatool}{There is no element `#4' in - database `#3'}{}% + \PackageError{datatool}{There is no element `#4' in database `#3'}{}% + \fi +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\DTLgetrowindex} +%\begin{definition} +%\cs{DTLgetrowindex}\marg{row cs}\marg{database}\marg{column index}% +%\marg{value} +%\end{definition} +% Assigns \meta{row cs} to the row index of the +% first entry in \meta{database} where the entry in \meta{column +% index} matches \meta{value}. +%\changes{2.11}{2012-09-25}{new} +% \begin{macrocode} +\newcommand*{\DTLgetrowindex}[4]{% + \toks@{#4}% + \edef\dtl@dogetrowindex{\noexpand\@dtlgetrowindex{\noexpand#1}{#2}{\number#3}{\the\toks@}}% + \dtl@dogetrowindex + \ifx#1\dtlnovalue + \PackageError{datatool}{There is no element `#4' for column + \number#3\space in database `#2'}{}% \fi } % \end{macrocode} %\end{macro} +% +%\begin{macro}{\dtlgetrowindex} +%\begin{definition} +%\cs{dtlgetrowindex}\marg{row cs}\marg{database}\marg{column index}% +%\marg{value} +%\end{definition} +% As above but doesn't produce an error if not found. +%\changes{2.11}{2012-09-25}{new} +% \begin{macrocode} +\newcommand*{\dtlgetrowindex}[4]{% + \toks@{#4}% + \edef\dtl@dogetrowindex{\noexpand\@dtlgetrowindex{\noexpand#1}{#2}{\number#3}{\the\toks@}}% + \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. +%\changes{2.11}{2012-09-25}{new} +% \begin{macrocode} +\newcommand*{\@dtlgetrowindex}[4]{% + \def\@dtl@getrowindex##1% stuff before value + \db@col@elt@w #4\db@col@elt@end@% value + \db@col@id@w #3\db@col@id@end@% column id + ##2% stuff after this column + \db@row@id@w ##3\db@row@id@end@% row id + ##4% stuff after row + \q@nil{\def#1{##3}}% + \toks@=\csname dtldb@#2\endcsname + \expandafter\@dtl@getrowindex\the\toks@% contents of data base + \db@col@elt@w #4\db@col@elt@end@% value + \db@col@id@w #3\db@col@id@end@% column id + \db@row@id@w \@dtlnovalue\db@row@id@end@% undefined row id + \q@nil +} +% \end{macrocode} +%\end{macro} + %\section{Iterating Through Databases} %\label{sec:code:loops} @@ -8644,6 +8830,14 @@ datatool.dtx \newcommand*{\dtldisplayafterhead}{} % \end{macrocode} %\end{macro} +%\begin{macro}{\dtldisplayvalign} +%\changes{2.11}{2012-09-25}{new} +% Stores the vertical alignment specifier for the tabular +% environment used in \cs{DTLdisplaydb} +% \begin{macrocode} +\newcommand*{\dtldisplayvalign}{c} +% \end{macrocode} +%\end{macro} % %\begin{macro}{\dtldisplaystartrow} % Indicates what to do at the start of each row (not including @@ -8696,7 +8890,7 @@ datatool.dtx % \end{macrocode} % Begin tabular environment % \begin{macrocode} - \edef\@dtl@dobegintab{\noexpand\begin{tabular}{\@dtl@tabargs}}% + \edef\@dtl@dobegintab{\noexpand\begin{tabular}[\dtldisplayvalign]{\@dtl@tabargs}}% \@dtl@dobegintab % \end{macrocode} % Do start hook @@ -11534,7 +11728,7 @@ datatool.dtx %\section{Package Declaration} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{databib}[2012/07/18 v2.10 (NLCT)] +\ProvidesPackage{databib}[2012/09/25 v2.11 (NLCT)] % \end{macrocode} % Load required packages: % \begin{macrocode} @@ -14241,7 +14435,7 @@ already exists}{}}}} % Declare package: % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{databar}[2012/07/18 v2.10 (NLCT)] +\ProvidesPackage{databar}[2012/09/25 v2.11 (NLCT)] % \end{macrocode} % Require \sty{xkeyval} package % \begin{macrocode} @@ -15542,7 +15736,7 @@ already exists}{}}}} % Declare package: % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{datapie}[2012/07/18 v2.10 (NLCT)] +\ProvidesPackage{datapie}[2012/09/25 v2.11 (NLCT)] % \end{macrocode} % Require \sty{xkeyval} package % \begin{macrocode} @@ -16220,7 +16414,7 @@ Try #2-#1 instead of #1-#2}% % Declare package: % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{dataplot}[2012/07/18 v2.10 (NLCT)] +\ProvidesPackage{dataplot}[2012/09/25 v2.11 (NLCT)] % \end{macrocode} % Required packages % \begin{macrocode} @@ -17649,7 +17843,7 @@ east,southeast,south,southwest,west,northwest}[northeast]{% % Package identification: % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{person}[2012/07/18 v2.10 (NLCT)] +\ProvidesPackage{person}[2012/09/25 v2.11 (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 ace8870e0cc..8b90d4d9259 100644 --- a/Master/texmf-dist/source/latex/datatool/datatool.ins +++ b/Master/texmf-dist/source/latex/datatool/datatool.ins @@ -1,4 +1,4 @@ -% datatool.ins generated using makedtx version 0.94b 2012/7/19 16:34 +% datatool.ins generated using makedtx version 0.94b 2012/9/25 22:56 \input docstrip \preamble diff --git a/Master/texmf-dist/tex/latex/datatool/databar.sty b/Master/texmf-dist/tex/latex/datatool/databar.sty index 513e39c512e..972aa20eceb 100644 --- a/Master/texmf-dist/tex/latex/datatool/databar.sty +++ b/Master/texmf-dist/tex/latex/datatool/databar.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{databar}[2012/07/18 v2.10 (NLCT)] +\ProvidesPackage{databar}[2012/09/25 v2.11 (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 1229b6dcfc7..c5c7ada4dfc 100644 --- a/Master/texmf-dist/tex/latex/datatool/databib.sty +++ b/Master/texmf-dist/tex/latex/datatool/databib.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{databib}[2012/07/18 v2.10 (NLCT)] +\ProvidesPackage{databib}[2012/09/25 v2.11 (NLCT)] \RequirePackage{datatool} \newcommand*{\dtlbib@style}{plain} \define@choicekey{databib.sty}{style}{plain,abbrv,alpha}{% diff --git a/Master/texmf-dist/tex/latex/datatool/datapie.sty b/Master/texmf-dist/tex/latex/datatool/datapie.sty index f464e584153..21da0dc72a1 100644 --- a/Master/texmf-dist/tex/latex/datatool/datapie.sty +++ b/Master/texmf-dist/tex/latex/datatool/datapie.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{datapie}[2012/07/18 v2.10 (NLCT)] +\ProvidesPackage{datapie}[2012/09/25 v2.11 (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 29bc2632de6..2131f0a62d5 100644 --- a/Master/texmf-dist/tex/latex/datatool/dataplot.sty +++ b/Master/texmf-dist/tex/latex/datatool/dataplot.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{dataplot}[2012/07/18 v2.10 (NLCT)] +\ProvidesPackage{dataplot}[2012/09/25 v2.11 (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 90e7a0c545a..005b6acd55a 100644 --- a/Master/texmf-dist/tex/latex/datatool/datatool-base.sty +++ b/Master/texmf-dist/tex/latex/datatool/datatool-base.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{datatool-base}[2012/07/18 v2.10 (NLCT)] +\ProvidesPackage{datatool-base}[2012/09/25 v2.11 (NLCT)] \RequirePackage{etoolbox} \RequirePackage{amsmath} \RequirePackage{xkeyval} diff --git a/Master/texmf-dist/tex/latex/datatool/datatool-fp.sty b/Master/texmf-dist/tex/latex/datatool/datatool-fp.sty index 135d81f2c5b..de6bf14aa2c 100644 --- a/Master/texmf-dist/tex/latex/datatool/datatool-fp.sty +++ b/Master/texmf-dist/tex/latex/datatool/datatool-fp.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{datatool-fp}[2012/07/18 v2.10 (NLCT)] +\ProvidesPackage{datatool-fp}[2012/09/25 v2.11 (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 4da81dbc76f..b6a593d36eb 100644 --- a/Master/texmf-dist/tex/latex/datatool/datatool-pgfmath.sty +++ b/Master/texmf-dist/tex/latex/datatool/datatool-pgfmath.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{datatool-pgfmath}[2012/07/18 v2.10 (NLCT)] +\ProvidesPackage{datatool-pgfmath}[2012/09/25 v2.11 (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 103f7daa59a..b8d1237baf7 100644 --- a/Master/texmf-dist/tex/latex/datatool/datatool.sty +++ b/Master/texmf-dist/tex/latex/datatool/datatool.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{datatool}[2012/07/18 v2.10 (NLCT)] +\ProvidesPackage{datatool}[2012/09/25 v2.11 (NLCT)] \RequirePackage{xkeyval} \RequirePackage{ifthen} \RequirePackage{xfor} @@ -363,6 +363,18 @@ \newtoks\@dtl@before \newtoks\@dtl@after \newtoks\@dtl@colhead +\newcommand*{\DTLaddcolumn}{% + \@ifstar\@sDTLaddcolumn\@DTLaddcolumn +} +\newcommand{\@DTLaddcolumn}[2]{% + \DTLifdbexists{#1}% + {\@dtl@updatekeys{#1}{#2}{}}% + {\PackageError{datatool}{Can't add new column to database `#1': + database doesn't exist}{}}% +} +\newcommand{\s@DTLaddcolumn}[2]{% + \@dtl@updatekeys{#1}{#2}{}% +} \newcommand*{\@dtl@updatekeys}[3]{% \@sDTLifhaskey{#1}{#2}% {% @@ -372,7 +384,7 @@ {\noexpand\@dtl@key}{\noexpand\@dtl@type}% {\noexpand\@dtl@colhead}{\noexpand\@dtl@before}% {\noexpand\@dtl@after}{\the\csname dtlkeys@#1\endcsname}% - {\number\dtlcolumnnum}} + {\number\dtlcolumnnum}}% \@dtl@dogetprops \ifstrempty{#3}% {% @@ -662,6 +674,7 @@ \newtoks\dtlcurrentrow \newtoks\dtlbeforerow \newtoks\dtlafterrow + \newcommand*{\dtlgetrow}[2]{% \dtlrownum=#2\relax \edef\dtldbname{#1}% @@ -669,6 +682,19 @@ \edef\@dtl@dogetrow{\noexpand\@dtlgetrow{\the\toks@}{\number#2}}% \@dtl@dogetrow } +\newcommand*{\dtlgetrowforvalue}[3]{% + \dtlgetrowindex{\dtl@rowidx}{#1}{#2}{#3}% + \ifx\dtl@rowidx\dtlnovalue + \PackageError{datatool}{No row found in database `#1' for + column `\number#2' matching `#3'}{}% + \else + \dtlrownum=\dtl@rowidx\relax + \edef\dtldbname{#1}% + \expandafter\toks@\expandafter=\csname dtldb@#1\endcsname + \edef\@dtl@dogetrow{\noexpand\@dtlgetrow{\the\toks@}{\dtl@rowidx}}% + \@dtl@dogetrow + \fi +} \newcommand*{\@dtlgetrow}[2]{% \def\@dtl@getrow##1% before stuff \db@row@elt@w% start of the row @@ -811,6 +837,39 @@ there is already an entry for key `#1' in this row}{}% \fi } +\newcommand*{\dtlupdateentryincurrentrow}[2]{% + \@dtl@updatekeys{\dtldbname}{#1}{#2}% + \expandafter\dtlcolumnnum\expandafter + =\dtlcolumnindex{\dtldbname}{#1}\relax + \edef\dtl@dogetentry{\noexpand\dtlgetentryfromcurrentrow + {\noexpand\dtl@entry}{\number\dtlcolumnnum}% + }% + \dtl@dogetentry + \ifx\dtl@entry\dtlnovalue + \protected@edef\@dtl@tmp{#2}% + \expandafter\@dtl@toks\expandafter{\@dtl@tmp}% + \toks@gput@right@cx{dtlcurrentrow}% + {% + \noexpand\db@col@id@w + \number\dtlcolumnnum + \noexpand\db@col@id@end@ + \noexpand\db@col@elt@w + \the\@dtl@toks + \noexpand\db@col@elt@end@ + \noexpand\db@col@id@w + \number\dtlcolumnnum + \noexpand\db@col@id@end@ + }% + \dtl@message{Appended #1\space -> #2\space to database + `\dtldbname'}% + \else + \toks@{#2}% + \edef\do@dtlreplaceincurrentrow{% + \noexpand\dtlreplaceentryincurrentrow{\the\toks@}{\number\dtlcolumnnum}% + }% + \do@dtlreplaceincurrentrow + \fi +} \newcommand*{\DTLgetvalue}[4]{% \edef\dtl@dogetvalue{\noexpand\dtl@getvalue{\noexpand#1}{#2}% {\number#3}{\number#4}}% @@ -831,7 +890,7 @@ \db@col@elt@w \@dtlnovalue\db@col@elt@end@% undefined value \q@nil \ifx#1\dtlnovalue - \PackageError{datatool}{There is no element at (row=#3, + \PackageError{datatool}{There is no element at (row=#3,\space column=#4) in database `#2'}{}% \fi } @@ -850,10 +909,38 @@ \db@row@id@w \@dtlnovalue\db@row@id@end@% undefined row id \q@nil \ifx#1\dtlnovalue - \PackageError{datatool}{There is no element `#4' in - database `#3'}{}% + \PackageError{datatool}{There is no element `#4' in database `#3'}{}% + \fi +} +\newcommand*{\DTLgetrowindex}[4]{% + \toks@{#4}% + \edef\dtl@dogetrowindex{\noexpand\@dtlgetrowindex{\noexpand#1}{#2}{\number#3}{\the\toks@}}% + \dtl@dogetrowindex + \ifx#1\dtlnovalue + \PackageError{datatool}{There is no element `#4' for column + \number#3\space in database `#2'}{}% \fi } +\newcommand*{\dtlgetrowindex}[4]{% + \toks@{#4}% + \edef\dtl@dogetrowindex{\noexpand\@dtlgetrowindex{\noexpand#1}{#2}{\number#3}{\the\toks@}}% + \dtl@dogetrowindex +} +\newcommand*{\@dtlgetrowindex}[4]{% + \def\@dtl@getrowindex##1% stuff before value + \db@col@elt@w #4\db@col@elt@end@% value + \db@col@id@w #3\db@col@id@end@% column id + ##2% stuff after this column + \db@row@id@w ##3\db@row@id@end@% row id + ##4% stuff after row + \q@nil{\def#1{##3}}% + \toks@=\csname dtldb@#2\endcsname + \expandafter\@dtl@getrowindex\the\toks@% contents of data base + \db@col@elt@w #4\db@col@elt@end@% value + \db@col@id@w #3\db@col@id@end@% column id + \db@row@id@w \@dtlnovalue\db@row@id@end@% undefined row id + \q@nil +} \long\def\@dtlforeachrow(#1,#2)\in#3\do#4{% \edef\dtl@tmp{\expandafter\the\csname dtldb@#3\endcsname}% @@ -1620,6 +1707,7 @@ \newcommand*{\dtldisplaystarttab}{} \newcommand*{\dtldisplayendtab}{} \newcommand*{\dtldisplayafterhead}{} +\newcommand*{\dtldisplayvalign}{c} \newcommand*{\dtldisplaystartrow}{} \newcommand*{\DTLdisplaydb}[2][]{% @@ -1640,7 +1728,7 @@ \dtladdalign\@dtl@tabargs\@dtl@type\@dtl@idx\@dtl@maxcols } }% - \edef\@dtl@dobegintab{\noexpand\begin{tabular}{\@dtl@tabargs}}% + \edef\@dtl@dobegintab{\noexpand\begin{tabular}[\dtldisplayvalign]{\@dtl@tabargs}}% \@dtl@dobegintab \dtldisplaystarttab \@dtl@resetdoamp diff --git a/Master/texmf-dist/tex/latex/datatool/person.sty b/Master/texmf-dist/tex/latex/datatool/person.sty index 8d77dbcacd0..84d18ad96da 100644 --- a/Master/texmf-dist/tex/latex/datatool/person.sty +++ b/Master/texmf-dist/tex/latex/datatool/person.sty @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{person}[2012/07/18 v2.10 (NLCT)] +\ProvidesPackage{person}[2012/09/25 v2.11 (NLCT)] \RequirePackage{ifthen} \RequirePackage{datatool} \newcounter{people} |