%%
%% This is file `changes.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% changes.dtx  (with options: `changes')
%% 
%% changes.dtx
%% Copyright 2007-2012 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
%% of this license or any later version.
%% The latest version of this license is in
%%  http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%% 
%% This work has the LPPL maintenance status `maintained'.
%% The current maintainer of this work is Ekkart Kleinod.
%% 
%% This work consists of the files
%% source/latex/changes/changes.drv
%% source/latex/changes/changes.dtx
%% source/latex/changes/changes.ins
%% source/latex/changes/examples.dtx
%% source/latex/changes/README
%% source/latex/changes/userdoc/*.tex
%% 
%% scripts/changes/delcmdchanges.bash
%% and the derived files
%% doc/latex/changes/changes.english.pdf
%% doc/latex/changes/changes.english.withcode.pdf
%% doc/latex/changes/changes.ngerman.pdf
%% 
%% doc/latex/changes/examples/changes.example.*.tex
%% doc/latex/changes/examples/changes.example.*.pdf
%% 
%% tex/latex/changes/changes.sty
%% 
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{changes}
[2012/04/25 v1.0.0 changes-Paket]
\typeout{*** changes-Paket 2012/04/25 v1.0.0 ***}
\RequirePackage{xkeyval}
\RequirePackage{xifthen}
\newboolean{Changes@optiondraft}
\setboolean{Changes@optiondraft}{true}
\DeclareOptionX{draft}{
\setboolean{Changes@optiondraft}{true}
\typeout{changes-option '\CurrentOption'}
}
\DeclareOptionX{final}{
\setboolean{Changes@optiondraft}{false}
\typeout{changes-option '\CurrentOption'}
}
\newcommand{\Changes@optionaddedmarkup}{none}
\newcommand{\Changes@optiondeletedmarkup}{sout}
\newcommand{\Changes@optionmarkup}{default}
\DeclareOptionX{markup}{
\ifthenelse{\equal{\@empty}{#1}}
{}
{
\ifthenelse{
\equal{#1}{default}\or
\equal{#1}{underlined}\or
\equal{#1}{bfit}\or
\equal{#1}{nocolor}
}
{\renewcommand{\Changes@optionmarkup}{#1}}
{\PackageWarning{changes}{markup '#1' unknown, using '\Changes@optionmarkup'}}
}
\ifthenelse{\equal{\Changes@optionmarkup}{default}}
{
\renewcommand{\Changes@optionaddedmarkup}{none}
\renewcommand{\Changes@optiondeletedmarkup}{sout}
}
{}
\ifthenelse{\equal{\Changes@optionmarkup}{underlined}}
{
\renewcommand{\Changes@optionaddedmarkup}{uline}
\renewcommand{\Changes@optiondeletedmarkup}{sout}
}
{}
\ifthenelse{\equal{\Changes@optionmarkup}{bfit}}
{
\renewcommand{\Changes@optionaddedmarkup}{bf}
\renewcommand{\Changes@optiondeletedmarkup}{it}
}
{}
\ifthenelse{\equal{\Changes@optionmarkup}{nocolor}}
{
\renewcommand{\Changes@optionaddedmarkup}{uline}
\renewcommand{\Changes@optiondeletedmarkup}{sout}
}
{}
\typeout{changes-option 'markup=\Changes@optionmarkup'}
}
\DeclareOptionX{addedmarkup}{
\ifthenelse{\equal{\@empty}{#1}}
{}
{
\ifthenelse{
\equal{#1}{none}\or
\equal{#1}{uline}\or
\equal{#1}{uuline}\or
\equal{#1}{uwave}\or
\equal{#1}{dashuline}\or
\equal{#1}{dotuline}\or
\equal{#1}{sout}\or
\equal{#1}{xout}\or
\equal{#1}{bf}\or
\equal{#1}{it}\or
\equal{#1}{sl}\or
\equal{#1}{em}
}
{\renewcommand{\Changes@optionaddedmarkup}{#1}}
{\PackageWarning{changes}{addedmarkup '#1' unknown, using '\Changes@optionaddedmarkup'}}
}
\typeout{changes-option 'addedmarkup=\Changes@optionaddedmarkup'}
}
\DeclareOptionX{deletedmarkup}{
\ifthenelse{\equal{\@empty}{#1}}
{}
{
\ifthenelse{
\equal{#1}{none}\or
\equal{#1}{uline}\or
\equal{#1}{uuline}\or
\equal{#1}{uwave}\or
\equal{#1}{dashuline}\or
\equal{#1}{dotuline}\or
\equal{#1}{sout}\or
\equal{#1}{xout}\or
\equal{#1}{bf}\or
\equal{#1}{it}\or
\equal{#1}{sl}\or
\equal{#1}{em}
}
{\renewcommand{\Changes@optiondeletedmarkup}{#1}}
{\PackageWarning{changes}{deletedmarkup '#1' unknown, using '\Changes@optiondeletedmarkup'}}
}
\typeout{changes-option 'deletedmarkup=\Changes@optiondeletedmarkup'}
}
\newcommand{\Changes@optionauthormarkup}{superscript}
\DeclareOptionX{authormarkup}{
\ifthenelse{\equal{\@empty}{#1}}
{}
{
\ifthenelse{
\equal{#1}{superscript}\or
\equal{#1}{subscript}\or
\equal{#1}{brackets}\or
\equal{#1}{footnote}
}
{\renewcommand{\Changes@optionauthormarkup}{#1}}
{\PackageWarning{changes}{authormarkup '#1' unknown, using '\Changes@optionauthormarkup'}}
}
\typeout{changes-option 'authormarkup=\Changes@optionauthormarkup'}
}
\newcommand{\Changes@optionauthormarkupposition}{right}
\DeclareOptionX{authormarkupposition}{
\ifthenelse{\equal{\@empty}{#1}}
{}
{
\ifthenelse{
\equal{#1}{right}\or
\equal{#1}{left}
}
{\renewcommand{\Changes@optionauthormarkupposition}{#1}}
{\PackageWarning{changes}{authormarkupposition '#1' unknown, using '\Changes@optionauthormarkupposition'}}
}
\typeout{changes-option 'authormarkupposition=\Changes@optionauthormarkupposition'}
}
\newcommand{\Changes@optionauthormarkuptext}{id}
\DeclareOptionX{authormarkuptext}{
\ifthenelse{\equal{\@empty}{#1}}
{}
{
\ifthenelse{
\equal{#1}{id}\or
\equal{#1}{name}
}
{\renewcommand{\Changes@optionauthormarkuptext}{#1}}
{\PackageWarning{changes}{authormarkuptext '#1' unknown, using '\Changes@optionauthormarkuptext'}}
}
\typeout{changes-option 'authormarkuptext=\Changes@optionauthormarkuptext'}
}
\DeclareOptionX{ulem}{
\typeout{ulem-option '#1', passed to package ulem}
\PassOptionsToPackage{#1}{ulem}
}
\DeclareOptionX{xcolor}{
\typeout{xcolor-option '#1', passed to package xcolor}
\PassOptionsToPackage{#1}{xcolor}
}
\DeclareOptionX*{
\PackageWarning{changes}{Unknown option '\CurrentOption'}
}
\DeclareOptionX<Changes@definechangesauthor>{name}{\def\Changes@definechangesauthor@name{#1}}
\DeclareOptionX<Changes@definechangesauthor>{color}{\def\Changes@definechangesauthor@color{#1}}
\presetkeys{Changes@definechangesauthor}{
name=\@empty,
color=black
}{}
\DeclareOptionX<Changes@added>{id}{\def\Changes@added@id{#1}}
\DeclareOptionX<Changes@added>{remark}{\def\Changes@added@remark{#1}}
\presetkeys{Changes@added}{
id=\@empty,
remark=\@empty
}{}
\DeclareOptionX<Changes@deleted>{id}{\def\Changes@deleted@id{#1}}
\DeclareOptionX<Changes@deleted>{remark}{\def\Changes@deleted@remark{#1}}
\presetkeys{Changes@deleted}{
id=\@empty,
remark=\@empty
}{}
\DeclareOptionX<Changes@replaced>{id}{\def\Changes@replaced@id{#1}}
\DeclareOptionX<Changes@replaced>{remark}{\def\Changes@replaced@remark{#1}}
\presetkeys{Changes@replaced}{
id=\@empty,
remark=\@empty
}{}
\ProcessOptionsX*\relax
\newboolean{Changes@colored}
\setboolean{Changes@colored}{true}
\ifthenelse{\equal{\Changes@optionmarkup}{nocolor}}
{\setboolean{Changes@colored}{false}}
{}
\ifthenelse{\boolean{Changes@colored}}
{
\RequirePackage{xcolor}
\RequirePackage{pdfcolmk}
}
{}
\ifthenelse{
\equal{\Changes@optionaddedmarkup}{uline}\or
\equal{\Changes@optionaddedmarkup}{uuline}\or
\equal{\Changes@optionaddedmarkup}{uwave}\or
\equal{\Changes@optionaddedmarkup}{dashuline}\or
\equal{\Changes@optionaddedmarkup}{dotuline}\or
\equal{\Changes@optionaddedmarkup}{sout}\or
\equal{\Changes@optionaddedmarkup}{xout}\or
\equal{\Changes@optiondeletedmarkup}{uline}\or
\equal{\Changes@optiondeletedmarkup}{uuline}\or
\equal{\Changes@optiondeletedmarkup}{uwave}\or
\equal{\Changes@optiondeletedmarkup}{dashuline}\or
\equal{\Changes@optiondeletedmarkup}{dotuline}\or
\equal{\Changes@optiondeletedmarkup}{sout}\or
\equal{\Changes@optiondeletedmarkup}{xout}
}
{\RequirePackage[normalem,normalbf]{ulem}}
{}
\ifthenelse{\isundefined{\addto}}
{
\def\listchangesname{Changes}
\def\changesaddname{Added}
\def\changesdeletename{Deleted}
\def\changesreplacename{Replaced}
\def\changesauthorname{Author}
\def\changesanonymousname{anonymous}
\def\changesnoloc{List of changes is available after the next \LaTeX\ run.}
}{
\addto\captionsngerman{\def\listchangesname{\"Anderungen}}
\addto\captionsngerman{\def\changesaddname{Eingef\"ugt}}
\addto\captionsngerman{\def\changesdeletename{Gel\"oscht}}
\addto\captionsngerman{\def\changesreplacename{Ersetzt}}
\addto\captionsngerman{\def\changesauthorname{Autor}}
\addto\captionsngerman{\def\changesanonymousname{Anonym}}
\addto\captionsngerman{\def\changesnoloc{\"Anderungsliste nach dem n\"achsten \LaTeX-Lauf verf\"ugbar.}}

\addto\captionsgerman{\def\listchangesname{\"Anderungen}}
\addto\captionsgerman{\def\changesaddname{Eingef\"ugt}}
\addto\captionsgerman{\def\changesdeletename{Gel\"oscht}}
\addto\captionsgerman{\def\changesreplacename{Ersetzt}}
\addto\captionsgerman{\def\changesauthorname{Autor}}
\addto\captionsgerman{\def\changesanonymousname{Anonym}}
\addto\captionsgerman{\def\changesnoloc{\"Anderungsliste nach dem n\"achsten \LaTeX-Lauf verf\"ugbar.}}

\addto\captionsenglish{\def\listchangesname{Changes}}
\addto\captionsenglish{\def\changesaddname{Added}}
\addto\captionsenglish{\def\changesdeletename{Deleted}}
\addto\captionsenglish{\def\changesreplacename{Replaced}}
\addto\captionsenglish{\def\changesauthorname{Author}}
\addto\captionsenglish{\def\changesanonymousname{anonymous}}
\addto\captionsenglish{\def\changesnoloc{List of changes is available after the next \LaTeX\ run.}}

\addto\captionsitalian{\def\listchangesname{Modifiche}}
\addto\captionsitalian{\def\changesaddname{Aggiunte}}
\addto\captionsitalian{\def\changesdeletename{Cancellazioni}}
\addto\captionsitalian{\def\changesreplacename{Sostituzioni}}
\addto\captionsitalian{\def\changesauthorname{Autore}}
\addto\captionsitalian{\def\changesanonymousname{anonimo}}
\addto\captionsitalian{\def\changesnoloc{La lista delle modifiche sar\`a disponibile alla prossima esecuzione di \LaTeX.}}
}
\newcommand{\Changes@extension}{loc}
\newcommand{\setlocextension}[1]{
\renewcommand{\Changes@extension}{#1}
}
\newcounter{Changes@AuthorCount}
\setcounter{Changes@AuthorCount}{0}
\newcounter{Changes@Author}
\newcommand*\definechangesauthor[2][]{%
\setkeys{Changes@definechangesauthor}{#1}
\stepcounter{Changes@AuthorCount}
\@namedef{Changes@AuthorID\theChanges@AuthorCount}{#2}
\expandafter
\let\csname Changes@AuthorName#2\endcsname=\Changes@definechangesauthor@name
\newcounter{Changes@AddCount#2}
\newcounter{Changes@DeleteCount#2}
\newcounter{Changes@ReplaceCount#2}
\ifthenelse{\boolean{Changes@colored}}
{
\expandafter
\let\csname Changes@AuthorColor#2\endcsname=\Changes@definechangesauthor@color
\colorlet{Changes@Color#2}{\@nameuse{Changes@AuthorColor#2}}
}
{}
}
\definechangesauthor[color=blue]{\@empty}
\newcommand{\Changes@Markup@Author}[1]{%
\ifthenelse{\equal{\Changes@optionauthormarkup}{superscript}}{\textsuperscript{#1}}{}%
\ifthenelse{\equal{\Changes@optionauthormarkup}{subscript}}{\textsubscript{#1}}{}%
\ifthenelse{\equal{\Changes@optionauthormarkup}{brackets}}{(#1)}{}%
\ifthenelse{\equal{\Changes@optionauthormarkup}{footnote}}{\footnote{#1}}{}%
}
\newcommand{\setauthormarkup}[1]{
\renewcommand{\Changes@Markup@Author}[1]{#1}
}
\ifthenelse{\isundefined{\textsubscript}}
{
\DeclareRobustCommand*\textsubscript[1]{\@textsubscript{\selectfont#1}}
\newcommand{\@textsubscript}[1]{{\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
}{}
\newcommand{\setauthormarkupposition}[1]{
\renewcommand{\Changes@optionauthormarkupposition}{#1}
}
\newcommand{\setauthormarkuptext}[1]{
\renewcommand{\Changes@optionauthormarkuptext}{#1}
}
\newcommand{\Changes@Remark}[2]{%
\footnote{%
\ifthenelse{\not\equal{#1}{\@empty}}%
{#1: }%
{}%
#2%
}%
}
\newcommand{\setremarkmarkup}[1]{%
\renewcommand{\Changes@Remark}[2]{#1}%
}
\newcommand{\Changes@Markup@Added}[1]{%
\ifthenelse{\equal{\Changes@optionaddedmarkup}{none}}{#1}{}%
\ifthenelse{\equal{\Changes@optionaddedmarkup}{uline}}{\uline{#1}}{}%
\ifthenelse{\equal{\Changes@optionaddedmarkup}{uuline}}{\uuline{#1}}{}%
\ifthenelse{\equal{\Changes@optionaddedmarkup}{uwave}}{\uwave{#1}}{}%
\ifthenelse{\equal{\Changes@optionaddedmarkup}{dashuline}}{\dashuline{#1}}{}%
\ifthenelse{\equal{\Changes@optionaddedmarkup}{dotuline}}{\dotuline{#1}}{}%
\ifthenelse{\equal{\Changes@optionaddedmarkup}{sout}}{\sout{#1}}{}%
\ifthenelse{\equal{\Changes@optionaddedmarkup}{xout}}{\xout{#1}}{}%
\ifthenelse{\equal{\Changes@optionaddedmarkup}{bf}}{\textbf{#1}}{}%
\ifthenelse{\equal{\Changes@optionaddedmarkup}{it}}{\textit{#1}}{}%
\ifthenelse{\equal{\Changes@optionaddedmarkup}{sl}}{\textsl{#1}}{}%
\ifthenelse{\equal{\Changes@optionaddedmarkup}{em}}{\emph{#1}}{}%
}
\newcommand{\setaddedmarkup}[1]{
\renewcommand{\Changes@Markup@Added}[1]{#1}
}
\newcommand{\Changes@Markup@Deleted}[1]{%
\ifthenelse{\equal{\Changes@optiondeletedmarkup}{none}}{#1}{}%
\ifthenelse{\equal{\Changes@optiondeletedmarkup}{uline}}{\uline{#1}}{}%
\ifthenelse{\equal{\Changes@optiondeletedmarkup}{uuline}}{\uuline{#1}}{}%
\ifthenelse{\equal{\Changes@optiondeletedmarkup}{uwave}}{\uwave{#1}}{}%
\ifthenelse{\equal{\Changes@optiondeletedmarkup}{dashuline}}{\dashuline{#1}}{}%
\ifthenelse{\equal{\Changes@optiondeletedmarkup}{dotuline}}{\dotuline{#1}}{}%
\ifthenelse{\equal{\Changes@optiondeletedmarkup}{sout}}{\sout{#1}}{}%
\ifthenelse{\equal{\Changes@optiondeletedmarkup}{xout}}{\xout{#1}}{}%
\ifthenelse{\equal{\Changes@optiondeletedmarkup}{bf}}{\textbf{#1}}{}%
\ifthenelse{\equal{\Changes@optiondeletedmarkup}{it}}{\textit{#1}}{}%
\ifthenelse{\equal{\Changes@optiondeletedmarkup}{sl}}{\textsl{#1}}{}%
\ifthenelse{\equal{\Changes@optiondeletedmarkup}{em}}{\emph{#1}}{}%
}
\newcommand{\setdeletedmarkup}[1]{
\renewcommand{\Changes@Markup@Deleted}[1]{#1}
}
\newboolean{Changes@WrongID}
\newcommand{\Changes@output}[4]{%
\ifthenelse{\boolean{Changes@optiondraft}}%
{%
\setboolean{Changes@WrongID}{true}%
\setcounter{Changes@Author}{0}%
\whiledo{\value{Changes@Author} < \value{Changes@AuthorCount}}{%
\stepcounter{Changes@Author}%
\ifthenelse{\equal{#3}{\@nameuse{Changes@AuthorID\theChanges@Author}}}%
{\setboolean{Changes@WrongID}{false}}%
{}%
}%
\ifthenelse{\boolean{Changes@WrongID}}%
{\PackageError{changes}%
{Undefined changes author: #3}%
{You have to define the author #3 with e.g.: \definechangesauthor{#3}}}%
{}%
\ifthenelse{\equal{\Changes@optionauthormarkuptext}{id}}%
{\@namedef{Changes@AuthorText}{#3}}%
{}%
\ifthenelse{\equal{\Changes@optionauthormarkuptext}{name}}%
{\@namedef{Changes@AuthorText}{\@nameuse{Changes@AuthorName#3}}}%
{}%
{%
\ifthenelse{\boolean{Changes@colored}}%
{\color{Changes@Color#3}}%
{}%
\ifthenelse{\equal{\Changes@optionauthormarkupposition}{left} \and \not\equal{#3}{\@empty}}%
{\Changes@Markup@Author{\@nameuse{Changes@AuthorText}}}%
{}%
{#1}%
\ifthenelse{\equal{\Changes@optionauthormarkupposition}{right} \and \not\equal{#3}{\@empty}}%
{\Changes@Markup@Author{\@nameuse{Changes@AuthorText}}}%
{}%
\ifthenelse{\not\equal{#4}{\@empty}}%
{\Changes@Remark{#3}{#4}}%
{}%
}%
}%
{#2}%
}
\newcommand{\added}[2][\@empty]{%
\setkeys{Changes@added}{#1}%
\Changes@output
{\Changes@Markup@Added{#2}}
{#2}
{\Changes@added@id}
{\Changes@added@remark}%
\stepcounter{Changes@AddCount\Changes@added@id}%
}
\newcommand{\deleted}[2][\@empty]{%
\setkeys{Changes@deleted}{#1}%
\Changes@output
{\Changes@Markup@Deleted{#2}}
{\@bsphack \expandafter \@esphack}
{\Changes@deleted@id}
{\Changes@deleted@remark}%
\stepcounter{Changes@DeleteCount\Changes@deleted@id}%
}
\newcommand{\replaced}[3][\@empty]{%
\setkeys{Changes@replaced}{#1}%
\Changes@output
{{\Changes@Markup@Added{#2}}{\Changes@Markup@Deleted{#3}}}
{#2}
{\Changes@replaced@id}
{\Changes@replaced@remark}%
\stepcounter{Changes@ReplaceCount\Changes@replaced@id}%
}
\def\changes@chopline#1;#2;#3;#4;#5;#6 \\{
\def\Changes@InID{#1}
\def\Changes@InColor{#2}
\def\Changes@InName{#3}
\def\Changes@InAdded{#4}
\def\Changes@InDeleted{#5}
\def\Changes@InReplaced{#6}
}
\newcommand{\listofchanges}{%
\ifthenelse{\boolean{Changes@optiondraft}}
{
\section*{\listchangesname}
\IfFileExists{\jobname.\Changes@extension}
{
\newboolean{Changes@MoreLines}
\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\\
\begin{tabbing}
mm\=mmmmmm\=\kill
{
\ifthenelse{\boolean{Changes@colored}}
{\color{\Changes@InColor}}
{}
\ifthenelse{\equal{\Changes@InID}{\@empty}}
{\changesauthorname: \changesanonymousname}
{
\changesauthorname: \Changes@InID
\ifthenelse{\equal{\Changes@InName}{\@empty}}
{}
{ (\Changes@InName)}
}
}\\
\>\changesaddname:\>\Changes@InAdded\\
\>\changesdeletename:\>\Changes@InDeleted\\
\>\changesreplacename:\>\Changes@InReplaced\\
\end{tabbing}
\fi
}
\closein\Changes@InFile
}{
\emph{\changesnoloc}
\PackageWarning{changes}{LaTeX rerun needed for list of changes}
}
}{}
}
\AtEndDocument{
\newwrite\Changes@OutFile
\immediate\openout\Changes@OutFile = \jobname.\Changes@extension
\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}}
\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}}
}
\immediate\closeout\Changes@OutFile
\let\protect\Changes@protect
}
%% Copyright 2007-2012 Ekkart Kleinod
%%
%% End of file `changes.sty'.