diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/changes/changes.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/changes/changes.sty | 161 |
1 files changed, 89 insertions, 72 deletions
diff --git a/Master/texmf-dist/tex/latex/changes/changes.sty b/Master/texmf-dist/tex/latex/changes/changes.sty index 27606dd148d..39f0de5b34c 100644 --- a/Master/texmf-dist/tex/latex/changes/changes.sty +++ b/Master/texmf-dist/tex/latex/changes/changes.sty @@ -7,7 +7,7 @@ %% changes.dtx (with options: `changes') %% %% changes.dtx -%% Copyright 2007-2013 Ekkart Kleinod (ekleinod@edgesoft.de) +%% Copyright 2007-2018 Ekkart Kleinod (ekleinod@edgesoft.de) %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -41,8 +41,8 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{changes} -[2015/04/27 v2.0.4 changes package] -\typeout{*** changes package 2015/04/27 v2.0.4 ***} +[2018/10/10 v2.1.0 changes package] +\typeout{*** changes package 2018/10/10 v2.1.0 ***} \RequirePackage{xkeyval} \RequirePackage{xifthen} \newboolean{Changes@optiondraft} @@ -352,7 +352,7 @@ style=list \newcounter{Changes@AuthorCount} \setcounter{Changes@AuthorCount}{0} \newcounter{Changes@Author} -\newcommand*\definechangesauthor[2][]{% +\newcommand*\definechangesauthor[2][]{ \setkeys{Changes@definechangesauthor}{#1} \stepcounter{Changes@AuthorCount} \@namedef{Changes@AuthorID\theChanges@AuthorCount}{#2} @@ -510,9 +510,14 @@ style=list } \newcommand{\added}[2][\@empty]{% \setkeys{Changes@added}{#1}% +\let\Changes@esphack\relax% \Changes@output% {\Changes@Markup@Added{#2}}% +{% +\ifthenelse{\equal{\@empty}{#2}}% +{\@bsphack \let\Changes@esphack\@esphack}% {#2}% +}% {\Changes@added@id}% {\Changes@added@remark}% {#2}% @@ -521,12 +526,14 @@ style=list {\Changes@added@decid}% {\Changes@added@decremark}% \stepcounter{Changes@AddCount\Changes@added@id}% +\Changes@esphack% } \newcommand{\deleted}[2][\@empty]{% \setkeys{Changes@deleted}{#1}% +\let\Changes@esphack\relax% \Changes@output% {\Changes@Markup@Deleted{#2}}% -{\@bsphack \expandafter \@esphack}% +{\@bsphack \let\Changes@esphack\@esphack}% {\Changes@deleted@id}% {\Changes@deleted@remark}% {#2}% @@ -535,13 +542,19 @@ style=list {\Changes@deleted@decid}% {\Changes@deleted@decremark}% \stepcounter{Changes@DeleteCount\Changes@deleted@id}% +\Changes@esphack% } \newcommand{\replaced}[3][\@empty]{% \setkeys{Changes@replaced}{#1}% -\Changes@output -{{\Changes@Markup@Added{#2}}{\Changes@Markup@Deleted{#3}}} -{#2} -{\Changes@replaced@id} +\let\Changes@esphack\relax% +\Changes@output% +{{\Changes@Markup@Added{#2}}{\Changes@Markup@Deleted{#3}}}% +{% +\ifthenelse{\equal{\@empty}{#2}}% +{\@bsphack \let\Changes@esphack\@esphack}% +{#2}% +}% +{\Changes@replaced@id}% {\Changes@replaced@remark}% {#2}% {\changesreplacename}% @@ -549,6 +562,7 @@ style=list {\Changes@replaced@decid}% {\Changes@replaced@decremark}% \stepcounter{Changes@ReplaceCount\Changes@replaced@id}% +\Changes@esphack% } \RequirePackage[breakall]{truncate} \def\changes@chopline#1;#2;#3;#4;#5;#6 \\{ @@ -564,66 +578,69 @@ style=list \newboolean{Changes@MoreLines} \newcommand{\listofchanges}[1][style=list]{% \setkeys{Changes@loc}{#1}% -\ifthenelse{\equal{\@empty}{\Changes@loc@style}} -{\def\Changes@loc@style{list}} -{ -\ifthenelse{ -\equal{\Changes@loc@style}{list}\or -\equal{\Changes@loc@style}{summary} -} -{} -{\def\Changes@loc@style{list}} -} -\ifthenelse{\equal{\Changes@loc@style}{list}} -{ -\section*{\listofchangesname} -\IfFileExists{\jobname.loc} -{}{ -\emph{\changesnoloc} -\PackageWarning{changes}{LaTeX rerun needed for list of changes} -} -\@starttoc{loc}{} -} -{ -\ifthenelse{\boolean{Changes@optiondraft}} -{ -\section*{\summaryofchangesname} -\IfFileExists{\jobname.\Changes@extension} -{ -\setboolean{Changes@MoreLines}{true} -\newread\Changes@InFile -\openin\Changes@InFile = \jobname.\Changes@extension -\whiledo{\boolean{Changes@MoreLines}}{ -\read\Changes@InFile to \Changes@Line -\ifeof\Changes@InFile -\setboolean{Changes@MoreLines}{false} -\else -\expandafter\changes@chopline\Changes@Line\\ +\ifthenelse{\boolean{Changes@optiondraft}}% +{% +\ifthenelse{\equal{\@empty}{\Changes@loc@style}}% +{\def\Changes@loc@style{list}}% +{% +\ifthenelse{% +\equal{\Changes@loc@style}{list}\or% +\equal{\Changes@loc@style}{summary}% +}% +{}% +{% +\PackageWarning{changes}{Wrong style for list of changes: '\Changes@loc@style', using 'list' instead.}% +\def\Changes@loc@style{list}% +}% +}% +\ifthenelse{\equal{\Changes@loc@style}{list}}% +{% +\section*{\listofchangesname}% +\IfFileExists{\jobname.loc}% +{}{% +\emph{\changesnoloc}% +\PackageWarning{changes}{LaTeX rerun needed for list of changes}% +}% +\@starttoc{loc}{}% +}% +{% +\section*{\summaryofchangesname}% +\IfFileExists{\jobname.\Changes@extension}% +{% +\setboolean{Changes@MoreLines}{true}% +\newread\Changes@InFile% +\openin\Changes@InFile = \jobname.\Changes@extension% +\whiledo{\boolean{Changes@MoreLines}}{% +\read\Changes@InFile to \Changes@Line% +\ifeof\Changes@InFile% +\setboolean{Changes@MoreLines}{false}% +\else% +\expandafter\changes@chopline\Changes@Line\\% \textbf{% -\ifthenelse{\boolean{Changes@colored}} -{\color{\Changes@InColor}} -{} -\ifthenelse{\equal{\Changes@InID}{\@empty}} -{\changesauthorname: \changesanonymousname} +\ifthenelse{\boolean{Changes@colored}}% +{\color{\Changes@InColor}}% +{}% +\ifthenelse{\equal{\Changes@InID}{\@empty}}% +{\changesauthorname: \changesanonymousname}% {% -\changesauthorname: \Changes@InID -\ifthenelse{\equal{\Changes@InName}{\@empty}} -{} -{ (\Changes@InName)} -} -}\\ -\parbox{\Changes@Len@summ}{\changesaddname~\dotfill~\Changes@InAdded}\\ -\parbox{\Changes@Len@summ}{\changesdeletename~\dotfill~\Changes@InDeleted}\\ -\parbox{\Changes@Len@summ}{\changesreplacename~\dotfill~\Changes@InReplaced}\\[1ex] -\fi -} -\closein\Changes@InFile +\changesauthorname: \Changes@InID% +\ifthenelse{\equal{\Changes@InName}{\@empty}}% +{}% +{ (\Changes@InName)}% +}% +}\\% +\parbox{\Changes@Len@summ}{\changesaddname~\dotfill~\Changes@InAdded}\\% +\parbox{\Changes@Len@summ}{\changesdeletename~\dotfill~\Changes@InDeleted}\\% +\parbox{\Changes@Len@summ}{\changesreplacename~\dotfill~\Changes@InReplaced}\\[1ex]% +\fi% +}% +\closein\Changes@InFile% }{% -\emph{\changesnosoc} -\PackageWarning{changes}{LaTeX rerun needed for summary of changes} -} -}{} -} +\emph{\changesnosoc}% +\PackageWarning{changes}{LaTeX rerun needed for summary of changes}% +}% +}% +}{}% } \AtEndDocument{ \newwrite\Changes@OutFile @@ -631,19 +648,19 @@ style=list \let\Changes@protect\protect \let\protect\@unexpandable@protect \setcounter{Changes@Author}{0} -\whiledo{\value{Changes@Author} < \value{Changes@AuthorCount}}{ -\stepcounter{Changes@Author} -\def\Changes@ID{\@nameuse{Changes@AuthorID\theChanges@Author}} +\whiledo{\value{Changes@Author} < \value{Changes@AuthorCount}}{% +\stepcounter{Changes@Author}% +\def\Changes@ID{\@nameuse{Changes@AuthorID\theChanges@Author}}% \immediate\write\Changes@OutFile{\Changes@ID;% \@nameuse{Changes@AuthorColor\Changes@ID};% \@nameuse{Changes@AuthorName\Changes@ID};% \the\value{Changes@AddCount\Changes@ID};% \the\value{Changes@DeleteCount\Changes@ID};% -\the\value{Changes@ReplaceCount\Changes@ID}} -} +\the\value{Changes@ReplaceCount\Changes@ID}}% +}% \immediate\closeout\Changes@OutFile \let\protect\Changes@protect } -%% Copyright 2007-2013 Ekkart Kleinod +%% Copyright 2007-2018 Ekkart Kleinod %% %% End of file `changes.sty'. |