summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/datatool/datatool.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/datatool/datatool.dtx')
-rw-r--r--Master/texmf-dist/source/latex/datatool/datatool.dtx455
1 files changed, 310 insertions, 145 deletions
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}
}