summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-06-18 23:15:16 +0000
committerKarl Berry <karl@freefriends.org>2014-06-18 23:15:16 +0000
commit20149d661e5c2763abbd1999e6c76bba077bdb12 (patch)
treec4e7450fb6ac47ea73b894f1b807e344911e7d4a /Master
parent85fc59cf08a807c229b696a5caf12c98fb5af1dd (diff)
datatool (10jun14)
git-svn-id: svn://tug.org/texlive/trunk@34305 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/datatool/CHANGES18
-rw-r--r--Master/texmf-dist/doc/latex/datatool/README4
-rw-r--r--Master/texmf-dist/doc/latex/datatool/datatool-code.pdfbin918044 -> 922877 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/datatool-user.pdfbin603313 -> 605320 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/datatool-user.tex46
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/rawdata3.csv3
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-autokeys.pdfbin0 -> 24927 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-autokeys.tex12
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-barchart.pdfbin35074 -> 35078 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-datatooltk.pdfbin22860 -> 22872 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-dict.pdfbin122594 -> 122606 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-europecv-bib.pdfbin89562 -> 89563 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-gidx.pdfbin179875 -> 179702 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-glossary.pdfbin104484 -> 104321 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-index.pdfbin128783 -> 128798 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-mail-merge.pdfbin21619 -> 21627 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-piechart.pdfbin33964 -> 33976 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-sort.pdfbin61053 -> 61072 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-student-scores.pdfbin34615 -> 34627 bytes
-rw-r--r--Master/texmf-dist/doc/latex/datatool/samples/sample-two-per-row.pdfbin31752 -> 31764 bytes
-rw-r--r--Master/texmf-dist/source/latex/datatool/datatool.dtx455
-rw-r--r--Master/texmf-dist/source/latex/datatool/datatool.ins2
-rw-r--r--Master/texmf-dist/tex/latex/datatool/databib.sty305
-rw-r--r--Master/texmf-dist/tex/latex/datatool/datatool-base.sty32
-rw-r--r--Master/texmf-dist/tex/latex/datatool/datatool.sty19
25 files changed, 608 insertions, 288 deletions
diff --git a/Master/texmf-dist/doc/latex/datatool/CHANGES b/Master/texmf-dist/doc/latex/datatool/CHANGES
index ff065adeb16..cd5ac54b758 100644
--- a/Master/texmf-dist/doc/latex/datatool/CHANGES
+++ b/Master/texmf-dist/doc/latex/datatool/CHANGES
@@ -1,3 +1,21 @@
+v2.22:
+
+ * datatool-base:
+
+ - Bug fix: removed \@dtl@choptrailingzeroes from
+ \@dtl@decimaltolocalefrac (interfering with \DTLround)
+
+ * datatool:
+
+ - added "autokeys" option to \DTLloaddb and \DTLloadrawdb
+
+ * databib:
+
+ - new commands: \DTLbibfieldlet, \DTLformatthisbibentry,
+ \DTLpcite, \DTLcustombibitem, \DTLformatbooktitle
+
+
+
v2.21:
* datatool:
diff --git a/Master/texmf-dist/doc/latex/datatool/README b/Master/texmf-dist/doc/latex/datatool/README
index df1c3a5b00b..4e551211d9d 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.21
+LaTeX Bundle : datatool v2.22
-Last Modified : 2014-03-08
+Last Modified : 2014-06-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 7c25b37d2b8..7ca6fba6710 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 65f3f640479..db0bb8965f4 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 25ab4e4d173..32208ad80e5 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.21}
+ \title{User Manual for datatool bundle version~2.22}
\author{Nicola L.C. Talbot\\
\url{http://www.dickimaw-books.com/}}
- \date{2014-03-08}
+ \date{2014-06-10}
\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.21}
+ read \qt{Documented Code for datatool v2.22}
\item[INSTALL] Installation instructions.
@@ -2290,6 +2290,15 @@ For example:
\DTLloaddb[noheader,keys={Temperature,Time,T2G}]{data}{data.csv}
\end{verbatim}
+\item[\csopt{DTLloaddb}{autokeys}] This is a boolean option that
+will automatically assign default keys (\cs{dtldefaultkey}\meta{n},
+as above) for all columns, regardless of whether the file has a
+header row. If true, this option overrides the
+\csopt{DTLloaddb}{keys} option. You may want to use this if you have
+a header row with many fields containing active characters but you
+only want to use commands like \cs{DTLdisplaydb}. (In which case,
+you may want to consider using \cs{DTLloadrawdb} to load the data.)
+
\item[\csopt{DTLloaddb}{headers}] This is a comma-separated list of
headers. If not supplied, the header will be the same as that given
in the header row, or the key if there is no header row. Note that
@@ -9644,6 +9653,16 @@ However, if there are only two author or editor names,
\DescribeMacro{\DTLtwoand}\cs{DTLtwoand}
is used instead of \cs{DTLandlast}.
+\DescribeMacro\DTLbibitem
+The command \cs{DTLbibitem} is used at the start of each
+bibliography item. It uses \cs{bibitem} to provide a marker,
+such as [1], and writes the citation information to the
+\texttt{.aux} file.
+
+\DescribeMacro\DTLmbibitem
+The command \cs{DTLmbibitem} is analogous to \cs{DTLbibitem} but is
+for use with \cs{DTLmbibliography}.
+
\DescribeMacro{\DTLendbibitem}
The command \cs{DTLendbibitem} is a hook provided to add
additional information at the end of each bibliography item.
@@ -9816,6 +9835,12 @@ where \meta{field label} may be one of: "Address", "Author",
"Title", "Type", "Volume", "Year", "ISBN", "DOI", "PubMed",
"Abstract" or "Url".
+Alternatively, you can assign the value of a field to a control
+sequence \meta{cs} using:
+\begin{definition}[\DescribeMacro\DTLbibfieldlet]
+\cs{DTLbibfieldlet}\marg{cs}\marg{field label}
+\end{definition}
+
You can determine if a field exists for a given entry using
\begin{definition}[\DescribeMacro{\DTLifbibfieldexists}]%
\cs{DTLifbibfieldexists}\marg{field label}\marg{true part}\marg{false
@@ -9847,6 +9872,21 @@ by the bibliography style. There is also a~version for use with
\begin{definition}[\DescribeMacro{\gDTLformatbibentry}]%
\cs{gDTLformatbibentry}
\end{definition}
+It's also possible to use \cs{DTLformatbibentry} for a specific key,
+rather than using it within \ics{DTLforeachbibentry} using:
+\begin{definition}
+\cs{DTLformatthisbibentry}\marg{db}\marg{cite key}
+\end{definition}
+where \meta{db} is the database name and \meta{cite key} is the
+citation label. Note that none of these three commands use
+\cs{bibitem}. You can manually insert \cs{bibitem}\marg{cite key}
+in front of the command, or you can use:
+\begin{definition}
+\cs{DTLcustombibitem}\marg{marker code}\marg{ref text}\marg{cite key}
+\end{definition}
+This is like \cs{bibitem}\oarg{text}\marg{cite key} except that it uses
+\meta{marker code} instead of \cs{item}\oarg{text} and it uses
+\meta{ref text} instead of \verb|\the\value{\@listctr}|.
\begin{definition}[\DescribeMacro{\DTLcomputewidestbibentry}]%
\cs{DTLcomputewidestbibentry}\marg{conditions}\marg{db
diff --git a/Master/texmf-dist/doc/latex/datatool/samples/rawdata3.csv b/Master/texmf-dist/doc/latex/datatool/samples/rawdata3.csv
new file mode 100644
index 00000000000..3272841e387
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/datatool/samples/rawdata3.csv
@@ -0,0 +1,3 @@
+Product,Price ($)
+Fruit & Veg,0.50
+Cake & Biscuits,0.80
diff --git a/Master/texmf-dist/doc/latex/datatool/samples/sample-autokeys.pdf b/Master/texmf-dist/doc/latex/datatool/samples/sample-autokeys.pdf
new file mode 100644
index 00000000000..c11dc191e5f
--- /dev/null
+++ 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-autokeys.tex b/Master/texmf-dist/doc/latex/datatool/samples/sample-autokeys.tex
new file mode 100644
index 00000000000..48df7a814fb
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/datatool/samples/sample-autokeys.tex
@@ -0,0 +1,12 @@
+\documentclass{article}
+
+\usepackage{color}
+\usepackage{datatool}
+
+\begin{document}
+\DTLloadrawdb[autokeys]{data}{rawdata3.csv}
+
+\DTLdisplaydb{data}
+
+
+\end{document}
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 32105fbb3df..08aaf9dbe91 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 4a1f512a56b..f866d058548 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 73c3569c736..e8b6521595d 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-europecv-bib.pdf b/Master/texmf-dist/doc/latex/datatool/samples/sample-europecv-bib.pdf
index 63ad2749252..9fe0a63135d 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 63df880b647..8b59b712a32 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 d9fc71b212b..2fe5fb0c6d3 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 47f289c4994..831c1695e0d 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 3f5eb9cde7f..a5296a0191b 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 0d57d1b5653..d43eb8defee 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 9491afb760f..28fee46c6ea 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 536af516690..ca3fd9277fe 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 85a9334a3b7..b8a6000b12a 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 7ab993f3c21..5a7334aacf8 100644
--- a/Master/texmf-dist/source/latex/datatool/datatool.dtx
+++ b/Master/texmf-dist/source/latex/datatool/datatool.dtx
@@ -19,7 +19,7 @@
% -author "Nicola Talbot"
% -codetitle ""
% datatool
-% Created on 2014/3/8 20:11
+% Created on 2014/6/10 11:44
%\fi
%\iffalse
%<*package>
@@ -66,7 +66,7 @@ datatool.dtx
\doxitem{Counter}{counter}{counters}
\doxitem{Option}{option}{package options}
-\CheckSum{23069}
+\CheckSum{23135}
\RecordChanges
\PageIndex
@@ -79,11 +79,11 @@ datatool.dtx
%\fi
%\MakeShortVerb{"}
%
-%\title{Documented Code for datatool v2.21}
+%\title{Documented Code for datatool v2.22}
%\author{Nicola L. C. Talbot\\
%\url{http://www.dickimaw-books.com/}}
%
-%\date{2014-03-08}
+%\date{2014-06-10}
%\maketitle
%
%\pagenumbering{roman}
@@ -117,7 +117,7 @@ datatool.dtx
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool-base}[2013/09/06 v2.18 (NLCT)]
+\ProvidesPackage{datatool-base}[2014/06/10 v2.22 (NLCT)]
% \end{macrocode}
% Required packages:
% \begin{macrocode}
@@ -898,11 +898,13 @@ datatool.dtx
\def\@dtl@decimaltolocale#1.#2\relax{%
\@dtl@decimaltolocaleint{#1}%
\def\@dtl@fracpart{#2}%
- \ifx\@dtl@fracpart\@empty
+ \ifdefempty\@dtl@fracpart
+ {%
\def\@dtl@fracpart{0}%
- \else
+ }%
+ {%
\@dtl@decimaltolocalefrac#2\relax
- \fi
+ }%
}
% \end{macrocode}
%\end{macro}
@@ -963,11 +965,52 @@ datatool.dtx
%\end{macro}
%
%\begin{macro}{\@dtl@decimaltolocalefrac}
-% Convert the fractional part (store in \cs{@dtl@fracpart})
+% Convert the fractional part (store in \cs{@dtl@fracpart}).
+%\changes{2.22}{2014-06-10}{removed \cs{@dtl@choptrailingzeroes}
+% and added \cs{@dtl@chopexcessfrac}}%
+%\cs{@dtl@choptrailingzeroes} was originally used, but this
+%interfered with \cs{dtlround}. Removing
+%\cs{@dtl@choptrailingzeroes} caused a `Number too big' error,
+% so any fractional part over 2147483647 needs to be trimmed.
+% Unfortunately \verb|\ifnum#1>2147483647| also causes the
+% `Number too big' error, so count the digits, and if the digit
+% count exceeds 9, trim the excess.
% \begin{macrocode}
\def\@dtl@decimaltolocalefrac#1.\relax{%
- \def\@dtl@fracpart{#1}%
- \@dtl@choptrailingzeroes{\@dtl@fracpart}%
+ \count@=0\relax
+ \@dtl@digitcount#1\relax
+ \ifnum\count@>9\relax
+ \@dtl@chopexcessfrac#1000000000\@nil
+ \else
+ \def\@dtl@fracpart{#1}%
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@dtl@chopexcessfrac}
+% Chop fractional part to just 9 digits.
+%\changes{2.22}{2014-06-10}{new}
+% \begin{macrocode}
+\newcommand*{\@dtl@chopexcessfrac}[9]{%
+ \def\@dtl@fracpart{#1#2#3#4#5#6#7#8#9}%
+ \@dtl@gobbletonil
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@dtl@digitcount}
+% Counts the number of digits in \#1.
+%\changes{2.22}{2014-06-10}{new}
+% \begin{macrocode}
+\newcommand*{\@dtl@digitcount}[1]{%
+ \ifx\relax#1\relax
+ \let\@dtl@digitcountnext\relax
+ \else
+ \advance\count@ by \@ne
+ \let\@dtl@digitcountnext\@dtl@digitcount
+ \fi
+ \@dtl@digitcountnext
}
% \end{macrocode}
%\end{macro}
@@ -5708,7 +5751,7 @@ datatool.dtx
%\section{Package Declaration}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{datatool}[2014/03/08 v2.21 (NLCT)]
+\ProvidesPackage{datatool}[2014/06/10 v2.22 (NLCT)]
% \end{macrocode}
% Load required packages:
% \begin{macrocode}
@@ -12562,6 +12605,14 @@ datatool.dtx
\define@boolkey{loaddb}[dtl]{noheader}[true]{}
% \end{macrocode}
%\end{macro}
+%\begin{macro}{\ifdtlautokeys}
+%\changes{2.22}{2014-06-10}{new}
+%Assign the default keys even if a header row is supplied.
+% \begin{macrocode}
+\define@boolkey{loaddb}[dtl]{autokeys}[true]{}
+\dtlautokeysfalse
+% \end{macrocode}
+%\end{macro}
% The "keys" option specifies the list of keys in the same order
% as the columns in the data file.
% Each key is stored in \cs{@dtl@inky@}\meta{n} where \meta{n} is the
@@ -12808,14 +12859,23 @@ datatool.dtx
% \begin{macrocode}
\advance\dtl@entrycr by 1\relax
% \end{macrocode}
+% If autokeys option is on, add generic key
+%\changes{2.22}{2014-06-10}{added check for autokeys}
+% \begin{macrocode}
+ \ifdtlautokeys
+ \csedef{@dtl@inky@\romannumeral\dtl@entrycr}%
+ {\dtldefaultkey\number\dtl@entrycr}%
+ \else
+% \end{macrocode}
% If missing a key, add generic one:
%\changes{2.10}{2012-07-18}{add generic header if missing}
% \begin{macrocode}
- \ifdefempty{\@dtl@key}%
- {%
- \edef\@dtl@key{\dtldefaultkey\number\dtl@entrycr}%
- }%
- {}%
+ \ifdefempty{\@dtl@key}%
+ {%
+ \edef\@dtl@key{\dtldefaultkey\number\dtl@entrycr}%
+ }%
+ {}%
+ \fi
% \end{macrocode}
% Store key in \cs{@dtl@toks}
% \begin{macrocode}
@@ -19174,7 +19234,7 @@ datatool.dtx
%\section{Package Declaration}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{databib}[2014/03/08 v2.21 (NLCT)]
+\ProvidesPackage{databib}[2014/06/10 v2.22 (NLCT)]
% \end{macrocode}
% Load required packages:
% \begin{macrocode}
@@ -19395,6 +19455,25 @@ datatool.dtx
}
% \end{macrocode}
%\end{macro}
+%
+%\begin{macro}{\DTLformatthisbibentry}
+%\begin{definition}
+%\cs{DTLformatthisbibentry}\marg{db}\marg{cite key}
+%\end{definition}
+%\changes{2.22}{2014-06-10}{new}
+% Just does \cs{DTLformatbibentry} for a given entry.
+% \begin{macrocode}
+\newcommand*{\DTLformatthisbibentry}[2]{%
+ \edef\DBIBname{#1}%
+ \edef\DBIBcitekey{#2}%
+ \edtlgetrowforvalue{#1}{\dtlcolumnindex{#1}{CiteKey}}{\DBIBcitekey}%
+ \dtl@gathervalues{#1}{\dtlcurrentrow}%
+ \letcs{\DBIBentrytype}{@dtl@key@EntryType}%
+ \DTLformatbibentry
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\DTLendbibitem}
% Hook to add extra information at the end of a bibliography item.
% This does nothing by default.
@@ -19603,6 +19682,21 @@ datatool.dtx
\newcommand*{\DTLbibfield}[1]{\csname @dtl@key@#1\endcsname}
% \end{macrocode}
%\end{macro}
+%\begin{macro}{\DTLbibfieldlet}
+%\begin{definition}
+%\cs{DTLbibfield}\marg{cs}\marg{field name}
+%\end{definition}
+% Gets the value assigned to the field \meta{field name} for
+% the current row of \cs{DTLforeachbibentry} and assigns it to the
+% control sequence \meta{cs}. (Doesn't check if
+% the field exists, or if it is being used within
+% \cs{DTLforeachbibentry}.)
+% \begin{macrocode}
+\newcommand*{\DTLbibfieldlet}[2]{%
+ \letcs{#1}{@dtl@key@#2}%
+}
+% \end{macrocode}
+%\end{macro}
%
%\begin{macro}{\DTLifbibfieldexists}
%\begin{definition}
@@ -20175,8 +20269,7 @@ datatool.dtx
{\em\DTLbibfield{Series}}}{}%
}%
}%
-\edef\@dtl@tmp{\DTLbibfield{CrossRef}}%
-~\cite{\@dtl@tmp}%
+~\DTLpcite{\DTLbibfield{CrossRef}}%
}
% \end{macrocode}
%\end{macro}
@@ -20207,10 +20300,9 @@ datatool.dtx
\else
\DTLstartsentencespace
\expandafter\MakeUppercase\inname
-\fi\ {\em\DTLbibfield{BookTitle}}}{}%
+\fi\ \DTLformatbooktitle{\DTLbibfield{BookTitle}}}{}%
}}%
-\edef\@dtl@tmp{\DTLbibfield{CrossRef}}%
-~\cite{\@dtl@tmp}%
+~\DTLpcite{\DTLbibfield{CrossRef}}%
}
% \end{macrocode}
%\end{macro}
@@ -20227,9 +20319,9 @@ datatool.dtx
\expandafter\MakeUppercase\inname
\fi\
\DTLifbibfieldexists{Editor}{%
-\DTLformateditorlist\DTLaddcomma {\em\DTLbibfield{BookTitle}}%
+\DTLformateditorlist\DTLaddcomma \DTLformatbooktitle{\DTLbibfield{BookTitle}}%
\DTLcheckbibfieldendsperiod{BookTitle}%
-}{{\em\DTLbibfield{BookTitle}}%
+}{\DTLformatbooktitle{\DTLbibfield{BookTitle}}%
\DTLcheckbibfieldendsperiod{BookTitle}%
}}{}}
% \end{macrocode}
@@ -20283,8 +20375,16 @@ datatool.dtx
\expandafter\MakeUppercase\inname
\fi
\ {\em\DTLbibfield{Journal}}}{}}%
-\edef\@dtl@tmp{\DTLbibfield{CrossRef}}%
-~\cite{\@dtl@tmp}%
+~\DTLpcite{\DTLbibfield{CrossRef}}%
+}
+% \end{macrocode}
+%\end{macro}
+%\begin{macro}{\DTLpcite}
+%\changes{2.22}{2014-06-10}{new}
+% \begin{macrocode}
+\newrobustcmd*{\DTLpcite}[1]{%
+ \protected@edef\@dtl@tmp{#1}%
+ \cite{\@dtl@tmp}%
}
% \end{macrocode}
%\end{macro}
@@ -20594,6 +20694,27 @@ datatool.dtx
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\DTLcustombibitem}
+%\changes{2.22}{2014-06-10}{new}
+%\begin{definition}
+%\cs{DTLcustombibitem}\marg{item code}\marg{ref text}\marg{cite key}
+%\end{definition}
+% As \cs{DTLbibitem} but user provides \meta{item code} to use in place of
+% \cs{item}. This code can access the cite key using
+% \cs{DBIBcitekey}. The \meta{ref text} is the text associated with
+% this bib item. (For example, if used in an enumerate environment,
+% \meta{ref text} might be \verb|\theenumi|.)
+% \begin{macrocode}
+\newcommand*{\DTLcustombibitem}[3]{%
+ #1%
+ \if@filesw
+ \immediate\write\@auxout{\string\bibcite{#3}{#2}}%
+ \fi
+ \ignorespaces
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\DTLformatauthor}
%\begin{definition}
%\cs{DTLformatauthor}\marg{von part}\marg{surname}\marg{junior
@@ -20856,151 +20977,191 @@ and Systems}
% \end{macrocode}
% Set how to format the entire bibliography:
% \begin{macrocode}
-\renewenvironment{DTLthebibliography}[2][\boolean{true}]{%
-\@dtl@tmpcount=0\relax
-\@sDTLforeach[##1]{##2}{}{\advance\@dtl@tmpcount by 1\relax}%
-\begin{thebibliography}{\number\@dtl@tmpcount}%
-}{\end{thebibliography}}%
+ \renewenvironment{DTLthebibliography}[2][\boolean{true}]{%
+ \@dtl@tmpcount=0\relax
+ \@sDTLforeach[##1]{##2}{}{\advance\@dtl@tmpcount by 1\relax}%
+ \begin{thebibliography}{\number\@dtl@tmpcount}%
+ }{\end{thebibliography}}%
% \end{macrocode}
% Set how to start the bibliography entry:
% \begin{macrocode}
-\renewcommand*{\DTLbibitem}{\bibitem{\DBIBcitekey}}%
-\renewcommand*{\DTLmbibitem}[1]{\bibitem{##1@\DBIBcitekey}}%
+ \renewcommand*{\DTLbibitem}{\bibitem{\DBIBcitekey}}%
+ \renewcommand*{\DTLmbibitem}[1]{\bibitem{##1@\DBIBcitekey}}%
% \end{macrocode}
% Sets the author name format.
% \begin{macrocode}
-\renewcommand*{\DTLformatauthor}[4]{%
-\DTLformatforenames{##4}
-\DTLformatvon{##1}%
-\DTLformatsurname{##2}%
-\DTLformatjr{##3}}
+ \renewcommand*{\DTLformatauthor}[4]{%
+ \DTLformatforenames{##4}
+ \DTLformatvon{##1}%
+ \DTLformatsurname{##2}%
+ \DTLformatjr{##3}}
% \end{macrocode}
% Sets the editor name format.
% \begin{macrocode}
-\renewcommand*{\DTLformateditor}[4]{%
-\DTLformatforenames{##4}
-\DTLformatvon{##1}%
-\DTLformatsurname{##2}%
-\DTLformatjr{##3}}
+ \renewcommand*{\DTLformateditor}[4]{%
+ \DTLformatforenames{##4}
+ \DTLformatvon{##1}%
+ \DTLformatsurname{##2}%
+ \DTLformatjr{##3}}
% \end{macrocode}
% Sets the edition format.
% \begin{macrocode}
-\renewcommand*{\DTLformatedition}[1]{##1 \editionname}%
+ \renewcommand*{\DTLformatedition}[1]{##1 \editionname}%
% \end{macrocode}
% Sets the monthname format.
% \begin{macrocode}
-\let\DTLmonthname\dtl@monthname
+ \let\DTLmonthname\dtl@monthname
% \end{macrocode}
% Sets other predefined names:
% \begin{macrocode}
-\renewcommand*{\DTLacmcs}{ACM Computing Surveys}
-\renewcommand*{\DTLacta}{Acta Informatica}
-\renewcommand*{\DTLcacm}{Communications of the ACM}
-\renewcommand*{\DTLibmjrd}{IBM Journal of Research and Development}
-\renewcommand*{\DTLibmsj}{IBM Systems Journal}
-\renewcommand*{\DTLieeese}{IEEE Transactions on Software Engineering}
-\renewcommand*{\DTLieeetc}{IEEE Transactions on Computers}
-\renewcommand*{\DTLieeetcad}{IEEE Transactions on Computer-Aided Design
+ \renewcommand*{\DTLacmcs}{ACM Computing Surveys}
+ \renewcommand*{\DTLacta}{Acta Informatica}
+ \renewcommand*{\DTLcacm}{Communications of the ACM}
+ \renewcommand*{\DTLibmjrd}{IBM Journal of Research and Development}
+ \renewcommand*{\DTLibmsj}{IBM Systems Journal}
+ \renewcommand*{\DTLieeese}{IEEE Transactions on Software Engineering}
+ \renewcommand*{\DTLieeetc}{IEEE Transactions on Computers}
+ \renewcommand*{\DTLieeetcad}{IEEE Transactions on Computer-Aided Design
of Integrated Circuits}
-\renewcommand*{\DTLipl}{Information Processing Letters}
-\renewcommand*{\DTLjacm}{Journal of the ACM}
-\renewcommand*{\DTLjcss}{Journal of Computer and System Sciences}
-\renewcommand*{\DTLscp}{Science of Computer Programming}
-\renewcommand*{\DTLsicomp}{SIAM Journal on Computing}
-\renewcommand*{\DTLtocs}{ACM Transactions on Computer Systems}
-\renewcommand*{\DTLtods}{ACM Transactions on Database Systems}
-\renewcommand*{\DTLtog}{ACM Transactions on Graphics}
-\renewcommand*{\DTLtoms}{ACM Transactions on Mathematical Software}
-\renewcommand*{\DTLtoois}{ACM Transactions on Office Information
+ \renewcommand*{\DTLipl}{Information Processing Letters}
+ \renewcommand*{\DTLjacm}{Journal of the ACM}
+ \renewcommand*{\DTLjcss}{Journal of Computer and System Sciences}
+ \renewcommand*{\DTLscp}{Science of Computer Programming}
+ \renewcommand*{\DTLsicomp}{SIAM Journal on Computing}
+ \renewcommand*{\DTLtocs}{ACM Transactions on Computer Systems}
+ \renewcommand*{\DTLtods}{ACM Transactions on Database Systems}
+ \renewcommand*{\DTLtog}{ACM Transactions on Graphics}
+ \renewcommand*{\DTLtoms}{ACM Transactions on Mathematical Software}
+ \renewcommand*{\DTLtoois}{ACM Transactions on Office Information
Systems}
-\renewcommand*{\DTLtoplas}{ACM Transactions on Programming Languages
+ \renewcommand*{\DTLtoplas}{ACM Transactions on Programming Languages
and Systems}
-\renewcommand*{\DTLtcs}{Theoretical Computer Science}
+ \renewcommand*{\DTLtcs}{Theoretical Computer Science}
% \end{macrocode}
% The format of an article.
% \begin{macrocode}
-\renewcommand*{\DTLformatarticle}{%
-\DTLformatauthorlist
-\DTLifbibfieldexists{Author}{\DTLaddperiod}{}%
-\DTLifbibfieldexists{Title}{%
-\DTLstartsentencespace\DTLbibfield{Title}%
-\DTLcheckbibfieldendsperiod{Title}%
-\DTLaddperiod}{}%
-\DTLifbibfieldexists{CrossRef}{%
+ \renewcommand*{\DTLformatarticle}{%
+ \DTLformatauthorlist
+ \DTLifbibfieldexists{Author}{\DTLaddperiod}{}%
+ \DTLifbibfieldexists{Title}{%
+ \DTLstartsentencespace\DTLbibfield{Title}%
+ \DTLcheckbibfieldendsperiod{Title}%
+ \DTLaddperiod}{}%
+ \DTLifbibfieldexists{CrossRef}{%
% cross ref field
-\DTLformatarticlecrossref
-\DTLifbibfieldexists{Pages}{\DTLaddcomma}{}%
-\DTLformatpages
-\DTLaddperiod
-}{% no cross ref field
-\DTLifbibfieldexists{Journal}{\DTLstartsentencespace
-{\em\DTLbibfield{Journal}}%
-\DTLcheckbibfieldendsperiod{Journal}%
-\DTLifanybibfieldexists{Number,Volume,Pages,Month,Year}{%
-\DTLaddcomma}{\DTLaddperiod}}{}%
-\DTLformatvolnumpages
-\DTLifanybibfieldexists{Volume,Number,Pages}{%
-\DTLifanybibfieldexists{Year,Month}{\DTLaddcomma}{%
-\DTLaddperiod}%
-\DTLmidsentencefalse}{}%
-\DTLformatdate
-\DTLifanybibfieldexists{Year,Month}{\DTLaddperiod}{}%
-}%
-\DTLifbibfieldexists{Note}{\DTLstartsentencespace\DTLbibfield{Note}%
-\DTLcheckbibfieldendsperiod{Note}%
-\DTLaddperiod}{}%
-}
+ \DTLformatarticlecrossref
+ \DTLifbibfieldexists{Pages}{\DTLaddcomma}{}%
+ \DTLformatpages
+ \DTLaddperiod
+ }{% no cross ref field
+ \DTLifbibfieldexists{Journal}{\DTLstartsentencespace
+ {\em\DTLbibfield{Journal}}%
+ \DTLcheckbibfieldendsperiod{Journal}%
+ \DTLifanybibfieldexists{Number,Volume,Pages,Month,Year}{%
+ \DTLaddcomma}{\DTLaddperiod}}{}%
+ \DTLformatvolnumpages
+ \DTLifanybibfieldexists{Volume,Number,Pages}{%
+ \DTLifanybibfieldexists{Year,Month}{\DTLaddcomma}{%
+ \DTLaddperiod}%
+ \DTLmidsentencefalse}{}%
+ \DTLformatdate
+ \DTLifanybibfieldexists{Year,Month}{\DTLaddperiod}{}%
+ }%
+ \DTLifbibfieldexists{Note}{\DTLstartsentencespace\DTLbibfield{Note}%
+ \DTLcheckbibfieldendsperiod{Note}%
+ \DTLaddperiod}{}%
+ }
% \end{macrocode}
% The format of a book.
% \begin{macrocode}
\renewcommand*{\DTLformatbook}{%
-\DTLifbibfieldexists{Author}{%
-\DTLformatauthorlist\DTLaddperiod
-}{\DTLformateditorlist\DTLifbibfieldexists{Editor}{%
-\DTLaddperiod}{}}%
-\DTLifbibfieldexists{Title}{\DTLstartsentencespace
-{\em\DTLbibfield{Title}}%
-\DTLcheckbibfieldendsperiod{Title}}{}%
-\DTLifbibfieldexists{CrossRef}{%
-% cross ref field
-\DTLifbibfieldexists{Title}{\DTLaddperiod}{}%
-\DTLformatbookcrossref
-\DTLifanybibfieldexists{Edition,Month,Year}{\DTLaddcomma
-}{\DTLaddperiod}%
-}{% no cross ref field
-\DTLifbibfieldexists{Title}{%
-\DTLifbibfieldexists{Volume}{\DTLaddcomma}{\DTLaddperiod}}{}%
-\DTLformatbvolume
-\DTLformatnumberseries
-\DTLifanybibfieldexists{Number,Series,Volume}{\DTLaddperiod}{}%
-\DTLifbibfieldexists{Publisher}{\DTLstartsentencespace
-\DTLbibfield{Publisher}%
-\DTLcheckbibfieldendsperiod{Publisher}%
-\DTLifbibfieldexists{Address}{\DTLaddcomma}{%
-\DTLifanybibfieldexists{Month,Year}{\DTLaddcomma
-}{\DTLaddperiod}%
-}}{}%
-\DTLifbibfieldexists{Address}{\DTLstartsentencespace
-\DTLbibfield{Address}%
-\DTLcheckbibfieldendsperiod{Address}%
-\DTLifanybibfieldexists{Month,Year}{\DTLaddcomma}{\DTLaddperiod}}{}%
-}%
-\DTLifbibfieldexists{Edition}{%
-\protected@edef\@dtl@tmp{\DTLformatedition{\DTLbibfield{Edition}}}%
-\ifDTLmidsentence
- \@dtl@tmp
-\else
- \DTLstartsentencespace\expandafter\MakeUppercase\@dtl@tmp
-\fi
-\expandafter\DTLcheckendsperiod\expandafter{\@dtl@tmp}%
-\DTLifanybibfieldexists{Month,Year}{\DTLaddcomma}{\DTLaddperiod}%
-}{}%
-\DTLformatdate
-\DTLifanybibfieldexists{Year,Month}{\DTLaddperiod}{}%
-\DTLifbibfieldexists{Note}{\DTLstartsentencespace
-\DTLbibfield{Note}%
-\DTLcheckbibfieldendsperiod{Note}%
-\DTLaddperiod}{}%
+ \DTLifbibfieldexists{Author}%
+ {%
+ \DTLformatauthorlist\DTLaddperiod
+ }%
+ {%
+ \DTLformateditorlist
+ \DTLifbibfieldexists{Editor}%
+ {%
+ \DTLaddperiod
+ }%
+ {}%
+ }%
+ \DTLifbibfieldexists{Title}%
+ {%
+ \DTLstartsentencespace
+ \DTLformatbooktitle{\DTLbibfield{Title}}%
+ \DTLcheckbibfieldendsperiod{Title}%
+ }%
+ {}%
+ \DTLifbibfieldexists{CrossRef}%
+ {%
+% \end{macrocode}
+% Cross ref field
+% \begin{macrocode}
+ \DTLifbibfieldexists{Title}{\DTLaddperiod}{}%
+ \DTLformatbookcrossref
+ \DTLifanybibfieldexists{Edition,Month,Year}%
+ {\DTLaddcomma}%
+ {\DTLaddperiod}%
+ }%
+ {%
+% \end{macrocode}
+% no cross ref field
+% \begin{macrocode}
+ \DTLifbibfieldexists{Title}%
+ {%
+ \DTLifbibfieldexists{Volume}{\DTLaddcomma}{\DTLaddperiod}%
+ }%
+ {}%
+ \DTLformatbvolume
+ \DTLformatnumberseries
+ \DTLifanybibfieldexists{Number,Series,Volume}{\DTLaddperiod}{}%
+ \DTLifbibfieldexists{Publisher}%
+ {%
+ \DTLstartsentencespace
+ \DTLbibfield{Publisher}%
+ \DTLcheckbibfieldendsperiod{Publisher}%
+ \DTLifbibfieldexists{Address}%
+ {\DTLaddcomma}%
+ {%
+ \DTLifanybibfieldexists{Month,Year}%
+ {\DTLaddcomma}%
+ {\DTLaddperiod}%
+ }%
+ }%
+ {}%
+ \DTLifbibfieldexists{Address}%
+ {%
+ \DTLstartsentencespace
+ \DTLbibfield{Address}%
+ \DTLcheckbibfieldendsperiod{Address}%
+ \DTLifanybibfieldexists{Month,Year}{\DTLaddcomma}{\DTLaddperiod}%
+ }%
+ {}%
+ }%
+ \DTLifbibfieldexists{Edition}%
+ {%
+ \protected@edef\@dtl@tmp{\DTLformatedition{\DTLbibfield{Edition}}}%
+ \ifDTLmidsentence
+ \@dtl@tmp
+ \else
+ \DTLstartsentencespace\expandafter\MakeUppercase\@dtl@tmp
+ \fi
+ \expandafter\DTLcheckendsperiod\expandafter{\@dtl@tmp}%
+ \DTLifanybibfieldexists{Month,Year}{\DTLaddcomma}{\DTLaddperiod}%
+ }%
+ {}%
+ \DTLformatdate
+ \DTLifanybibfieldexists{Year,Month}{\DTLaddperiod}{}%
+ \DTLifbibfieldexists{Note}%
+ {%
+ \DTLstartsentencespace
+ \DTLbibfield{Note}%
+ \DTLcheckbibfieldendsperiod{Note}%
+ \DTLaddperiod
+ }%
+ {}%
}%
% \end{macrocode}
% The format of a booklet.
@@ -21531,6 +21692,12 @@ Month,Year}{\DTLaddcomma}{\DTLaddperiod}}{}%
}
% \end{macrocode}
%\end{macro}
+%\begin{macro}{\DTLformatbooktitle}
+%\changes{2.22}{2014-06-10}{new}
+% \begin{macrocode}
+\newcommand*{\DTLformatbooktitle}[1]{\emph{#1}}
+% \end{macrocode}
+%\end{macro}
%
%\begin{macro}{\dtlbst@abbrv}
% Define `abbrv' style. This is similar to `plain' except that
@@ -21618,8 +21785,6 @@ Integrated Circuits}
\expandafter\bibitem\expandafter
[\csname dtl@biblabel@\DBIBcitekey\endcsname]{##1@\DBIBcitekey}}%
% \end{macrocode}
-% \begin{macrocode}
-% \end{macrocode}
% End of `alpha' style.
% \begin{macrocode}
}
diff --git a/Master/texmf-dist/source/latex/datatool/datatool.ins b/Master/texmf-dist/source/latex/datatool/datatool.ins
index 9a85ef0cf8c..610221b9a3e 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 1.1 2014/3/8 20:11
+% datatool.ins generated using makedtx version 1.1 2014/6/10 11:44
\input docstrip
\preamble
diff --git a/Master/texmf-dist/tex/latex/datatool/databib.sty b/Master/texmf-dist/tex/latex/datatool/databib.sty
index 8a158804268..d0c658f9926 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}[2014/03/08 v2.21 (NLCT)]
+\ProvidesPackage{databib}[2014/06/10 v2.22 (NLCT)]
\RequirePackage{datatool}
\newcommand*{\dtlbib@style}{plain}
\define@choicekey{databib.sty}{style}{plain,abbrv,alpha}{%
@@ -103,6 +103,14 @@
\csname DTLformat\DBIBentrytype\endcsname
}%
}
+\newcommand*{\DTLformatthisbibentry}[2]{%
+ \edef\DBIBname{#1}%
+ \edef\DBIBcitekey{#2}%
+ \edtlgetrowforvalue{#1}{\dtlcolumnindex{#1}{CiteKey}}{\DBIBcitekey}%
+ \dtl@gathervalues{#1}{\dtlcurrentrow}%
+ \letcs{\DBIBentrytype}{@dtl@key@EntryType}%
+ \DTLformatbibentry
+}
\newcommand*{\DTLendbibitem}{}
\newlength\dtl@widest
\newcommand*{\DTLcomputewidestbibentry}[4]{%
@@ -171,6 +179,9 @@
\newcounter{DTLbibrow}
\def\theHDTLbibrow{\theHDTLrow.bib.\arabic{DTLbibrow}}%
\newcommand*{\DTLbibfield}[1]{\csname @dtl@key@#1\endcsname}
+\newcommand*{\DTLbibfieldlet}[2]{%
+ \letcs{#1}{@dtl@key@#2}%
+}
\newcommand*{\DTLifbibfieldexists}[3]{%
\@ifundefined{@dtl@key@#1}{#3}{%
\expandafter\DTLifnull\csname @dtl@key@#1\endcsname
@@ -484,8 +495,7 @@
{\em\DTLbibfield{Series}}}{}%
}%
}%
-\edef\@dtl@tmp{\DTLbibfield{CrossRef}}%
-~\cite{\@dtl@tmp}%
+~\DTLpcite{\DTLbibfield{CrossRef}}%
}
\newcommand*{\DTLformatincollproccrossref}{%
\DTLifbibfieldexists{Editor}{%
@@ -511,10 +521,9 @@
\else
\DTLstartsentencespace
\expandafter\MakeUppercase\inname
-\fi\ {\em\DTLbibfield{BookTitle}}}{}%
+\fi\ \DTLformatbooktitle{\DTLbibfield{BookTitle}}}{}%
}}%
-\edef\@dtl@tmp{\DTLbibfield{CrossRef}}%
-~\cite{\@dtl@tmp}%
+~\DTLpcite{\DTLbibfield{CrossRef}}%
}
\newcommand*{\DTLformatinedbooktitle}{%
\DTLifbibfieldexists{BookTitle}{%
@@ -525,9 +534,9 @@
\expandafter\MakeUppercase\inname
\fi\
\DTLifbibfieldexists{Editor}{%
-\DTLformateditorlist\DTLaddcomma {\em\DTLbibfield{BookTitle}}%
+\DTLformateditorlist\DTLaddcomma \DTLformatbooktitle{\DTLbibfield{BookTitle}}%
\DTLcheckbibfieldendsperiod{BookTitle}%
-}{{\em\DTLbibfield{BookTitle}}%
+}{\DTLformatbooktitle{\DTLbibfield{BookTitle}}%
\DTLcheckbibfieldendsperiod{BookTitle}%
}}{}}
\newcommand*{\DTLformatdate}{%
@@ -570,8 +579,11 @@
\expandafter\MakeUppercase\inname
\fi
\ {\em\DTLbibfield{Journal}}}{}}%
-\edef\@dtl@tmp{\DTLbibfield{CrossRef}}%
-~\cite{\@dtl@tmp}%
+~\DTLpcite{\DTLbibfield{CrossRef}}%
+}
+\newrobustcmd*{\DTLpcite}[1]{%
+ \protected@edef\@dtl@tmp{#1}%
+ \cite{\@dtl@tmp}%
}
\newcommand*{\DTLbibfieldexists}[1]{%
\TE@throw\noexpand\dtl@testbibfieldexists{#1}%
@@ -726,6 +738,13 @@
\fi}
\newcommand*{\DTLbibitem}{\bibitem{\DBIBcitekey}}
\newcommand*{\DTLmbibitem}[1]{\bibitem{#1@\DBIBcitekey}}
+\newcommand*{\DTLcustombibitem}[3]{%
+ #1%
+ \if@filesw
+ \immediate\write\@auxout{\string\bibcite{#3}{#2}}%
+ \fi
+ \ignorespaces
+}
\newcommand*{\DTLformatauthor}[4]{%
\DTLformatforenames{#4}
\DTLformatvon{#1}%
@@ -774,125 +793,160 @@ Systems}
and Systems}
\newcommand*{\DTLtcs}{Theoretical Computer Science}
\newcommand{\dtlbst@plain}{%
-\renewenvironment{DTLthebibliography}[2][\boolean{true}]{%
-\@dtl@tmpcount=0\relax
-\@sDTLforeach[##1]{##2}{}{\advance\@dtl@tmpcount by 1\relax}%
-\begin{thebibliography}{\number\@dtl@tmpcount}%
-}{\end{thebibliography}}%
-\renewcommand*{\DTLbibitem}{\bibitem{\DBIBcitekey}}%
-\renewcommand*{\DTLmbibitem}[1]{\bibitem{##1@\DBIBcitekey}}%
-\renewcommand*{\DTLformatauthor}[4]{%
-\DTLformatforenames{##4}
-\DTLformatvon{##1}%
-\DTLformatsurname{##2}%
-\DTLformatjr{##3}}
-\renewcommand*{\DTLformateditor}[4]{%
-\DTLformatforenames{##4}
-\DTLformatvon{##1}%
-\DTLformatsurname{##2}%
-\DTLformatjr{##3}}
-\renewcommand*{\DTLformatedition}[1]{##1 \editionname}%
-\let\DTLmonthname\dtl@monthname
-\renewcommand*{\DTLacmcs}{ACM Computing Surveys}
-\renewcommand*{\DTLacta}{Acta Informatica}
-\renewcommand*{\DTLcacm}{Communications of the ACM}
-\renewcommand*{\DTLibmjrd}{IBM Journal of Research and Development}
-\renewcommand*{\DTLibmsj}{IBM Systems Journal}
-\renewcommand*{\DTLieeese}{IEEE Transactions on Software Engineering}
-\renewcommand*{\DTLieeetc}{IEEE Transactions on Computers}
-\renewcommand*{\DTLieeetcad}{IEEE Transactions on Computer-Aided Design
+ \renewenvironment{DTLthebibliography}[2][\boolean{true}]{%
+ \@dtl@tmpcount=0\relax
+ \@sDTLforeach[##1]{##2}{}{\advance\@dtl@tmpcount by 1\relax}%
+ \begin{thebibliography}{\number\@dtl@tmpcount}%
+ }{\end{thebibliography}}%
+ \renewcommand*{\DTLbibitem}{\bibitem{\DBIBcitekey}}%
+ \renewcommand*{\DTLmbibitem}[1]{\bibitem{##1@\DBIBcitekey}}%
+ \renewcommand*{\DTLformatauthor}[4]{%
+ \DTLformatforenames{##4}
+ \DTLformatvon{##1}%
+ \DTLformatsurname{##2}%
+ \DTLformatjr{##3}}
+ \renewcommand*{\DTLformateditor}[4]{%
+ \DTLformatforenames{##4}
+ \DTLformatvon{##1}%
+ \DTLformatsurname{##2}%
+ \DTLformatjr{##3}}
+ \renewcommand*{\DTLformatedition}[1]{##1 \editionname}%
+ \let\DTLmonthname\dtl@monthname
+ \renewcommand*{\DTLacmcs}{ACM Computing Surveys}
+ \renewcommand*{\DTLacta}{Acta Informatica}
+ \renewcommand*{\DTLcacm}{Communications of the ACM}
+ \renewcommand*{\DTLibmjrd}{IBM Journal of Research and Development}
+ \renewcommand*{\DTLibmsj}{IBM Systems Journal}
+ \renewcommand*{\DTLieeese}{IEEE Transactions on Software Engineering}
+ \renewcommand*{\DTLieeetc}{IEEE Transactions on Computers}
+ \renewcommand*{\DTLieeetcad}{IEEE Transactions on Computer-Aided Design
of Integrated Circuits}
-\renewcommand*{\DTLipl}{Information Processing Letters}
-\renewcommand*{\DTLjacm}{Journal of the ACM}
-\renewcommand*{\DTLjcss}{Journal of Computer and System Sciences}
-\renewcommand*{\DTLscp}{Science of Computer Programming}
-\renewcommand*{\DTLsicomp}{SIAM Journal on Computing}
-\renewcommand*{\DTLtocs}{ACM Transactions on Computer Systems}
-\renewcommand*{\DTLtods}{ACM Transactions on Database Systems}
-\renewcommand*{\DTLtog}{ACM Transactions on Graphics}
-\renewcommand*{\DTLtoms}{ACM Transactions on Mathematical Software}
-\renewcommand*{\DTLtoois}{ACM Transactions on Office Information
+ \renewcommand*{\DTLipl}{Information Processing Letters}
+ \renewcommand*{\DTLjacm}{Journal of the ACM}
+ \renewcommand*{\DTLjcss}{Journal of Computer and System Sciences}
+ \renewcommand*{\DTLscp}{Science of Computer Programming}
+ \renewcommand*{\DTLsicomp}{SIAM Journal on Computing}
+ \renewcommand*{\DTLtocs}{ACM Transactions on Computer Systems}
+ \renewcommand*{\DTLtods}{ACM Transactions on Database Systems}
+ \renewcommand*{\DTLtog}{ACM Transactions on Graphics}
+ \renewcommand*{\DTLtoms}{ACM Transactions on Mathematical Software}
+ \renewcommand*{\DTLtoois}{ACM Transactions on Office Information
Systems}
-\renewcommand*{\DTLtoplas}{ACM Transactions on Programming Languages
+ \renewcommand*{\DTLtoplas}{ACM Transactions on Programming Languages
and Systems}
-\renewcommand*{\DTLtcs}{Theoretical Computer Science}
-\renewcommand*{\DTLformatarticle}{%
-\DTLformatauthorlist
-\DTLifbibfieldexists{Author}{\DTLaddperiod}{}%
-\DTLifbibfieldexists{Title}{%
-\DTLstartsentencespace\DTLbibfield{Title}%
-\DTLcheckbibfieldendsperiod{Title}%
-\DTLaddperiod}{}%
-\DTLifbibfieldexists{CrossRef}{%
-\DTLformatarticlecrossref
-\DTLifbibfieldexists{Pages}{\DTLaddcomma}{}%
-\DTLformatpages
-\DTLaddperiod
-}{% no cross ref field
-\DTLifbibfieldexists{Journal}{\DTLstartsentencespace
-{\em\DTLbibfield{Journal}}%
-\DTLcheckbibfieldendsperiod{Journal}%
-\DTLifanybibfieldexists{Number,Volume,Pages,Month,Year}{%
-\DTLaddcomma}{\DTLaddperiod}}{}%
-\DTLformatvolnumpages
-\DTLifanybibfieldexists{Volume,Number,Pages}{%
-\DTLifanybibfieldexists{Year,Month}{\DTLaddcomma}{%
-\DTLaddperiod}%
-\DTLmidsentencefalse}{}%
-\DTLformatdate
-\DTLifanybibfieldexists{Year,Month}{\DTLaddperiod}{}%
-}%
-\DTLifbibfieldexists{Note}{\DTLstartsentencespace\DTLbibfield{Note}%
-\DTLcheckbibfieldendsperiod{Note}%
-\DTLaddperiod}{}%
-}
+ \renewcommand*{\DTLtcs}{Theoretical Computer Science}
+ \renewcommand*{\DTLformatarticle}{%
+ \DTLformatauthorlist
+ \DTLifbibfieldexists{Author}{\DTLaddperiod}{}%
+ \DTLifbibfieldexists{Title}{%
+ \DTLstartsentencespace\DTLbibfield{Title}%
+ \DTLcheckbibfieldendsperiod{Title}%
+ \DTLaddperiod}{}%
+ \DTLifbibfieldexists{CrossRef}{%
+ \DTLformatarticlecrossref
+ \DTLifbibfieldexists{Pages}{\DTLaddcomma}{}%
+ \DTLformatpages
+ \DTLaddperiod
+ }{% no cross ref field
+ \DTLifbibfieldexists{Journal}{\DTLstartsentencespace
+ {\em\DTLbibfield{Journal}}%
+ \DTLcheckbibfieldendsperiod{Journal}%
+ \DTLifanybibfieldexists{Number,Volume,Pages,Month,Year}{%
+ \DTLaddcomma}{\DTLaddperiod}}{}%
+ \DTLformatvolnumpages
+ \DTLifanybibfieldexists{Volume,Number,Pages}{%
+ \DTLifanybibfieldexists{Year,Month}{\DTLaddcomma}{%
+ \DTLaddperiod}%
+ \DTLmidsentencefalse}{}%
+ \DTLformatdate
+ \DTLifanybibfieldexists{Year,Month}{\DTLaddperiod}{}%
+ }%
+ \DTLifbibfieldexists{Note}{\DTLstartsentencespace\DTLbibfield{Note}%
+ \DTLcheckbibfieldendsperiod{Note}%
+ \DTLaddperiod}{}%
+ }
\renewcommand*{\DTLformatbook}{%
-\DTLifbibfieldexists{Author}{%
-\DTLformatauthorlist\DTLaddperiod
-}{\DTLformateditorlist\DTLifbibfieldexists{Editor}{%
-\DTLaddperiod}{}}%
-\DTLifbibfieldexists{Title}{\DTLstartsentencespace
-{\em\DTLbibfield{Title}}%
-\DTLcheckbibfieldendsperiod{Title}}{}%
-\DTLifbibfieldexists{CrossRef}{%
-\DTLifbibfieldexists{Title}{\DTLaddperiod}{}%
-\DTLformatbookcrossref
-\DTLifanybibfieldexists{Edition,Month,Year}{\DTLaddcomma
-}{\DTLaddperiod}%
-}{% no cross ref field
-\DTLifbibfieldexists{Title}{%
-\DTLifbibfieldexists{Volume}{\DTLaddcomma}{\DTLaddperiod}}{}%
-\DTLformatbvolume
-\DTLformatnumberseries
-\DTLifanybibfieldexists{Number,Series,Volume}{\DTLaddperiod}{}%
-\DTLifbibfieldexists{Publisher}{\DTLstartsentencespace
-\DTLbibfield{Publisher}%
-\DTLcheckbibfieldendsperiod{Publisher}%
-\DTLifbibfieldexists{Address}{\DTLaddcomma}{%
-\DTLifanybibfieldexists{Month,Year}{\DTLaddcomma
-}{\DTLaddperiod}%
-}}{}%
-\DTLifbibfieldexists{Address}{\DTLstartsentencespace
-\DTLbibfield{Address}%
-\DTLcheckbibfieldendsperiod{Address}%
-\DTLifanybibfieldexists{Month,Year}{\DTLaddcomma}{\DTLaddperiod}}{}%
-}%
-\DTLifbibfieldexists{Edition}{%
-\protected@edef\@dtl@tmp{\DTLformatedition{\DTLbibfield{Edition}}}%
-\ifDTLmidsentence
- \@dtl@tmp
-\else
- \DTLstartsentencespace\expandafter\MakeUppercase\@dtl@tmp
-\fi
-\expandafter\DTLcheckendsperiod\expandafter{\@dtl@tmp}%
-\DTLifanybibfieldexists{Month,Year}{\DTLaddcomma}{\DTLaddperiod}%
-}{}%
-\DTLformatdate
-\DTLifanybibfieldexists{Year,Month}{\DTLaddperiod}{}%
-\DTLifbibfieldexists{Note}{\DTLstartsentencespace
-\DTLbibfield{Note}%
-\DTLcheckbibfieldendsperiod{Note}%
-\DTLaddperiod}{}%
+ \DTLifbibfieldexists{Author}%
+ {%
+ \DTLformatauthorlist\DTLaddperiod
+ }%
+ {%
+ \DTLformateditorlist
+ \DTLifbibfieldexists{Editor}%
+ {%
+ \DTLaddperiod
+ }%
+ {}%
+ }%
+ \DTLifbibfieldexists{Title}%
+ {%
+ \DTLstartsentencespace
+ \DTLformatbooktitle{\DTLbibfield{Title}}%
+ \DTLcheckbibfieldendsperiod{Title}%
+ }%
+ {}%
+ \DTLifbibfieldexists{CrossRef}%
+ {%
+ \DTLifbibfieldexists{Title}{\DTLaddperiod}{}%
+ \DTLformatbookcrossref
+ \DTLifanybibfieldexists{Edition,Month,Year}%
+ {\DTLaddcomma}%
+ {\DTLaddperiod}%
+ }%
+ {%
+ \DTLifbibfieldexists{Title}%
+ {%
+ \DTLifbibfieldexists{Volume}{\DTLaddcomma}{\DTLaddperiod}%
+ }%
+ {}%
+ \DTLformatbvolume
+ \DTLformatnumberseries
+ \DTLifanybibfieldexists{Number,Series,Volume}{\DTLaddperiod}{}%
+ \DTLifbibfieldexists{Publisher}%
+ {%
+ \DTLstartsentencespace
+ \DTLbibfield{Publisher}%
+ \DTLcheckbibfieldendsperiod{Publisher}%
+ \DTLifbibfieldexists{Address}%
+ {\DTLaddcomma}%
+ {%
+ \DTLifanybibfieldexists{Month,Year}%
+ {\DTLaddcomma}%
+ {\DTLaddperiod}%
+ }%
+ }%
+ {}%
+ \DTLifbibfieldexists{Address}%
+ {%
+ \DTLstartsentencespace
+ \DTLbibfield{Address}%
+ \DTLcheckbibfieldendsperiod{Address}%
+ \DTLifanybibfieldexists{Month,Year}{\DTLaddcomma}{\DTLaddperiod}%
+ }%
+ {}%
+ }%
+ \DTLifbibfieldexists{Edition}%
+ {%
+ \protected@edef\@dtl@tmp{\DTLformatedition{\DTLbibfield{Edition}}}%
+ \ifDTLmidsentence
+ \@dtl@tmp
+ \else
+ \DTLstartsentencespace\expandafter\MakeUppercase\@dtl@tmp
+ \fi
+ \expandafter\DTLcheckendsperiod\expandafter{\@dtl@tmp}%
+ \DTLifanybibfieldexists{Month,Year}{\DTLaddcomma}{\DTLaddperiod}%
+ }%
+ {}%
+ \DTLformatdate
+ \DTLifanybibfieldexists{Year,Month}{\DTLaddperiod}{}%
+ \DTLifbibfieldexists{Note}%
+ {%
+ \DTLstartsentencespace
+ \DTLbibfield{Note}%
+ \DTLcheckbibfieldendsperiod{Note}%
+ \DTLaddperiod
+ }%
+ {}%
}%
\renewcommand*{\DTLformatbooklet}{%
\DTLifbibfieldexists{Author}{%
@@ -1382,6 +1436,7 @@ Month,Year}{\DTLaddcomma}{\DTLaddperiod}}{}%
\DTLifanybibfieldexists{Month,Year}{\DTLaddperiod}{}%
}%
}
+\newcommand*{\DTLformatbooktitle}[1]{\emph{#1}}
\newcommand{\dtlbst@abbrv}{%
\dtlbst@plain
\renewcommand*{\DTLformatauthor}[4]{%
diff --git a/Master/texmf-dist/tex/latex/datatool/datatool-base.sty b/Master/texmf-dist/tex/latex/datatool/datatool-base.sty
index e0e288a574e..14eb1f27055 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}[2013/09/06 v2.18 (NLCT)]
+\ProvidesPackage{datatool-base}[2014/06/10 v2.22 (NLCT)]
\RequirePackage{etoolbox}
\RequirePackage{amsmath}
\RequirePackage{xkeyval}
@@ -424,11 +424,13 @@
\def\@dtl@decimaltolocale#1.#2\relax{%
\@dtl@decimaltolocaleint{#1}%
\def\@dtl@fracpart{#2}%
- \ifx\@dtl@fracpart\@empty
+ \ifdefempty\@dtl@fracpart
+ {%
\def\@dtl@fracpart{0}%
- \else
+ }%
+ {%
\@dtl@decimaltolocalefrac#2\relax
- \fi
+ }%
}
\def\@dtl@decimaltolocaleint#1{%
\@dtl@tmpcount=0\relax
@@ -472,8 +474,26 @@
\@dtl@localeintnext#2\relax
}
\def\@dtl@decimaltolocalefrac#1.\relax{%
- \def\@dtl@fracpart{#1}%
- \@dtl@choptrailingzeroes{\@dtl@fracpart}%
+ \count@=0\relax
+ \@dtl@digitcount#1\relax
+ \ifnum\count@>9\relax
+ \@dtl@chopexcessfrac#1000000000\@nil
+ \else
+ \def\@dtl@fracpart{#1}%
+ \fi
+}
+\newcommand*{\@dtl@chopexcessfrac}[9]{%
+ \def\@dtl@fracpart{#1#2#3#4#5#6#7#8#9}%
+ \@dtl@gobbletonil
+}
+\newcommand*{\@dtl@digitcount}[1]{%
+ \ifx\relax#1\relax
+ \let\@dtl@digitcountnext\relax
+ \else
+ \advance\count@ by \@ne
+ \let\@dtl@digitcountnext\@dtl@digitcount
+ \fi
+ \@dtl@digitcountnext
}
\newcommand*{\DTLdecimaltocurrency}[2]{%
\edef\@dtl@tmpdtl{#1}%
diff --git a/Master/texmf-dist/tex/latex/datatool/datatool.sty b/Master/texmf-dist/tex/latex/datatool/datatool.sty
index 645feeed87e..79299f2620f 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}[2014/03/08 v2.21 (NLCT)]
+\ProvidesPackage{datatool}[2014/06/10 v2.22 (NLCT)]
\RequirePackage{xkeyval}
\RequirePackage{ifthen}
\RequirePackage{xfor}
@@ -3047,6 +3047,8 @@
\newread\@dtl@read
\newcount\dtl@entrycr
\define@boolkey{loaddb}[dtl]{noheader}[true]{}
+\define@boolkey{loaddb}[dtl]{autokeys}[true]{}
+\dtlautokeysfalse
\define@key{loaddb}{keys}{%
\dtl@entrycr=0\relax
\@for\@dtl@key:=#1\do
@@ -3132,11 +3134,16 @@
\loop
\expandafter\@dtl@lopoff\@dtl@lin@\to\@dtl@lin@\@dtl@key
\advance\dtl@entrycr by 1\relax
- \ifdefempty{\@dtl@key}%
- {%
- \edef\@dtl@key{\dtldefaultkey\number\dtl@entrycr}%
- }%
- {}%
+ \ifdtlautokeys
+ \csedef{@dtl@inky@\romannumeral\dtl@entrycr}%
+ {\dtldefaultkey\number\dtl@entrycr}%
+ \else
+ \ifdefempty{\@dtl@key}%
+ {%
+ \edef\@dtl@key{\dtldefaultkey\number\dtl@entrycr}%
+ }%
+ {}%
+ \fi
\expandafter\@dtl@toks\expandafter{\@dtl@key}%
\@ifundefined{@dtl@inky@\romannumeral\dtl@entrycr}%
{%