From ced128389da6e12bc2da23bc40adfa2ee6eb7eec Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 11 Jul 2013 23:29:36 +0000 Subject: datatool (10jul13) git-svn-id: svn://tug.org/texlive/trunk@31174 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/source/latex/datatool/datatool.dtx | 389 +++++++++++++++++---- .../texmf-dist/source/latex/datatool/datatool.ins | 2 +- 2 files changed, 329 insertions(+), 62 deletions(-) (limited to 'Master/texmf-dist/source/latex/datatool') diff --git a/Master/texmf-dist/source/latex/datatool/datatool.dtx b/Master/texmf-dist/source/latex/datatool/datatool.dtx index abb64150269..ed09b5a23ac 100644 --- a/Master/texmf-dist/source/latex/datatool/datatool.dtx +++ b/Master/texmf-dist/source/latex/datatool/datatool.dtx @@ -17,7 +17,7 @@ % -author "Nicola Talbot" % -codetitle "" % datatool -% Created on 2013/6/28 15:53 +% Created on 2013/7/10 13:59 %\fi %\iffalse %<*package> @@ -64,7 +64,7 @@ datatool.dtx \doxitem{Counter}{counter}{counters} \doxitem{Option}{option}{package options} -\CheckSum{22657} +\CheckSum{22994} \RecordChanges \PageIndex @@ -77,11 +77,11 @@ datatool.dtx %\fi %\MakeShortVerb{"} % -%\title{Documented Code for datatool v2.14} +%\title{Documented Code for datatool v2.15} %\author{Nicola L. C. Talbot\\ %\url{http://www.dickimaw-books.com/}} % -%\date{2013-06-28} +%\date{2013-07-10} %\maketitle % %\pagenumbering{roman} @@ -5701,7 +5701,7 @@ datatool.dtx %\section{Package Declaration} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{datatool}[2013/06/28 v2.14 (NLCT)] +\ProvidesPackage{datatool}[2013/07/10 v2.15 (NLCT)] % \end{macrocode} % Load required packages: % \begin{macrocode} @@ -10841,7 +10841,11 @@ datatool.dtx \dtlgetentryfromrow{\DTLthisval}{\@dtl@col}{\dtlcurrentrow}% \expandafter\ifthenelse\expandafter{\@dtl@cond}% {% - \ifstrempty{#4}% +% \end{macrocode} +%\changes{2.15}{2013-07-10}{Replaced \cs{ifstrempty} with +%\cs{ifdefempty}} +% \begin{macrocode} + \ifdefempty{#4}% {% \let#4\DTLthisval }% @@ -11948,6 +11952,11 @@ datatool.dtx \string\DTLsetheader*{#1}{\@dtl@k}{\@dtl@h}}% }% % \end{macrocode} +% Store name of database in case required after database loaded: +%\changes{2.15}{2013-07-10}{added \cs{dtllastloadeddb}} +% \begin{macrocode} + \protected@write{\@dtl@write}{}{\string\def\string\dtllastloadeddb{#1}}% +% \end{macrocode} % Close output file % \begin{macrocode} \closeout\@dtl@write @@ -11994,7 +12003,7 @@ datatool.dtx }\expandafter\@gobble\string\% }% % \end{macrocode} -% Scope needed to localise definitions: +% Scope need to localise definitions: % \begin{macrocode} {% % \end{macrocode} @@ -12002,7 +12011,8 @@ datatool.dtx % writing to a file. This may break a control sequence. This is a % patch that puts the row and column markers on a new line. % (Problems may still occur if the database contains very long -% entries, but I'm not sure how to get around that.) +% entries, in which case try loading \sty{morewrites} before +% \sty{datatool}.) % \begin{macrocode} \def\db@row@elt@w{\expandafter\@gobble\string\%^^J\string\db@row@elt@w\space}% \def\db@row@elt@end@{\expandafter\@gobble\string\%^^J\string\db@row@elt@end@\space}% @@ -12030,8 +12040,9 @@ datatool.dtx % If in verbose mode, add a message to let the user know what's % happening when the file is later loaded. % \begin{macrocode} - \protected@write{\@dtl@write}{}{\string\dtl@message{Reconstructing database - ^^J`#1'}\expandafter\@gobble\string\%}% + \protected@write{\@dtl@write}{}{% + \string\dtl@message{Reconstructing database^^J`#1'}% + \expandafter\@gobble\string\%}% % \end{macrocode} % Save the contents of the token register that holds the column % information (column id, header, type). (The write is delayed, @@ -12050,7 +12061,8 @@ datatool.dtx \expandafter\protected@xdef\csname dtl@rawwritedbkeys@#1\endcsname{% \the\csname dtlkeys@#1\endcsname}% \protected@write{\@dtl@write}{}{\csname dtl@rawwritedbkeys@#1\endcsname}% - \protected@write{\@dtl@write}{}{\expandafter\@gobble\string\}\expandafter\@gobble\string\%}% + \protected@write{\@dtl@write}{}% + {\expandafter\@gobble\string\}\expandafter\@gobble\string\%}% % \end{macrocode} % Hook used by \sty{datagidx}: % \begin{macrocode} @@ -12067,17 +12079,9 @@ datatool.dtx \string\expandafter \string\global^^J\string\csname\space dtldb@#1\string\endcsname =\expandafter\@gobble\string\{\expandafter\@gobble\string\%}% -% \end{macrocode} -% Sanitize contents so we don't need to worry about fragile -% commands, but we need to substitute back the element tags so get -% it formatted correctly. -% \begin{macrocode} - \@dtl@fmt@bodytok{\csname dtldb@#1\endcsname}% - \expandafter\protected@xdef\csname dtl@rawwritedb@#1\endcsname{% - \@dtl@contents}% + \expandafter\protected@xdef\csname dtl@rawwritedb@#1\endcsname{\the\csname dtldb@#1\endcsname}% \protected@write{\@dtl@write}{}{\csname dtl@rawwritedb@#1\endcsname}% - \protected@write{\@dtl@write}{}{% - \expandafter\@gobble\string\}\expandafter\@gobble\string\%}% + \protected@write{\@dtl@write}{}{\expandafter\@gobble\string\}\expandafter\@gobble\string\%}% % \end{macrocode} % Now for the count register that keeps track of the row count. % \begin{macrocode} @@ -12118,6 +12122,11 @@ datatool.dtx % \begin{macrocode} }% % \end{macrocode} +% Store name of database in case required after database loaded: +%\changes{2.15}{2013-07-10}{added \cs{dtllastloadeddb}} +% \begin{macrocode} + \protected@write{\@dtl@write}{}{\string\def\string\dtllastloadeddb{#1}}% +% \end{macrocode} % Close output file % \begin{macrocode} \closeout\@dtl@write @@ -12130,33 +12139,146 @@ datatool.dtx % \end{macrocode} %\end{macro} % -%\begin{macro}{\@dtl@fmt@bodytok} -% Format token contents for writing to file. -%\changes{2.14}{2013-06-28}{new} +%\begin{macro}{\DTLprotectedsaverawdb} +% Like \cs{DTLloaddb} but works with fragile contents. If there's a +% problem with unwanted line breaks every 80 characters, try loading +% \sty{morewrites} before \sty{datatool}. +%\changes{2.15}{2013-07-10}{new} % \begin{macrocode} -\newcommand*{\@dtl@fmt@bodytok}[1]{% - \edef\@dtl@contents{\the#1}% - \@onelevel@sanitize\@dtl@contents - \@dtl@replace@elt{\@dtl@contents}{db@row@elt@w}% - \@dtl@replace@elt{\@dtl@contents}{db@row@elt@end@}% - \@dtl@replace@elt{\@dtl@contents}{db@row@id@w}% - \@dtl@replace@elt{\@dtl@contents}{db@row@id@end@}% - \@dtl@replace@elt{\@dtl@contents}{db@col@id@w}% - \@dtl@replace@elt{\@dtl@contents}{db@col@id@end@}% - \@dtl@replace@elt{\@dtl@contents}{db@col@elt@w}% - \@dtl@replace@elt{\@dtl@contents}{db@col@elt@end@}% -} +\newcommand*{\DTLprotectedsaverawdb}[2]{% + \DTLifdbexists{#1}% + {% % \end{macrocode} -%\end{macro} -%\begin{macro}{\@dlt@replace@elt} -% Replace element tag. -%\changes{2.14}{2013-06-28}{new} +% Open output file +% \begin{macrocode} + \openout\@dtl@write=#2\relax +% \end{macrocode} +% Add code at the start of the output file to check for the +% existence of the database: +% \begin{macrocode} + \protected@write{\@dtl@write}{}{% + \string\DTLifdbexists{#1}\expandafter\@gobble\string\%^^J% + {% + \string\PackageError{datatool}{Database `#1' ^^Jalready exists}{}% + \expandafter\@gobble\string\%^^J% + \string\aftergroup\string\endinput + }% + {% + }\expandafter\@gobble\string\% + }% +% \end{macrocode} +% Scope needed to localise definitions: +% \begin{macrocode} + {% +% \end{macrocode} +% Need to ensure the @ character can be used so \ics{makeatletter} +% is required, but localise the effect. +% \begin{macrocode} + \protected@write{\@dtl@write}{}{\string\bgroup\string\makeatletter}% +% \end{macrocode} +% If in verbose mode, add a message to let the user know what's +% happening when the file is later loaded. +% \begin{macrocode} + \protected@write{\@dtl@write}{}{\string\dtl@message{Reconstructing database + ^^J`#1'}\expandafter\@gobble\string\%}% +% \end{macrocode} +% Start writing the header token definition. +% \begin{macrocode} + \protected@write{\@dtl@write}{}{% + \string\expandafter + \string\global\string\expandafter^^J\string\newtoks + \string\csname\space dtlkeys@#1\string\endcsname}% + \protected@write{\@dtl@write}{}{% + \string\expandafter + \string\global^^J + \string\csname\space dtlkeys@#1\string\endcsname + =\expandafter\@gobble\string\{\expandafter\@gobble\string\%}% +% Store the contents of the token register that holds the column +% information (column id, header, type) and sanitize. +% \begin{macrocode} + \edef\dtl@rawwrite@keys{\the\csname dtlkeys@#1\endcsname}% + \@onelevel@sanitize\dtl@rawwrite@keys +% \end{macrocode} +% The write can get delayed, so expand after to ensure it has the +% actual contents of the database rather than +% \cs{dtl@rawwrite@keys}, which may have changed by the time the +% write occurs. Include the closing brace of the token contents. +% \begin{macrocode} + \expandafter\write\expandafter\@dtl@write\expandafter + {\dtl@rawwrite@keys\expandafter\@gobble\string\}}% +% \end{macrocode} +% Similarly for the token register that holds the database +% body. +% \begin{macrocode} + \protected@write{\@dtl@write}{}{% + \string\expandafter\string\global + \string\expandafter^^J\string\newtoks + \string\csname\space dtldb@#1\string\endcsname}% + \protected@write{\@dtl@write}{}{% + \string\expandafter + \string\global^^J\string\csname\space dtldb@#1\string\endcsname + =\expandafter\@gobble\string\{\expandafter\@gobble\string\%}% +% \end{macrocode} +% \begin{macrocode} + \edef\dtl@rawwrite@db{\the\csname dtldb@#1\endcsname}% + \@onelevel@sanitize\dtl@rawwrite@db +% \end{macrocode} +% Now write the sanitize contents. +% \begin{macrocode} + \expandafter\write\expandafter\@dtl@write\expandafter + {\dtl@rawwrite@db\expandafter\@gobble\string\}}% +% \end{macrocode} +% Now for the count register that keeps track of the row count. +% \begin{macrocode} + \protected@write{\@dtl@write}{}{\string\expandafter\string\global^^J + \string\expandafter\string\newcount + \string\csname\space dtlrows@#1\string\endcsname}% + \protected@write{\@dtl@write}{}{\string\expandafter\string\global^^J + \string\csname\space dtlrows@#1\string\endcsname + =\expandafter\number\csname dtlrows@#1\endcsname\string\relax}% +% \end{macrocode} +% Similarly for the column count. +% \begin{macrocode} + \protected@write{\@dtl@write}{}{\string\expandafter\string\global^^J + \string\expandafter\string\newcount + \string\csname\space dtlcols@#1\string\endcsname}% + \protected@write{\@dtl@write}{}{\string\expandafter\string\global^^J + \string\csname\space dtlcols@#1\string\endcsname + =\expandafter\number\csname dtlcols@#1\endcsname\string\relax}% +% \end{macrocode} +% Add key mappings +% \begin{macrocode} + \dtlforeachkey(\@dtl@key,\@dtl@col,\@dtl@type,\@dtl@head)\in{#1}\do + {% + \edef\dtl@tmp{% + \string\expandafter^^J + \string\gdef + \string\csname\space dtl@ci@#1@\@dtl@key\string\endcsname + {\csname dtl@ci@#1@\@dtl@key\endcsname}\expandafter\@gobble\string\% + }% + \expandafter\write\expandafter\@dtl@write\expandafter{\dtl@tmp}% + }% +% \end{macrocode} +% End the scope for \ics{makeatletter}: +% \begin{macrocode} + \protected@write{\@dtl@write}{}{\string\egroup}% +% \end{macrocode} +% End current scope: +% \begin{macrocode} + }% +% \end{macrocode} +% Provide a means to keep track of the last loaded file: +% \begin{macrocode} + \protected@write{\@dtl@write}{}{\string\def\string\dtllastloadeddb{#1}}% +% \end{macrocode} +% Close output file % \begin{macrocode} -\newcommand*{\@dtl@replace@elt}[2]{% - \expandafter\def\expandafter\dtl@tmp\expandafter{\csname#2\endcsname }% - \@onelevel@sanitize\dtl@tmp - \expandafter\DTLsubstituteall\expandafter#1\expandafter{\dtl@tmp}% - {\csname#2\endcsname}% + \closeout\@dtl@write + }% + {% + \PackageError{datatool}{Can't save database `#1': no such + database}{}% + }% } % \end{macrocode} %\end{macro} @@ -12885,7 +13007,7 @@ datatool.dtx % Declare package: % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{datagidx}[2013/06/28 v2.14 (NLCT)] +\ProvidesPackage{datagidx}[2013/07/10 v2.15 (NLCT)] % \end{macrocode} % Required packages: % \begin{macrocode} @@ -12897,6 +13019,10 @@ datatool.dtx \RequirePackage{multicol} \RequirePackage{textcase} % \end{macrocode} +%\changes{2.15}{2013-07-10}{added afterpage as a required package} +% \begin{macrocode} +\RequirePackage{afterpage} +% \end{macrocode} % %\section{Default Settings} % These commands need to be defined before the package options are @@ -13442,16 +13568,23 @@ datatool.dtx % \end{macrocode} %\end{macro} % +%\begin{macro}{\if@datagidx@warn} +% Provide a switch to allow warnings to be suppressed. +% \begin{macrocode} +\newif\if@datagidx@warn +\@datagidx@warntrue +% \end{macrocode} +%\end{macro} %\begin{macro}{\@datagidx@dorerun@warn} % \begin{macrocode} \newcommand*\@datagidx@dorerun@warn{} -\AtEndDocument{\@datagidx@dorerun@warn} +\AtEndDocument{\if@datagidx@warn\@datagidx@dorerun@warn\fi} % \end{macrocode} %\end{macro} %\begin{macro}{\@datagidx@dorerun@warn@sort} % \begin{macrocode} \newcommand*\@datagidx@dorerun@warn@sort{} -\AtEndDocument{\@datagidx@dorerun@warn@sort} +\AtEndDocument{\if@datagidx@warn\@datagidx@dorerun@warn@sort\fi} % \end{macrocode} %\end{macro} %\begin{macro}{\@datagidx@rerun@warn@sort} @@ -13616,6 +13749,21 @@ datatool.dtx % \end{macrocode} %\end{option} % +%\begin{option}{nowarn} +% A boolean option to suppress warnings. +%\changes{2.15}{2013-07-10}{new} +% \begin{macrocode} +\define@choicekey{datagidx.sty}{nowarn}[\val\nr]{true,false}[true]% +{% + \ifcase\nr\relax + \@datagidx@warnfalse + \or + \@datagidx@warntrue + \fi +} +% \end{macrocode} +%\end{option} +% % These options govern the general layout of the glossary/index. %\begin{option}{columns} % The number of columns used by \env{multicols} (or @@ -15782,18 +15930,18 @@ datatool.dtx % If the format is different, let the non-empty format over-ride % the empty format. % \begin{macrocode} - \ifstrequal{\datagidx@prev@format}{\datagidx@current@format} + \ifstrequal{\datagidx@prev@format}{\datagidx@current@format}% {% }% {% - \ifdefempty{\datagidx@current@format} + \ifdefempty{\datagidx@current@format}% {% % \end{macrocode} % Current format is empty, so keep previous unchanged. % \begin{macrocode} }% {% - \ifdefempty{\datagidx@prev@format} + \ifdefempty{\datagidx@prev@format}% {% % \end{macrocode} % Previous format is empty, so update. @@ -15827,17 +15975,17 @@ datatool.dtx % \end{macrocode} % A change in font format breaks the sequence. % \begin{macrocode} - \ifdefequal{\datagidx@prev@format}{\datagidx@current@format} + \ifdefequal{\datagidx@prev@format}{\datagidx@current@format}% {% % \end{macrocode} % A change in location format breaks the sequence. % \begin{macrocode} - \ifdefequal{\datagidx@prev@locationformat}{\datagidx@current@locationformat} + \ifdefequal{\datagidx@prev@locationformat}{\datagidx@current@locationformat}% {% % \end{macrocode} % A change in prefix breaks the sequence. % \begin{macrocode} - \ifdefequal{\datagidx@prev@prefix}{\datagidx@current@prefix} + \ifdefequal{\datagidx@prev@prefix}{\datagidx@current@prefix}% {% }% {% @@ -16020,9 +16168,10 @@ datatool.dtx {% % \end{macrocode} % No, they aren't so don't form a range: +%\changes{2.15}{2013-07-10}{removed spurious space} % \begin{macrocode} \DTLgidxLocationF - { + {% \datagidxlink{\datagidx@location@target}% {% \datagidx@formatlocation @@ -16150,6 +16299,47 @@ datatool.dtx % \end{macrocode} %\end{macro} % +%\begin{macro}{\loadgidx} +%\begin{definition} +%\cs{loadgidx}\oarg{options}\marg{filename}\marg{title} +%\end{definition} +%\changes{2.15}{2013-07-10}{new} +% Loads a datagidx database. +% \begin{macrocode} +\newcommand*{\loadgidx}[3][]{% +% \end{macrocode} +% Load database: +% \begin{macrocode} + \input{#2}% +% \end{macrocode} +% Update the `datagidx' database. (Assume database is already +% sorted.) +% \begin{macrocode} + \bgroup + \setkeys{newgloss}{sort={},#1}% + \expandafter\datagidx@newgidx@update\expandafter + {\dtllastloadeddb}{#3}% + \egroup +% \end{macrocode} +% Set this as the default database: +% \begin{macrocode} + \edef\datagidx@defaultdatabase{\dtllastloadeddb}% +% \end{macrocode} +% Assign labels to this database. +% \begin{macrocode} + \dtlforcolumn{\Label}{\dtllastloadeddb}{Label}% + {% + \csxdef{datagidxentry@\Label}{\dtllastloadeddb}% + }% +} +% \end{macrocode} +% May only be used in the preamble (otherwise the entries will be +% undefined when their locations are read from the aux file). +% \begin{macrocode} +\@onlypreamble\loadgidx +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\datagidx@newgidx} % The normal behaviour of \cs{newgidx} % \begin{macrocode} @@ -17454,6 +17644,17 @@ datatool.dtx {% \bgroup \datagidx@escapelocation +% \end{macrocode} +% Need to prevent \cs{@arabic} etc from being expanded just yet (or it +% will throw the page numbering out of sync for entries that occur +% by a page break). +%\changes{2.15}{2013-07-10}{fixed page breaking bug} +% \begin{macrocode} + \def\@arabic{\noexpand\@arabic}% + \def\@roman{\noexpand\@roman}% + \def\@Roman{\noexpand\@Roman}% + \def\@alph{\noexpand\@alph}% + \def\@Alph{\noexpand\@Alph}% \protected@edef\@datagidx@dowriteaux{% \noexpand\datagidx@write@usedentry{#1}% {[#2]{#3}{\@datagidx@target}}% @@ -17751,9 +17952,36 @@ datatool.dtx % Add to this run's location field. % \begin{macrocode} \protected@edef\datagidx@do@usedentry{% - \noexpand\datagidx@usedentry[CurrentLocation]{#1}{#2}% + \noexpand\datagidx@xusedentry{CurrentLocation}{#1}{#2}% }% - \datagidx@do@usedentry +% \end{macrocode} +% If the location counter is the page counter, defer until after the +% page break. +%\changes{2.15}{2013-07-10}{Added check for page counter} +% \begin{macrocode} + \expandafter\ifstrequal\expandafter{\DTLgidxCounter}{page}% + {% + \expandafter\afterpage\expandafter{\datagidx@do@usedentry}% + }% + { + \datagidx@do@usedentry + }% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\datagidx@xusedentry} +%\begin{definition} +%\cs{datagidx@usedentry}\marg{location tag}\marg{label}\marg{location} +%\end{definition} +% Like \cs{datagidx@usedentry} but expands the location. Unlike +% \cs{datagidx@usedentry} the first argument isn't optional. +% \begin{macrocode} +\newcommand*{\datagidx@xusedentry}[3]{% + \protected@edef\@datagidx@do@xusedentry{% + \noexpand\datagidx@usedentry[#1]{#2}{#3}% + }% + \@datagidx@do@xusedentry } % \end{macrocode} %\end{macro} @@ -18540,8 +18768,15 @@ datatool.dtx {% % \end{macrocode} % Current location was saved in the previous run. Has it changed? -% \begin{macrocode} - \ifcsequal{datagidx@prev@loc@\Label}{CurrentLocation}% +%\changes{2.15}{2013-07-10}{expanded and sanitize locations before +%comparing them}% +% \begin{macrocode} + \protected@edef\@prev@location{% + \csname datagidx@prev@loc@\Label\endcsname}% + \@onelevel@sanitize\@prev@location + \protected@edef\@cur@location{\CurrentLocation}% + \@onelevel@sanitize\@cur@location + \ifdefequal{\@prev@location}{\@cur@location}% {}% {% \global\let\@datagidx@dorerun@warn\@data@rerun@warn @@ -23687,6 +23922,34 @@ Try #2-#1 instead of #1-#2}% \newcommand*{\DTLplotatbegintikz}{} % \end{macrocode} %\end{macro} +% +%\begin{macro}{\dtlplothandlermark} +%\changes{2.15}{2013-07-10}{new} +% Provide a convenient access to \cs{pgfplothandlermark} that +% reverses the effect of the plot scaling. +% \begin{macrocode} +\newcommand*{\@dtlplothandlermark}[1]{% + \pgfplothandlermark + {% + \pgfmathparse{1/\dtl@scale@x}% + \pgftransformxscale{\pgfmathresult}% + \pgfmathparse{1/\dtl@scale@y}% + \pgftransformyscale{\pgfmathresult}% + #1% + }% +} +% \end{macrocode} +% Just in case a user attempts to use \cs{dtlplothandermark} outside +% \ics{DTLplot}: +% \begin{macrocode} +\newcommand*{\dtlplothandlermark}[1]{% + \PackageWarning{dataplot}{\string\dtlplothandlermark\space + found outside \string\DTLplot}% + \pgfplothandlermark{#1}% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\DTLplotatendtikz} % \cs{DTLplotatendtikz} is a hook to insert stuff at the end % of the \env{tikzpicture} environment. @@ -24186,6 +24449,7 @@ east,southeast,south,southwest,west,northwest}[northeast]{% % \end{macrocode} % Add any extra information the user requires % \begin{macrocode} + \let\dtlplothandlermark\@dtlplothandlermark \DTLplotatbegintikz % \end{macrocode} % Determine whether to put a box around the plot @@ -24696,6 +24960,7 @@ east,southeast,south,southwest,west,northwest}[northeast]{% % \end{macrocode} % End hook % \begin{macrocode} + \let\dtlplothandlermark\@dtlplothandlermark \DTLplotatendtikz \end{tikzpicture} \fi @@ -24924,6 +25189,8 @@ east,southeast,south,southwest,west,northwest}[northeast]{% %\cs{DTLaddtoplotlegend}\marg{marker}\marg{line style}\marg{label} %\end{definition} % Adds entry to legend. +%\changes{2.15}{2013-07-10}{Used \cs{xdef} instead of \cs{edef} as +%may be scoped.} % \begin{macrocode} \newcommand*{\DTLaddtoplotlegend}[3]{% \def\dtl@legendline{}% @@ -24943,10 +25210,10 @@ east,southeast,south,southwest,west,northwest}[northeast]{% \fi \expandafter\toks@\expandafter{\dtl@legendline}% \ifx\dtl@legend\@empty - \edef\dtl@legend{\noexpand\tikz\the\toks@; \noexpand& #3}% + \xdef\dtl@legend{\noexpand\tikz\the\toks@; \noexpand& #3}% \else \expandafter\@dtl@toks\expandafter{\dtl@legend}% - \edef\dtl@legend{\the\@dtl@toks\noexpand\\% + \xdef\dtl@legend{\the\@dtl@toks\noexpand\\% \noexpand\tikz\the\toks@; \noexpand& #3}% \fi } diff --git a/Master/texmf-dist/source/latex/datatool/datatool.ins b/Master/texmf-dist/source/latex/datatool/datatool.ins index fc054a86ee0..4f5658b9eb3 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 2013/6/28 15:53 +% datatool.ins generated using makedtx version 0.94b 2013/7/10 13:59 \input docstrip \preamble -- cgit v1.2.3