summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-11-04 20:27:32 +0000
committerKarl Berry <karl@freefriends.org>2018-11-04 20:27:32 +0000
commit4859175b4924c3eaef115b2863325a3b0ced5e8d (patch)
tree566e9cc7d2514b30d8a336689d9e1d6664720cb0 /Master/texmf-dist/source/latex
parent100a6835ee4907ef9a8778ae422fa36f9791fbbd (diff)
changes (4nov18)
git-svn-id: svn://tug.org/texlive/trunk@49079 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r--Master/texmf-dist/source/latex/changes/changes.drv75
-rw-r--r--Master/texmf-dist/source/latex/changes/changes.dtx1169
-rw-r--r--Master/texmf-dist/source/latex/changes/changes.ins36
-rw-r--r--Master/texmf-dist/source/latex/changes/example-screenshot.dtx190
-rw-r--r--Master/texmf-dist/source/latex/changes/examples.dtx178
5 files changed, 1342 insertions, 306 deletions
diff --git a/Master/texmf-dist/source/latex/changes/changes.drv b/Master/texmf-dist/source/latex/changes/changes.drv
index b79184c8f45..cfd116554cc 100644
--- a/Master/texmf-dist/source/latex/changes/changes.drv
+++ b/Master/texmf-dist/source/latex/changes/changes.drv
@@ -1,21 +1,77 @@
%%%
% driver file of changes package
-\documentclass[twoside, titlepage, parskip=half, toc=flat, cleardoublepage=empty, captions=nooneline, origlongtable, english]{scrartcl}
+\documentclass[titlepage, parskip=half, toc=flat, cleardoublepage=empty, captions=nooneline, origlongtable, english]{scrartcl}
% code definition and documentation
\usepackage{doc}
% basis layout
-\usepackage[font=charter]{basis}
+\usepackage[font=charter, oneside]{basis}
+
+% listings
+\usepackage{listings}
+\lstset{
+ language=[AlLaTeX]TeX,
+ float=hbp,
+ numberstyle=\tiny\ttfamily,
+ basicstyle=\ttfamily,
+ identifierstyle=\color{DimGrey},
+ morekeywords={
+ },
+ keywordstyle=\color{LightSlateBlue},
+ commentstyle=\itshape\color{Thistle},
+ backgroundcolor=\color{PapayaWhip},
+ columns=fixed,
+ tabsize=4,
+ frame=single,
+ extendedchars=true,
+ showspaces=false,
+ showstringspaces=false,
+ numbers=none,
+ breaklines=true,
+ breakindent=3em,
+ breakautoindent=true,
+ captionpos=t,
+ xleftmargin=1em,
+ xrightmargin=1em,
+ lineskip=0pt,
+ numbersep=1em,
+ classoffset=1,
+ morekeywords={
+ added,
+ changes,
+ color,
+ comment,
+ compactsummary,
+ deleted,
+ definechangesauthor,
+ highlight,
+ id,
+ listofchanges,
+ name,
+ replaced,
+ setsummarywidth,
+ setsummarytowidth,
+ settruncatewidth,
+ style,
+ xcolor,
+ },
+ keywordstyle=\color{Chocolate},
+ moredelim=[s][\color{SlateGrey}]{<}{>},
+ classoffset=0
+}
+
+% todo notes
+\usepackage{todonotes}
% language selection
\selectlanguage{english}
% use change management ;)
-\usepackage{changes}
+\usepackage[commentmarkup=uwave]{changes}
+%\usepackage{changes}
\definechangesauthor[name={Ekkart Kleinod}, color=orange]{EK}
-\setremarkmarkup{(#2)}
% improve list layout
\usepackage{enumitem}
@@ -63,10 +119,15 @@
% \iflanguage{french}{\FRENCHtrue\ENGLISHfalse}{}
% example environment
+\newcommand{\chexample}[1]{
+ \input{userdoc/in_#1}
+
+ \lstinputlisting{userdoc/ex_#1}
+}
\newenvironment{chusage}{
\small
\begin{tabbing}
- m\=\kill
+ m\=m\=m\=\kill
\usagecall
}{%
\end{tabbing}
@@ -91,11 +152,11 @@
% document title
\ifENGLISH
\title{The \chpackage{changes}-package}
- \subtitle{Manual change markup --- version 2.1.0}
+ \subtitle{Manual change markup --- version 3.0.0}
\fi
\ifGERMAN
\title{Das \chpackage{changes}-Paket}
- \subtitle{Manuelle Änderungsmarkierung -- Version 2.1.0}
+ \subtitle{Manuelle Änderungsmarkierung -- Version 3.0.0}
\fi
\author{Ekkart Kleinod}
diff --git a/Master/texmf-dist/source/latex/changes/changes.dtx b/Master/texmf-dist/source/latex/changes/changes.dtx
index a2637ca7f16..16ceb41975d 100644
--- a/Master/texmf-dist/source/latex/changes/changes.dtx
+++ b/Master/texmf-dist/source/latex/changes/changes.dtx
@@ -1,4 +1,4 @@
-% \CheckSum{1115}
+% \CheckSum{1494}
%
% \iffalse meta-comment
%
@@ -54,6 +54,7 @@
% \changes{v2.0.3}{2014/10/15}{bugfix when using with amsart}
% \changes{v2.0.4}{2015/04/27}{unknown language does not lead to error: fallback English}
% \changes{v2.1.0}{2018/10/10}{fixed problems with final option and additional spaces/blanks, warning for wrong list style}
+% \changes{v3.0.0}{2018/11/04}{commands for commenting and highlighting text, rewriting a lot of code, remark is now comment}
% \GetFileInfo{changes.dtx}
% \RecordChanges
%
@@ -89,13 +90,13 @@
%
% \subsection{Package information and options}
%
-% Set needed \LaTeX-format to \LaTeXe{}, provide name, date, version.
+% Set needed \hologo{LaTeX}-format to \hologo{LaTeXe}, provide name, date, version.
% Type some information to the console.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{changes}
-[2018/10/10 v2.1.0 changes package]
-\typeout{*** changes package 2018/10/10 v2.1.0 ***}
+[2018/11/04 v3.0.0 changes package]
+\typeout{*** changes package 2018/11/04 v3.0.0 ***}
% \end{macrocode}
%
% Package \chpackage{xkeyval} provides options with key-value-pairs.
@@ -108,6 +109,11 @@
\RequirePackage{xifthen}
% \end{macrocode}
%
+% Package \chpackage{xstring} provides improved string test and handling methods.
+% \begin{macrocode}
+\RequirePackage{xstring}
+% \end{macrocode}
+%
% \subsubsection{Package options}
%
% Option \choption{draft}, \emph{default} is \texttt{true}.
@@ -129,9 +135,12 @@
% \end{macrocode}
%
% Declare storage for markup options, they are set by the markup option but can be changed with the more special options, therefore they have to be declared at this place.
+% Replacement markup is a combination of added and deleted markup, thus there is no special markup storage.
% \begin{macrocode}
-\newcommand{\Changes@optionaddedmarkup}{none}
+\newcommand{\Changes@optionaddedmarkup}{colored}
\newcommand{\Changes@optiondeletedmarkup}{sout}
+\newcommand{\Changes@optionhighlightmarkup}{background}
+\newcommand{\Changes@optioncommentmarkup}{todo}
% \end{macrocode}
%
% Option \choption{markup}, sets markup options accordingly.
@@ -152,14 +161,13 @@
}
\ifthenelse{\equal{\Changes@optionmarkup}{default}}
{
- \renewcommand{\Changes@optionaddedmarkup}{none}
- \renewcommand{\Changes@optiondeletedmarkup}{sout}
+ % nothing to do
}
{}
\ifthenelse{\equal{\Changes@optionmarkup}{underlined}}
{
\renewcommand{\Changes@optionaddedmarkup}{uline}
- \renewcommand{\Changes@optiondeletedmarkup}{sout}
+ \renewcommand{\Changes@optionhighlightmarkup}{uwave}
}
{}
\ifthenelse{\equal{\Changes@optionmarkup}{bfit}}
@@ -171,28 +179,26 @@
\ifthenelse{\equal{\Changes@optionmarkup}{nocolor}}
{
\renewcommand{\Changes@optionaddedmarkup}{uline}
- \renewcommand{\Changes@optiondeletedmarkup}{sout}
+ \renewcommand{\Changes@optionhighlightmarkup}{uwave}
}
{}
\typeout{changes-option 'markup=\Changes@optionmarkup'}
}
% \end{macrocode}
%
-% Option \choption{addedmarkup}, stored or set to default value ``\texttt{none}''.
+% Option \choption{addedmarkup}, stored or set to default value ``\texttt{colored}''.
% \begin{macrocode}
\DeclareOptionX{addedmarkup}{
\ifthenelse{\equal{\@empty}{#1}}
{}
{
\ifthenelse{
- \equal{#1}{none}\or
+ \equal{#1}{colored}\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
@@ -205,20 +211,20 @@
}
% \end{macrocode}
%
-% Option \choption{deletedmarkup}, stored or set to default value ``\texttt{striked}''.
+% Option \choption{deletedmarkup}, stored or set to default value ``\texttt{sout}''.
% \begin{macrocode}
\DeclareOptionX{deletedmarkup}{
\ifthenelse{\equal{\@empty}{#1}}
{}
{
\ifthenelse{
- \equal{#1}{none}\or
+ \equal{#1}{sout}\or
+ \equal{#1}{colored}\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
@@ -232,6 +238,43 @@
}
% \end{macrocode}
%
+% Option \choption{highlightmarkup}, stored or set to default value ``\texttt{background}''.
+% \begin{macrocode}
+\DeclareOptionX{highlightmarkup}{
+ \ifthenelse{\equal{\@empty}{#1}}
+ {}
+ {
+ \ifthenelse{
+ \equal{#1}{background}\or
+ \equal{#1}{uuline}\or
+ \equal{#1}{uwave}
+ }
+ {\renewcommand{\Changes@optionhighlightmarkup}{#1}}
+ {\PackageWarning{changes}{highlightmarkup '#1' unknown, using '\Changes@optionhighlightmarkup'}}
+ }
+ \typeout{changes-option 'highlightmarkup=\Changes@optionhighlightmarkup'}
+}
+% \end{macrocode}
+%
+% Option \choption{commentmarkup}, stored or set to default value ``\texttt{todo}''.
+% \begin{macrocode}
+\DeclareOptionX{commentmarkup}{
+ \ifthenelse{\equal{\@empty}{#1}}
+ {}
+ {
+ \ifthenelse{
+ \equal{#1}{todo}\or
+ \equal{#1}{margin}\or
+ \equal{#1}{footnote}\or
+ \equal{#1}{uwave}
+ }
+ {\renewcommand{\Changes@optioncommentmarkup}{#1}}
+ {\PackageWarning{changes}{commentmarkup '#1' unknown, using '\Changes@optioncommentmarkup'}}
+ }
+ \typeout{changes-option 'commentmarkup=\Changes@optioncommentmarkup'}
+}
+% \end{macrocode}
+%
% Declare storage for authormarkup option and store option value or set to default value ``\texttt{superscript}''.
% \begin{macrocode}
\newcommand{\Changes@optionauthormarkup}{superscript}
@@ -291,6 +334,22 @@
%
%
%
+% Options for package \chpackage{todonotes} are directly passed to the package.
+% \begin{macrocode}
+\DeclareOptionX{todonotes}{
+ \typeout{todonotes-option '#1', passed to package todonotes}
+ \PassOptionsToPackage{#1}{todonotes}
+}
+% \end{macrocode}
+%
+% Options for package \chpackage{truncate} are directly passed to the package.
+% \begin{macrocode}
+\DeclareOptionX{truncate}{
+ \typeout{truncate-option '#1', passed to package truncate}
+ \PassOptionsToPackage{#1}{truncate}
+}
+% \end{macrocode}
+%
% Options for package \chpackage{ulem} are directly passed to the package.
% \begin{macrocode}
\DeclareOptionX{ulem}{
@@ -330,7 +389,7 @@
% \begin{macrocode}
\presetkeys{Changes@definechangesauthor}{
name=\@empty,
- color=black
+ color=blue
}{}
% \end{macrocode}
%
@@ -340,9 +399,7 @@
% \begin{macrocode}
\DeclareOptionX<Changes@added>{id}{\def\Changes@added@id{#1}}
\DeclareOptionX<Changes@added>{remark}{\def\Changes@added@remark{#1}}
-\DeclareOptionX<Changes@added>{decision}{\def\Changes@added@dec{#1}}
-\DeclareOptionX<Changes@added>{decisionid}{\def\Changes@added@decid{#1}}
-\DeclareOptionX<Changes@added>{decisionremark}{\def\Changes@added@decrem{#1}}
+\DeclareOptionX<Changes@added>{comment}{\def\Changes@added@comment{#1}}
% \end{macrocode}
%
% Set the default values of the options.
@@ -350,9 +407,7 @@
\presetkeys{Changes@added}{
id=\@empty,
remark=\@empty,
- decision=\@empty,
- decisionid=\@empty,
- decisionremark=\@empty
+ comment=\@empty,
}{}
% \end{macrocode}
%
@@ -362,9 +417,7 @@
% \begin{macrocode}
\DeclareOptionX<Changes@deleted>{id}{\def\Changes@deleted@id{#1}}
\DeclareOptionX<Changes@deleted>{remark}{\def\Changes@deleted@remark{#1}}
-\DeclareOptionX<Changes@deleted>{decision}{\def\Changes@deleted@dec{#1}}
-\DeclareOptionX<Changes@deleted>{decisionid}{\def\Changes@deleted@decid{#1}}
-\DeclareOptionX<Changes@deleted>{decisionremark}{\def\Changes@deleted@decrem{#1}}
+\DeclareOptionX<Changes@deleted>{comment}{\def\Changes@deleted@comment{#1}}
% \end{macrocode}
%
% Set the default values of the options.
@@ -372,9 +425,7 @@
\presetkeys{Changes@deleted}{
id=\@empty,
remark=\@empty,
- decision=\@empty,
- decisionid=\@empty,
- decisionremark=\@empty
+ comment=\@empty,
}{}
% \end{macrocode}
%
@@ -384,9 +435,7 @@
% \begin{macrocode}
\DeclareOptionX<Changes@replaced>{id}{\def\Changes@replaced@id{#1}}
\DeclareOptionX<Changes@replaced>{remark}{\def\Changes@replaced@remark{#1}}
-\DeclareOptionX<Changes@replaced>{decision}{\def\Changes@replaced@dec{#1}}
-\DeclareOptionX<Changes@replaced>{decisionid}{\def\Changes@replaced@decid{#1}}
-\DeclareOptionX<Changes@replaced>{decisionremark}{\def\Changes@replaced@decrem{#1}}
+\DeclareOptionX<Changes@replaced>{comment}{\def\Changes@replaced@comment{#1}}
% \end{macrocode}
%
% Set the default values of the options.
@@ -394,9 +443,39 @@
\presetkeys{Changes@replaced}{
id=\@empty,
remark=\@empty,
- decision=\@empty,
- decisionid=\@empty,
- decisionremark=\@empty
+ comment=\@empty,
+}{}
+% \end{macrocode}
+%
+% \minisec{\chcommand{highlight}}
+%
+% Declare available options of the command, define value storage.
+% \begin{macrocode}
+\DeclareOptionX<Changes@highlight>{id}{\def\Changes@highlight@id{#1}}
+\DeclareOptionX<Changes@highlight>{remark}{\def\Changes@highlight@remark{#1}}
+\DeclareOptionX<Changes@highlight>{comment}{\def\Changes@highlight@comment{#1}}
+% \end{macrocode}
+%
+% Set the default values of the options.
+% \begin{macrocode}
+\presetkeys{Changes@highlight}{
+ id=\@empty,
+ remark=\@empty,
+ comment=\@empty,
+}{}
+% \end{macrocode}
+%
+% \minisec{\chcommand{comment}}
+%
+% Declare available options of the command, define value storage.
+% \begin{macrocode}
+\DeclareOptionX<Changes@comment>{id}{\def\Changes@comment@id{#1}}
+% \end{macrocode}
+%
+% Set the default values of the options.
+% \begin{macrocode}
+\presetkeys{Changes@comment}{
+ id=\@empty,
}{}
% \end{macrocode}
%
@@ -405,12 +484,16 @@
% Declare available options of the command, define value storage.
% \begin{macrocode}
\DeclareOptionX<Changes@loc>{style}{\def\Changes@loc@style{#1}}
+\DeclareOptionX<Changes@loc>{title}{\def\Changes@loc@title{#1}}
+\DeclareOptionX<Changes@loc>{show}{\def\Changes@loc@show{#1}}
% \end{macrocode}
%
% Set the default values of the options.
% \begin{macrocode}
\presetkeys{Changes@loc}{
- style=list
+ style=list,
+ title=\@empty,
+ show=all,
}{}
% \end{macrocode}
%
@@ -423,15 +506,20 @@
%
% \subsection{Packages}
%
+% \begin{macro}{\isColored}
+%
+% Check if text should be colored.
+% \begin{macrocode}
+\newtest{\isColored}{%
+ \not\equal{\Changes@optionmarkup}{nocolor}%
+}
+% \end{macrocode}
+% \end{macro}
+%
% Package \chpackage{xcolor} provides colored text.
% Package \chpackage{pdfcolmk} solves the problem of colored text and page breaks (has to be loaded after \chpackage{xcolor}).
% \begin{macrocode}
-\newboolean{Changes@colored}
-\setboolean{Changes@colored}{true}
-\ifthenelse{\equal{\Changes@optionmarkup}{nocolor}}
- {\setboolean{Changes@colored}{false}}
- {}
-\ifthenelse{\boolean{Changes@colored}}
+\ifthenelse{\isColored}
{
\RequirePackage{xcolor}
\RequirePackage{pdfcolmk}
@@ -447,20 +535,30 @@
\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}
+ \equal{\Changes@optiondeletedmarkup}{xout}\or
+ \equal{\Changes@optioncommentmarkup}{uwave}\or
+ \equal{\Changes@optionhighlightmarkup}{uuline}\or
+ \equal{\Changes@optionhighlightmarkup}{uwave}
}
{\RequirePackage[normalem,normalbf]{ulem}}
{}
% \end{macrocode}
%
+% Package \chpackage{todonotes} provides commands for todo notes in the margin.
+% \begin{macrocode}
+\ifthenelse{
+ \equal{\Changes@optioncommentmarkup}{todo}
+}
+ {\RequirePackage{todonotes}}
+ {}
+% \end{macrocode}
+%
% \subsection{Language dependent texts}
%
% If the \chpackage{babel} package is not loaded, the default language is English, in order to use another language, the user has to redefine the variables.
@@ -468,11 +566,15 @@
% \begin{macrocode}
\newcommand*\listofchangesname{List of changes}
\newcommand*\summaryofchangesname{Changes}
+\newcommand*\compactsummaryofchangesname{Changes (compact)}
\newcommand*\changesaddname{Added}
\newcommand*\changesdeletename{Deleted}
\newcommand*\changesreplacename{Replaced}
+\newcommand*\changeshighlightname{Highlighted}
+\newcommand*\changescommentname{Commented}
\newcommand*\changesauthorname{Author}
\newcommand*\changesanonymousname{anonymous}
+\newcommand*\changesnochanges{No changes.}
\newcommand*\changesnoloc{List of changes is available after the next \LaTeX\ run.}
\newcommand*\changesnosoc{Summary of changes is available after the next \LaTeX\ run.}
% \end{macrocode}
@@ -491,51 +593,71 @@
{
\addto\captionsngerman{\def\listofchangesname{Liste der \"Anderungen}}
\addto\captionsngerman{\def\summaryofchangesname{\"Anderungen}}
+ \addto\captionsngerman{\def\compactsummaryofchangesname{\"Anderungen (kompakt)}}
\addto\captionsngerman{\def\changesaddname{Eingef\"ugt}}
\addto\captionsngerman{\def\changesdeletename{Gel\"oscht}}
\addto\captionsngerman{\def\changesreplacename{Ersetzt}}
+ \addto\captionsngerman{\def\changeshighlightname{Hervorgehoben}}
+ \addto\captionsngerman{\def\changescommentname{Kommentiert}}
\addto\captionsngerman{\def\changesauthorname{Autor}}
\addto\captionsngerman{\def\changesanonymousname{Anonym}}
+ \addto\captionsngerman{\def\changesnochanges{Keine \"Anderungen.}}
\addto\captionsngerman{\def\changesnoloc{Liste der \"Anderungen nach dem n\"achsten \LaTeX-Lauf verf\"ugbar.}}
\addto\captionsngerman{\def\changesnosoc{\"Anderungen nach dem n\"achsten \LaTeX-Lauf verf\"ugbar.}}
\addto\captionsgerman{\def\listofchangesname{Liste der \"Anderungen}}
\addto\captionsgerman{\def\summaryofchangesname{\"Anderungen}}
+ \addto\captionsgerman{\def\compactsummaryofchangesname{\"Anderungen (kompakt)}}
\addto\captionsgerman{\def\changesaddname{Eingef\"ugt}}
\addto\captionsgerman{\def\changesdeletename{Gel\"oscht}}
\addto\captionsgerman{\def\changesreplacename{Ersetzt}}
+ \addto\captionsgerman{\def\changeshighlightname{Hervorgehoben}}
+ \addto\captionsgerman{\def\changescommentname{Kommentiert}}
\addto\captionsgerman{\def\changesauthorname{Autor}}
\addto\captionsgerman{\def\changesanonymousname{Anonym}}
+ \addto\captionsgerman{\def\changesnochanges{Keine \"Anderungen.}}
\addto\captionsgerman{\def\changesnoloc{Liste der \"Anderungen nach dem n\"achsten \LaTeX-Lauf verf\"ugbar.}}
\addto\captionsgerman{\def\changesnosoc{\"Anderungen nach dem n\"achsten \LaTeX-Lauf verf\"ugbar.}}
\addto\captionsenglish{\def\listofchangesname{List of changes}}
\addto\captionsenglish{\def\summaryofchangesname{Changes}}
+ \addto\captionsenglish{\def\compactsummaryofchangesname{Changes (compact)}}
\addto\captionsenglish{\def\changesaddname{Added}}
\addto\captionsenglish{\def\changesdeletename{Deleted}}
\addto\captionsenglish{\def\changesreplacename{Replaced}}
+ \addto\captionsenglish{\def\changeshighlightname{Highlighted}}
+ \addto\captionsenglish{\def\changescommentname{Commented}}
\addto\captionsenglish{\def\changesauthorname{Author}}
\addto\captionsenglish{\def\changesanonymousname{anonymous}}
+ \addto\captionsenglish{\def\changesnochanges{No changes.}}
\addto\captionsenglish{\def\changesnoloc{List of changes is available after the next \LaTeX\ run.}}
\addto\captionsenglish{\def\changesnosoc{Summary of changes is available after the next \LaTeX\ run.}}
\addto\captionsbritish{\def\listofchangesname{List of changes}}
\addto\captionsbritish{\def\summaryofchangesname{Changes}}
+ \addto\captionsbritish{\def\compactsummaryofchangesname{Changes (compact)}}
\addto\captionsbritish{\def\changesaddname{Added}}
\addto\captionsbritish{\def\changesdeletename{Deleted}}
\addto\captionsbritish{\def\changesreplacename{Replaced}}
+ \addto\captionsbritish{\def\changeshighlightname{Highlighted}}
+ \addto\captionsbritish{\def\changescommentname{Commented}}
\addto\captionsbritish{\def\changesauthorname{Author}}
\addto\captionsbritish{\def\changesanonymousname{anonymous}}
+ \addto\captionsbritish{\def\changesnochanges{No changes.}}
\addto\captionsbritish{\def\changesnoloc{List of changes is available after the next \LaTeX\ run.}}
\addto\captionsbritish{\def\changesnosoc{Summary of changes is available after the next \LaTeX\ run.}}
\addto\captionsitalian{\def\listofchangesname{Lista delle modifiche}}
\addto\captionsitalian{\def\summaryofchangesname{Modifiche}}
+ \addto\captionsitalian{\def\compactsummaryofchangesname{Modifiche (coerente)}} % translation by me (EK), please provide correct translation
\addto\captionsitalian{\def\changesaddname{Aggiunte}}
\addto\captionsitalian{\def\changesdeletename{Cancellazioni}}
\addto\captionsitalian{\def\changesreplacename{Sostituzioni}}
+ \addto\captionsitalian{\def\changeshighlightname{Accentare}} % translation by me (EK), please provide correct translation
+ \addto\captionsitalian{\def\changescommentname{Commenti}} % translation by me (EK), please provide correct translation
\addto\captionsitalian{\def\changesauthorname{Autore}}
\addto\captionsitalian{\def\changesanonymousname{anonimo}}
+ \addto\captionsitalian{\def\changesnochanges{Nessuna modifica.}} % translation by me (EK), please provide correct translation
\addto\captionsitalian{\def\changesnoloc{La lista delle modifiche sar\`a disponibile alla prossima esecuzione di \LaTeX.}}
\addto\captionsitalian{\def\changesnosoc{Le modifiche sar\`a disponibile alla prossima esecuzione di \LaTeX.}}
}
@@ -576,7 +698,7 @@
% \begin{macro}{\definechangesauthor}
% Define a new author.
% Mandatory argument: author's id.
-% Optional arguments (key-value): author's name (default: empty) and author's color (default: black).
+% Optional arguments (key-value): author's name (default: empty) and author's color (default: blue).
%
% Store id, name and color using named variables.
% Define counter and color per author.
@@ -602,34 +724,29 @@
%
% Store the author's definition in according variables/colors, create change counters.
% \begin{macrocode}
- \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}}
- }
- {}
+ \expandafter\let\csname Changes@AuthorName#2\endcsname=\Changes@definechangesauthor@name
+ \expandafter\let\csname Changes@AuthorColor#2\endcsname=\Changes@definechangesauthor@color
+ \newcounter{Changes@addedCount#2}
+ \newcounter{Changes@deletedCount#2}
+ \newcounter{Changes@replacedCount#2}
+ \newcounter{Changes@highlightCount#2}
+ \newcounter{Changes@commentCount#2}
}
% \end{macrocode}
% \end{macro}
%
-% Define default-author (anonymous) with empty id and blue color.
+% Define default-author (anonymous) with empty id and default color.
% \begin{macrocode}
-\definechangesauthor[color=blue]{\@empty}
+\definechangesauthor{\@empty}
% \end{macrocode}
%
%
% \subsubsection{Author markup}
%
-% \begin{macro}{\Changes@Markup@Author}
+% \begin{macro}{\Changes@Markup@author}
% Store markup for authors.
% \begin{macrocode}
-\newcommand{\Changes@Markup@Author}[1]{%
+\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)}{}%
@@ -643,24 +760,11 @@
% Set markup for authors.
% \begin{macrocode}
\newcommand{\setauthormarkup}[1]{
- \renewcommand{\Changes@Markup@Author}[1]{#1}
+ \renewcommand{\Changes@Markup@author}[1]{#1}
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\textsubscript}
-% Define the command \chcommand{textsubscript} in case the author markup \choption{subscript} is used and the command \chcommand{textsubscript} is not defined yet.
-% \chcommand{textsubscript} is the antagonist of \chcommand{textsuperscript} which is predefined in \LaTeX.
-% The code is taken from \LaTeX-FAQ 8.5.17.
-% \begin{macrocode}
-\ifthenelse{\isundefined{\textsubscript}}
- {
- \DeclareRobustCommand*\textsubscript[1]{\@textsubscript{\selectfont#1}}
- \newcommand{\@textsubscript}[1]{{\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
- }{}
-% \end{macrocode}
-% \end{macro}
-%
% \begin{macro}{\setauthormarkupposition}
% Set position for author markup text.
% \begin{macrocode}
@@ -679,31 +783,6 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\Changes@Remark}
-% Markup of remarks.
-% Default: in a footnote.
-% \begin{macrocode}
-\newcommand{\Changes@Remark}[2]{%
- \footnote{%
- \ifthenelse{\not\equal{#1}{\@empty}}%
- {#1: }%
- {}%
- #2%
- }%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\setremarkmarkup}
-% Redefining the remark markup.
-% Mandatory argument: markup definition.
-% \begin{macrocode}
-\newcommand{\setremarkmarkup}[1]{%
- \renewcommand{\Changes@Remark}[2]{#1}%
-}
-% \end{macrocode}
-% \end{macro}
-%
% \subsection{Change management commands}
%
% \subsubsection{Text markup definition}
@@ -711,18 +790,16 @@
% Replaced text is always typeset as follows: \meta{added text}\meta{deleted text}.
% Therefore no extra command for markup of replaced text is given.
%
-% \begin{macro}{\Changes@Markup@Added}
+% \begin{macro}{\Changes@Markup@added}
% Store markup for added text.
% \begin{macrocode}
-\newcommand{\Changes@Markup@Added}[1]{%
- \ifthenelse{\equal{\Changes@optionaddedmarkup}{none}}{#1}{}%
+\newcommand{\Changes@Markup@added}[1]{%
+ \ifthenelse{\equal{\Changes@optionaddedmarkup}{colored}}{#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}}{}%
@@ -735,22 +812,22 @@
% Set markup for added text.
% \begin{macrocode}
\newcommand{\setaddedmarkup}[1]{
- \renewcommand{\Changes@Markup@Added}[1]{#1}
+ \renewcommand{\Changes@Markup@added}[1]{#1}
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\Changes@Markup@Deleted}
+% \begin{macro}{\Changes@Markup@deleted}
% Store markup for deleted text.
% \begin{macrocode}
-\newcommand{\Changes@Markup@Deleted}[1]{%
- \ifthenelse{\equal{\Changes@optiondeletedmarkup}{none}}{#1}{}%
+\newcommand{\Changes@Markup@deleted}[1]{%
+ \ifthenelse{\equal{\Changes@optiondeletedmarkup}{sout}}{\sout{#1}}{}%
+ \ifthenelse{\equal{\Changes@optiondeletedmarkup}{colored}}{#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}}{}%
@@ -764,7 +841,122 @@
% Set markup for deleted text.
% \begin{macrocode}
\newcommand{\setdeletedmarkup}[1]{
- \renewcommand{\Changes@Markup@Deleted}[1]{#1}
+ \renewcommand{\Changes@Markup@deleted}[1]{#1}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Changes@Markup@highlight}
+%
+% Store markup for highlighted text.
+% \begin{macrocode}
+\newcommand{\Changes@Markup@highlight}[1]{%
+ \ifthenelse{\equal{\Changes@optionhighlightmarkup}{background}}%
+ {%
+ \ifthenelse{\isColored}%
+ {\colorbox{authorcolor!30}{#1}}%
+ {#1}%
+ }{}%
+ \ifthenelse{\equal{\Changes@optionhighlightmarkup}{uuline}}{\uuline{#1}}{}%
+ \ifthenelse{\equal{\Changes@optionhighlightmarkup}{uwave}}{\uwave{#1}}{}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\sethighlightmarkup}
+% Set markup for highlighted text.
+% \begin{macrocode}
+\newcommand{\sethighlightmarkup}[1]{
+ \renewcommand{\Changes@Markup@highlight}[1]{#1}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Changes@Markup@comment}
+% Store markup for comments.
+%
+% Parameters:
+% \begin{enumerate}
+% \item text
+% \item author's id
+% \item author's id/name output
+% \end{enumerate}
+% \begin{macrocode}
+\newcommand{\Changes@Markup@comment}[3]{%
+% \end{macrocode}
+%
+% This one is tricky, because the parameters depend on tests.
+% If I use the tests inside the \chcommand{todo} command, they break because of the use of \chpackage{ifthenelse}.
+% Thus I am implementing a slightly dirty working version, having in mind, that the code should be revisited in future releases.
+% \begin{macrocode}
+ \ifthenelse{\equal{\Changes@optioncommentmarkup}{todo}}%
+ {%
+ \ifthenelse{\isColored}%
+ {%
+ \ifthenelse{\isAnonymous{#2}}%
+ {%
+ \todo[color=authorcolor!10, bordercolor=authorcolor, linecolor=authorcolor!70, nolist]{\textbf{[\arabic{authorcommentcount}]} #1}%
+ }{%
+ \todo[color=authorcolor!10, bordercolor=authorcolor, linecolor=authorcolor!70, nolist]{\textbf{[#3~\arabic{authorcommentcount}]} #1}%
+ }%
+ }{%
+ \ifthenelse{\isAnonymous{#2}}%
+ {%
+ \todo[color=black!0, bordercolor=black, linecolor=black!70, nolist]{\textbf{[\arabic{authorcommentcount}]} #1}%
+ }{%
+ \todo[color=black!0, bordercolor=black, linecolor=black!70, nolist]{\textbf{[#3~\arabic{authorcommentcount}]:} #1}%
+ }%
+ }%
+ }{}%
+% \end{macrocode}
+%
+% Something a little more easy.
+% \begin{macrocode}
+ \ifthenelse{\equal{\Changes@optioncommentmarkup}{margin}}%
+ {%
+ \marginpar{%
+ \ifthenelse{\isColored}%
+ {\leavevmode\color{authorcolor}}%
+ {}%
+ \ifthenelse{\isAnonymous{#2}}%
+ {\textbf{[\arabic{Changes@commentCount#2}]:} }%
+ {\textbf{[#3~\arabic{Changes@commentCount#2}]:} }%
+ #1%
+ }%
+ }{}%
+ \ifthenelse{\equal{\Changes@optioncommentmarkup}{footnote}}%
+ {%
+ \footnote{%
+ \ifthenelse{\isAnonymous{#2}}%
+ {\textbf{[\arabic{Changes@commentCount#2}]:} }%
+ {\textbf{[#3~\arabic{Changes@commentCount#2}]:} }%
+ #1%
+ }%
+ }{}%
+ \ifthenelse{\equal{\Changes@optioncommentmarkup}{uwave}}%
+ {%
+ {%
+ \ifthenelse{\isColored}%
+ {\color{authorcolor}}%
+ {}%
+ \allowbreak%
+ \uwave{%
+ \ifthenelse{\isAnonymous{#2}}%
+ {\textbf{[\arabic{Changes@commentCount#2}]:} }%
+ {\textbf{[#3~\arabic{Changes@commentCount#2}]:} }%
+ #1%
+ }%
+ }%
+ }{}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setcommentmarkup}
+% Set markup for comments.
+% \begin{macrocode}
+\newcommand{\setcommentmarkup}[1]{
+ \renewcommand{\Changes@Markup@comment}[3]{#1}
}
% \end{macrocode}
% \end{macro}
@@ -772,130 +964,299 @@
%
% \subsubsection{Change management command definition}
%
-% \begin{macro}{\Changes@output}
-% Output command for the changed text.
-% This command has the following arguments:
+% \begin{macro}{\ifIsEmpty}
+%
+% Checks if text in \choption{\#1} is empty, executes \choption{\#2} if empty, \choption{\#3} otherwise.
+% This is a shortcut for the \chcommand{ifthenelse} test, it basically eases the use of the test.
+%
+% \begin{macrocode}
+\DeclareRobustCommand{\ifIsEmpty}[3]{%
+ \ifthenelse{\equal{#1}{} \or \equal{#1}{\@empty}}%
+ {#2}%
+ {#3}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\isAnonymous}
+%
+% Check if author id is empty, therefore the author is anonymous.
+% This is a new test that can be tested using \chcommand{ifthenelse}.
+%
+% This test has the following arguments:
% \begin{enumerate}
-% \item changed text (including markup)
-% \item unchanged text
% \item author's id
-% \item remark
-% \item text for list of changes
-% \item change type for list of changes
-% \item decision (accept or reject)
-% \item decision author's id
-% \item decision remark
% \end{enumerate}
-% Define boolean for author test.
+%
% \begin{macrocode}
-\newboolean{Changes@WrongID}
-\newcommand{\Changes@output}[9]{%
+\newtest{\isAnonymous}[1]{%
+ \equal{#1}{\@empty}%
+}
% \end{macrocode}
-% Output changed text if option \choption{draft} is set, otherwise output unchanged text.
+% \end{macro}
+%
+% \begin{macro}{\isAuthorEmpty}
+%
+% Check if author is anonymous or position does not equal needed position, therefore the author text is empty.
+% This is a new test that can be tested using \chcommand{ifthenelse}.
+%
+% This test could be removed if the test for empty \chcommand{Changes@output@author} would work.
+%
+% This test has the following arguments:
+% \begin{enumerate}
+% \item author's id
+% \item position
+% \end{enumerate}
+%
% \begin{macrocode}
- \ifthenelse{\boolean{Changes@optiondraft}}%
- {%
+\newtest{\isAuthorEmpty}[2]{%
+ \isAnonymous{#1} \or \not\equal{\Changes@optionauthormarkupposition}{#2}%
+}
% \end{macrocode}
-% Check if the author exists, error message otherwise.
-% I have the feeling that this code is optimizable.
+% \end{macro}
+%
+% \begin{macro}{\Changes@check@author}
+%
+% Check if author id is valid.
+% An empty id is valid by default.
+%
+% If the id is not valid, a package error is raised.
+% I have the feeling that the code is optimizable.
+%
+% This command has the following arguments:
+% \begin{enumerate}
+% \item author's id
+% \end{enumerate}
+%
% \begin{macrocode}
+\newboolean{Changes@WrongID}
+\newcommand{\Changes@check@author}[1]{%
+ \ifIsEmpty{#1}%
+ {}%
+ {%
\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}}}%
+ \ifthenelse{\equal{#1}{\@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}}}%
+ {Undefined changes author: #1}%
+ {You have to define the author #1 with e.g.: \definechangesauthor{#1}}}%
{}%
+ }%
+}
% \end{macrocode}
-% Check if the decision's author exists, error message otherwise.
+% \end{macro}
+%
+% \begin{macro}{\Changes@output@author}
+%
+% Output command for the author.
+%
+% This command has the following arguments:
+% \begin{enumerate}
+% \item author's id
+% \item position to output the author to (left or right)
+% \end{enumerate}
+%
+% \chcommand{DeclareRobustCommand} is used for not breaking the todo note definition.
% \begin{macrocode}
- \ifthenelse{\not\equal{#8}{\@empty}}%
- {%
- \setboolean{Changes@WrongID}{true}%
- \setcounter{Changes@Author}{0}%
- \whiledo{\value{Changes@Author} < \value{Changes@AuthorCount}}{%
- \stepcounter{Changes@Author}%
- \ifthenelse{\equal{#8}{\@nameuse{Changes@AuthorID\theChanges@Author}}}%
- {\setboolean{Changes@WrongID}{false}}%
- {}%
- }%
- \ifthenelse{\boolean{Changes@WrongID}}%
- {\PackageError{changes}%
- {Undefined changes author: #8}%
- {You have to define the author #8 with e.g.: \definechangesauthor{#8}}}%
- {}%
- }%
- {}%
+\DeclareRobustCommand{\Changes@output@author}[2]{%
% \end{macrocode}
-% Save author text for output.
+%
+% Output author text only if author's id is given and the position matches, otherwise output empty text.
% \begin{macrocode}
+ \ifthenelse{\isAuthorEmpty{#1}{#2}}%
+ {}%
+ {%
\ifthenelse{\equal{\Changes@optionauthormarkuptext}{id}}%
{%
- \@namedef{Changes@AuthorText}{#3}%
- \ifthenelse{\not\equal{#8}{\@empty}}%
- {\@namedef{Changes@DecAuthorText}{#8}}%
- {}%
+ #1%
}%
{}%
\ifthenelse{\equal{\Changes@optionauthormarkuptext}{name}}%
{%
- \@namedef{Changes@AuthorText}{\@nameuse{Changes@AuthorName#3}}%
- \ifthenelse{\not\equal{#8}{\@empty}}%
- {\@namedef{Changes@DecAuthorText}{\@nameuse{Changes@AuthorName#8}}}%
- {}%
+ \ifIsEmpty{\@nameuse{Changes@AuthorName#1}}%
+ {%
+ #1%
+ }{%
+ \@nameuse{Changes@AuthorName#1}%
+ }%
}%
{}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Changes@set@color}
+%
+% Sets the author's color.
+%
+% This command has the following argument:
+% \begin{enumerate}
+% \item author's id
+% \end{enumerate}
+%
+% \begin{macrocode}
+\newcommand{\Changes@set@color}[1]{%
+ \ifthenelse{\isColored}%
+ {\colorlet{authorcolor}{\@nameuse{Changes@AuthorColor#1}}}%
+ {}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Changes@set@commentcount}
+%
+% Sets the author's comment count.
+%
+% This command has the following argument:
+% \begin{enumerate}
+% \item author's id
+% \end{enumerate}
+%
+% \begin{macrocode}
+\newcounter{authorcommentcount}
+\newcommand{\Changes@set@commentcount}[1]{%
+ \setcounter{authorcommentcount}{\value{Changes@commentCount#1}}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Changes@output}
+%
+% Output command for the changed text.
+%
+% This command has the following arguments:
+% \begin{enumerate}
+% \item change id (added, deleted, replaced, highlight, comment)
+% \item author's id
+% \item final text
+% \item deleted/replaced text
+% \item comment
+% \item change type name for list of changes
+% \item text for list of changes
+% \end{enumerate}
+% \begin{macrocode}
+\newcommand{\Changes@output}[7]{%
% \end{macrocode}
-% Begin output
+%
+% Output changed text if option \choption{draft} is set, otherwise output unchanged text.
+% \begin{macrocode}
+ \ifthenelse{\boolean{Changes@optiondraft}}%
+ {%
+% \end{macrocode}
+%
+% Check if author's id is valid and set author's color.
+% \begin{macrocode}
+ \Changes@check@author{#2}%
+ \Changes@set@color{#2}%
+% \end{macrocode}
+%
+% Start output.
% \begin{macrocode}
{%
% \end{macrocode}
-% Change color, if colored text is used.
+%
+% Output for change commands: added, deleted, replaced, highlight.
+%
+% I think this code is not elegant but it gets the work done for now.
% \begin{macrocode}
- \ifthenelse{\boolean{Changes@colored}}%
- {\color{Changes@Color#3}}%
- {}%
+ \ifthenelse{%
+ \equal{#1}{added}\or%
+ \equal{#1}{deleted}\or%
+ \equal{#1}{replaced}\or%
+ \equal{#1}{highlight}%
+ }%
+ {%
% \end{macrocode}
-% Output author text if author's id is given and text should appear left of changes.
+%
+% Author text for left positioning (only without comment).
% \begin{macrocode}
- \ifthenelse{\equal{\Changes@optionauthormarkupposition}{left} \and \not\equal{#3}{\@empty}}%
- {\Changes@Markup@Author{\@nameuse{Changes@AuthorText}}}%
- {}%
+ \ifIsEmpty{#5}%
+ {%
+ \ifthenelse{\isAuthorEmpty{#2}{left}}%
+ {}%
+ {{%
+ \ifthenelse{\isColored}%
+ {\color{authorcolor}}%
+ {}%
+ \Changes@Markup@author{\Changes@output@author{#2}{left}}%
+ }}%
+ }{}%
% \end{macrocode}
-% Output changed text.
+%
+% Changed/highlighted text.
% \begin{macrocode}
- {#1}%
+ {%
+ \ifthenelse{\not\equal{#1}{highlight}}%
+ {%
+ \ifthenelse{\isColored}%
+ {\color{authorcolor}}%
+ {}%
+ }{}%
+ \ifthenelse{\equal{#1}{added}}{\Changes@Markup@added{#3}}{}%
+ \ifthenelse{\equal{#1}{deleted}}{\Changes@Markup@deleted{#4}}{}%
+ \ifthenelse{\equal{#1}{replaced}}{{\Changes@Markup@added{#3}}\allowbreak\Changes@Markup@deleted{#4}}{}%
+ \ifthenelse{\equal{#1}{highlight}}{\Changes@Markup@highlight{#3}}{}%
+ }%
% \end{macrocode}
-% Output author text if author's id is given and text should appear right of changes.
+%
+% Author text for right positioning (only without comment).
% \begin{macrocode}
- \ifthenelse{\equal{\Changes@optionauthormarkupposition}{right} \and \not\equal{#3}{\@empty}}%
- {\Changes@Markup@Author{\@nameuse{Changes@AuthorText}}}%
- {}%
+ \ifIsEmpty{#5}%
+ {%
+ \ifthenelse{\isAuthorEmpty{#2}{right}}%
+ {}%
+ {{%
+ \ifthenelse{\isColored}%
+ {\color{authorcolor}}%
+ {}%
+ \Changes@Markup@author{\Changes@output@author{#2}{right}}%
+ }}%
+ }{}%
% \end{macrocode}
-% Output remark if a remark is given.
+%
+% Update counters.
+% \begin{macrocode}
+ \stepcounter{Changes@#1Count#2}%
+ }{}%
+% \end{macrocode}
+%
+% Comments.
% \begin{macrocode}
- \ifthenelse{\not\equal{#4}{\@empty}}%
- {\Changes@Remark{#3}{#4}}%
+ \ifIsEmpty{#5}%
{}%
+ {%
+ \stepcounter{Changes@commentCount#2}%
+ \Changes@set@commentcount{#2}%
+ \Changes@Markup@comment%
+ {#5}%
+ {#2}%
+ {\Changes@output@author{#2}{left}\Changes@output@author{#2}{right}}%
+ }%
}%
% \end{macrocode}
% Store line for list of changes.
% \begin{macrocode}
- \ifthenelse{\equal{\@empty}{#3}}%
+ \ifIsEmpty{#2}%
{\def\Changes@locid{}}%
- {\def\Changes@locid{~(#3)}}%
- \addcontentsline{loc}{subsection}{#6\Changes@locid: \truncate{.3\textwidth}{#5}}%
+ {\def\Changes@locid{~(#2)}}%
+ \addtocontents{loc}{\protect\ChangesListline{#1}{#6\Changes@locid}{#7}{\thepage}}%
}%
% \end{macrocode}
+%
% Output unchanged text (option \choption{final} was set).
% \begin{macrocode}
- {#2}%
+ {%
+ \ifIsEmpty{#3}%
+ {\@bsphack\@esphack}%
+ {#3}%
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -904,30 +1265,39 @@
% The command formats text as new text.
%
% Mandatory argument: added text.
-% Optional argument (key-value): author's id, remark, decision, decision author's id, decision remark
+% Optional argument (key-value): author's id, comment, remark (deprecated)
% \begin{macrocode}
\newcommand{\added}[2][\@empty]{%
% \end{macrocode}
% Call \emph{setkeys} in order to evaluate the key-value-options and fill the value storage.
% \begin{macrocode}
\setkeys{Changes@added}{#1}%
- \let\Changes@esphack\relax%
- \Changes@output%
- {\Changes@Markup@Added{#2}}%
+% \end{macrocode}
+% Check for use of deprecated \choption{remark} option.
+% \begin{macrocode}
+ \ifIsEmpty{\Changes@added@remark}%
+ {}%
{%
- \ifthenelse{\equal{\@empty}{#2}}%
- {\@bsphack \let\Changes@esphack\@esphack}%
- {#2}%
+ \ifIsEmpty{\Changes@added@comment}%
+ {%
+ \PackageWarning{changes}{You used the deprecated option 'remark' in your markup, please use 'comment' instead.}%
+ \let\Changes@added@comment\Changes@added@remark%
+ }%
+ {%
+ \PackageWarning{changes}{You used both options 'comment' and the deprecated 'remark' in your markup, please use 'comment' only, the content of 'remark' will be ignored.}%
+ }%
}%
+% \end{macrocode}
+% End of check for use of deprecated \choption{remark} option.
+% \begin{macrocode}
+ \Changes@output%
+ {added}%
{\Changes@added@id}%
- {\Changes@added@remark}%
{#2}%
+ {}%
+ {\Changes@added@comment}%
{\changesaddname}%
- {\Changes@added@dec}%
- {\Changes@added@decid}%
- {\Changes@added@decremark}%
- \stepcounter{Changes@AddCount\Changes@added@id}%
- \Changes@esphack%
+ {#2}%
}
% \end{macrocode}
% \end{macro}
@@ -940,26 +1310,39 @@
% Before that, there was a slightly erroneous version from \texttt{de.comp.text.tex} (issue \#2).
%
% Mandatory argument: deleted text.
-% Optional argument (key-value): author's id, remark, decision, decision author's id, decision remark
+% Optional argument (key-value): author's id, comment, remark (deprecated)
% \begin{macrocode}
\newcommand{\deleted}[2][\@empty]{%
% \end{macrocode}
% Call \emph{setkeys} in order to evaluate the key-value-options and fill the value storage.
% \begin{macrocode}
\setkeys{Changes@deleted}{#1}%
- \let\Changes@esphack\relax%
+% \end{macrocode}
+% Check for use of deprecated \choption{remark} option.
+% \begin{macrocode}
+ \ifIsEmpty{\Changes@deleted@remark}%
+ {}%
+ {%
+ \ifIsEmpty{\Changes@deleted@comment}%
+ {%
+ \PackageWarning{changes}{You used the deprecated option 'remark' in your markup, please use 'comment' instead.}%
+ \let\Changes@deleted@comment\Changes@deleted@remark%
+ }%
+ {%
+ \PackageWarning{changes}{You used both options 'comment' and the deprecated 'remark' in your markup, please use 'comment' only, the content of 'remark' will be ignored.}%
+ }%
+ }%
+% \end{macrocode}
+% End of check for use of deprecated \choption{remark} option.
+% \begin{macrocode}
\Changes@output%
- {\Changes@Markup@Deleted{#2}}%
- {\@bsphack \let\Changes@esphack\@esphack}%
+ {deleted}%
{\Changes@deleted@id}%
- {\Changes@deleted@remark}%
+ {}%
{#2}%
+ {\Changes@deleted@comment}%
{\changesdeletename}%
- {\Changes@deleted@dec}%
- {\Changes@deleted@decid}%
- {\Changes@deleted@decremark}%
- \stepcounter{Changes@DeleteCount\Changes@deleted@id}%
- \Changes@esphack%
+ {#2}%
}
% \end{macrocode}
% \end{macro}
@@ -968,30 +1351,105 @@
% The command formats text as replaced text.
%
% Mandatory arguments: new text and old text.
-% Optional argument (key-value): author's id, remark, decision, decision author's id, decision remark
+% Optional argument (key-value): author's id, comment, remark (deprecated)
% \begin{macrocode}
\newcommand{\replaced}[3][\@empty]{%
% \end{macrocode}
% Call \emph{setkeys} in order to evaluate the key-value-options and fill the value storage.
% \begin{macrocode}
\setkeys{Changes@replaced}{#1}%
- \let\Changes@esphack\relax%
- \Changes@output%
- {{\Changes@Markup@Added{#2}}{\Changes@Markup@Deleted{#3}}}%
+% \end{macrocode}
+% Check for use of deprecated \choption{remark} option.
+% \begin{macrocode}
+ \ifIsEmpty{\Changes@replaced@remark}%
+ {}%
{%
- \ifthenelse{\equal{\@empty}{#2}}%
- {\@bsphack \let\Changes@esphack\@esphack}%
- {#2}%
+ \ifIsEmpty{\Changes@replaced@comment}%
+ {%
+ \PackageWarning{changes}{You used the deprecated option 'remark' in your markup, please use 'comment' instead.}%
+ \let\Changes@replaced@comment\Changes@replaced@remark%
+ }%
+ {%
+ \PackageWarning{changes}{You used both options 'comment' and the deprecated 'remark' in your markup, please use 'comment' only, the content of 'remark' will be ignored.}%
+ }%
}%
+% \end{macrocode}
+% End of check for use of deprecated \choption{remark} option.
+% \begin{macrocode}
+ \Changes@output%
+ {replaced}%
{\Changes@replaced@id}%
- {\Changes@replaced@remark}%
{#2}%
+ {#3}%
+ {\Changes@replaced@comment}%
{\changesreplacename}%
- {\Changes@replaced@dec}%
- {\Changes@replaced@decid}%
- {\Changes@replaced@decremark}%
- \stepcounter{Changes@ReplaceCount\Changes@replaced@id}%
- \Changes@esphack%
+ {#2}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\highlight}
+% The command formats text as highlighted text.
+%
+% Mandatory argument: highlighted text.
+% Optional argument (key-value): author's id, comment, remark (deprecated)
+% \begin{macrocode}
+\newcommand{\highlight}[2][\@empty]{%
+% \end{macrocode}
+%
+% Call \emph{setkeys} in order to evaluate the key-value-options and fill the value storage.
+% \begin{macrocode}
+ \setkeys{Changes@highlight}{#1}%
+% \end{macrocode}
+% Check for use of deprecated \choption{remark} option.
+% \begin{macrocode}
+ \ifIsEmpty{\Changes@highlight@remark}%
+ {}%
+ {%
+ \ifIsEmpty{\Changes@highlight@comment}%
+ {%
+ \PackageWarning{changes}{You used the deprecated option 'remark' in your markup, please use 'comment' instead.}%
+ \let\Changes@highlight@comment\Changes@highlight@remark%
+ }%
+ {%
+ \PackageWarning{changes}{You used both options 'comment' and the deprecated 'remark' in your markup, please use 'comment' only, the content of 'remark' will be ignored.}%
+ }%
+ }%
+% \end{macrocode}
+% End of check for use of deprecated \choption{remark} option.
+% \begin{macrocode}
+ \Changes@output%
+ {highlight}%
+ {\Changes@highlight@id}%
+ {#2}%
+ {}%
+ {\Changes@highlight@comment}%
+ {\changeshighlightname}%
+ {#2}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\comment}
+% The command formats text as comment.
+%
+% Mandatory argument: comment text.
+% Optional argument (key-value): author's id
+% \begin{macrocode}
+\newcommand{\comment}[2][\@empty]{%
+% \end{macrocode}
+%
+% Call \emph{setkeys} in order to evaluate the key-value-options and fill the value storage.
+% \begin{macrocode}
+ \setkeys{Changes@comment}{#1}%
+ \Changes@output%
+ {comment}%
+ {\Changes@comment@id}%
+ {}%
+ {}%
+ {#2}%
+ {\changescommentname}%
+ {#2}%
}
% \end{macrocode}
% \end{macro}
@@ -999,49 +1457,157 @@
% \subsection{List of changes}
%
% The list of changes truncates text, therefore the \chpackage{truncate} package is used.
+% (Using fit and redefining the marker: suggestion and code by Frank Mittelbach)
% \begin{macrocode}
-\RequirePackage[breakall]{truncate}
+\RequirePackage[breakall,fit]{truncate}
+\renewcommand\TruncateMarker{ [\dots\negthinspace]\ }
% \end{macrocode}
%
% \begin{macro}{\changes@chopline}
% Auxiliary command for reading the content of the loc-files.
% The content is read line by line.
-% One line is parsed with this macro, the order of entries is: id, color, name, added, deleted, replaced.
+% One line is parsed with this macro, the order of entries is: id, color, name, added, deleted, replaced, highlighted, comment.
% The contents have to be separated by a semicolon.
% \begin{macrocode}
-\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}
+\def\changes@chopline#1;#2;#3;#4;#5;#6;#7;#8 \\{%
+ \def\Changes@InID{#1}%
+ \def\Changes@InColor{#2}%
+ \def\Changes@InName{#3}%
+ \def\Changes@InAdded{#4}%
+ \def\Changes@InDeleted{#5}%
+ \def\Changes@InReplaced{#6}%
+ \def\Changes@InHighlight{#7}%
+ \def\Changes@InComment{#8}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ChangesListline}
+%
+% Output of a list line.
+%
+% This command has the following arguments:
+% \begin{enumerate}
+% \item change type (added, ...)
+% \item text
+% \item page
+% \end{enumerate}
+%
+% \begin{macrocode}
+\newcommand{\ChangesListline}[4]{%
+ \IfSubStr{\Changes@loc@show}{#1}{%
+ \@dottedtocline{1}{0px}{2em}{#2: \truncate{\Changes@truncate@width}{#3}}{#4}%
+ }{}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Changes@truncate@width}
+%
+% Length for the width of the truncation.
+%
+% Default: two third of the text width
+%
+% \begin{macrocode}
+\newlength{\Changes@truncate@width}
+\setlength{\Changes@truncate@width}{.6\textwidth}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\settruncatewidth}
+%
+% Set the width of the truncation.
+% Argument: new width.
+% \begin{macrocode}
+\newcommand{\settruncatewidth}[1]{
+ \setlength{\Changes@truncate@width}{#1}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Changes@summary@width}
+%
+% Length for the width of the change summary.
+%
+% Default: one third of the text width
+%
+% \begin{macrocode}
+\newlength{\Changes@summary@width}
+\setlength{\Changes@summary@width}{.3\textwidth}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setsummarywidth}
+%
+% Set the width of the change summary.
+% Argument: new width.
+% \begin{macrocode}
+\newcommand{\setsummarywidth}[1]{
+ \setlength{\Changes@summary@width}{#1}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\setsummarytowidth}
+%
+% Set the width of the change summary to width of given text.
+% Argument: text.
+% \begin{macrocode}
+\newcommand{\setsummarytowidth}[1]{
+ \settowidth{\Changes@summary@width}{#1}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Changes@summaryline}
+%
+% Auxiliary command for output of a summary line.
+%
+% This command has the following arguments:
+% \begin{enumerate}
+% \item change type (added, ...)
+% \item number of items
+% \item name of items
+% \item line delimiter
+% \end{enumerate}
+%
+% \begin{macrocode}
+\newcommand{\Changes@summaryline}[4]{%
+ \IfSubStr{\Changes@loc@show}{#1}{%
+ \ifthenelse{\not\equal{\Changes@loc@style}{compactsummary} \or #2 > 0}%
+ {%
+ \parbox{\Changes@summary@width}{#3~\dotfill~#2}#4%
+ }{}%
+ }{}%
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\listofchanges}
-% This command outputs the list of changes.
%
-% Two styles are available: \choption{list} (default) and \choption{summary}.
-% \choption{list} prints the list of changes lika a list of figures.
-% \choption{summary} prints a summary of changes separated by authors.
+% This command outputs the list of changes.
+% Options: \choption{style} and \choption{title}.
+%
+% The following styles are available:
+% \begin{description}
+% \item [\choption{list}] prints the list of changes like a list of figures
+% \item [\choption{summary}] prints the number of changes grouped by author
+% \item [\choption{compactsummary}] same as \choption{summary} but entries with count 0 are omitted
+% \end{description}
%
-% For the list, the values are read from the auxiliary file.
+% For the list, the values are read from the auxiliary file.
%
-% For the summary, the values are read from the loc-file, if it exists.
-% If no loc-file exists, an according message is generated.
+% For the summary, the values are read from the loc-file, if it exists.
+% If no loc-file exists, an according message is generated.
%
% Some definitions that have to reside outside the command in order to use the command multiple times.
-% In further versions: compute length of bounding box für summary.
% \begin{macrocode}
-\newlength{\Changes@Len@summ}
-\setlength{\Changes@Len@summ}{.2\textwidth}
\newboolean{Changes@MoreLines}
+\newboolean{Changes@ShowOK}
% \end{macrocode}
% The definition of \chcommand{listofchanges}.
% \begin{macrocode}
-\newcommand{\listofchanges}[1][style=list]{%
+\newcommand{\listofchanges}[1][\@empty]{%
\setkeys{Changes@loc}{#1}%
% \end{macrocode}
% All work is done only in draft mode.
@@ -1049,14 +1615,16 @@
\ifthenelse{\boolean{Changes@optiondraft}}%
{%
% \end{macrocode}
+%
% Check if style is known, otherwise use \choption{list} by default.
% \begin{macrocode}
- \ifthenelse{\equal{\@empty}{\Changes@loc@style}}%
+ \ifIsEmpty{\Changes@loc@style}%
{\def\Changes@loc@style{list}}%
{%
\ifthenelse{%
\equal{\Changes@loc@style}{list}\or%
- \equal{\Changes@loc@style}{summary}%
+ \equal{\Changes@loc@style}{summary}\or%
+ \equal{\Changes@loc@style}{compactsummary}%
}%
{}%
{%
@@ -1065,23 +1633,81 @@
}%
}%
% \end{macrocode}
+%
+% Check if show-value is known, otherwise use \choption{all} by default.
+% \begin{macrocode}
+ \ifIsEmpty{\Changes@loc@show}%
+ {\def\Changes@loc@show{all}}%
+ {%
+% \end{macrocode}
+%
+% This check is complicated, because the \chcommand{isin} test of \chpackage{xifthen} does not work with macros.
+% On the other hand I could not define a new text using the \chcommand{IfSubStr} macro of \chpackage{xstring},
+% \begin{macrocode}
+ \setboolean{Changes@ShowOK}{false}%
+ \ifthenelse{\equal{\Changes@loc@show}{all}}{\setboolean{Changes@ShowOK}{true}}{}%
+ \IfSubStr{\Changes@loc@show}{added}{\setboolean{Changes@ShowOK}{true}}{}%
+ \IfSubStr{\Changes@loc@show}{deleted}{\setboolean{Changes@ShowOK}{true}}{}%
+ \IfSubStr{\Changes@loc@show}{replaced}{\setboolean{Changes@ShowOK}{true}}{}%
+ \IfSubStr{\Changes@loc@show}{highlight}{\setboolean{Changes@ShowOK}{true}}{}%
+ \IfSubStr{\Changes@loc@show}{comment}{\setboolean{Changes@ShowOK}{true}}{}%
+ \ifthenelse{\boolean{Changes@ShowOK}}%
+ {}%
+ {%
+ \PackageWarning{changes}{Wrong show-value for list of changes: '\Changes@loc@show', using 'all' instead.}%
+ \def\Changes@loc@show{all}%
+ }%
+ }%
+ \ifthenelse{\equal{\Changes@loc@show}{all}}%
+ {%
+ \def\Changes@loc@show{added|deleted|replaced|highlight|comment}%
+ }{}%
+% \end{macrocode}
+%
+% Print heading.
+% \begin{macrocode}
+ \section*{%
+ \ifIsEmpty{\Changes@loc@title}%
+ {%
+ \ifthenelse{\equal{\Changes@loc@style}{list}}%
+ {\listofchangesname}{}%
+ \ifthenelse{\equal{\Changes@loc@style}{summary}}%
+ {\summaryofchangesname}{}%
+ \ifthenelse{\equal{\Changes@loc@style}{compactsummary}}%
+ {\compactsummaryofchangesname}{}%
+ }%
+ {\Changes@loc@title}%
+ }%
+% \end{macrocode}
+%
% Print list.
% \begin{macrocode}
\ifthenelse{\equal{\Changes@loc@style}{list}}%
{%
- \section*{\listofchangesname}%
\IfFileExists{\jobname.loc}%
- {}{%
+ {%
+ \setboolean{Changes@MoreLines}{true}%
+ \newread\Changes@InFile%
+ \openin\Changes@InFile = \jobname.loc%
+ \whiledo{\boolean{Changes@MoreLines}}{%
+ \read\Changes@InFile to \Changes@Line%
+ \ifeof\Changes@InFile%
+ \setboolean{Changes@MoreLines}{false}%
+ \else%
+ \Changes@Line%
+ \fi%
+ }%
+ \closein\Changes@InFile%
+ }{%
\emph{\changesnoloc}%
\PackageWarning{changes}{LaTeX rerun needed for list of changes}%
}%
- \@starttoc{loc}{}%
- }%
+ }{}%
% \end{macrocode}
-% Print summary, but only in draft mode.
+% Print summary or compact summary.
% \begin{macrocode}
+ \ifthenelse{\equal{\Changes@loc@style}{summary} \or \equal{\Changes@loc@style}{compactsummary}}%
{%
- \section*{\summaryofchangesname}%
\IfFileExists{\jobname.\Changes@extension}%
{%
\setboolean{Changes@MoreLines}{true}%
@@ -1094,7 +1720,7 @@
\else%
\expandafter\changes@chopline\Changes@Line\\%
\textbf{%
- \ifthenelse{\boolean{Changes@colored}}%
+ \ifthenelse{\isColored}%
{\color{\Changes@InColor}}%
{}%
\ifthenelse{\equal{\Changes@InID}{\@empty}}%
@@ -1106,9 +1732,23 @@
{ (\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]%
+ \ifthenelse{%
+ \Changes@InAdded > 0 \or%
+ \Changes@InDeleted > 0 \or%
+ \Changes@InReplaced > 0 \or%
+ \Changes@InHighlight > 0 \or%
+ \Changes@InComment > 0%
+ }%
+ {%
+ \Changes@summaryline{added}{\Changes@InAdded}{\changesaddname}{\\}%
+ \Changes@summaryline{deleted}{\Changes@InDeleted}{\changesdeletename}{\\}%
+ \Changes@summaryline{replaced}{\Changes@InReplaced}{\changesreplacename}{\\}%
+ \Changes@summaryline{highlight}{\Changes@InHighlight}{\changeshighlightname}{\\}%
+ \Changes@summaryline{comment}{\Changes@InComment}{\changescommentname}{\\[1ex]}%
+ }%
+ {%
+ \parbox{\Changes@summary@width}{\changesnochanges}\\[1ex]%
+ }%
\fi%
}%
\closein\Changes@InFile%
@@ -1116,7 +1756,7 @@
\emph{\changesnosoc}%
\PackageWarning{changes}{LaTeX rerun needed for summary of changes}%
}%
- }%
+ }{}%
% \end{macrocode}
% In final mode print nothing.
% \begin{macrocode}
@@ -1126,12 +1766,12 @@
% \end{macro}
%
% At the end of the document: write the list of changes in the loc-file, therefore open file, write values, close file.
-% Changes are written as \LaTeX-formatted text, so they can simply be read via \chcommand{input}.
+% Changes are written as \hologo{LaTeX}-formatted text, so they can simply be read via \chcommand{input}.
%
-% The order of entries is: id, color, name, added, deleted, replaced.
+% The order of entries is: id, color, name, added, deleted, replaced, comment, highlight.
% The contents have to be separated by a semicolon.
% \begin{macrocode}
-\AtEndDocument{
+\AtEndDocument{%
% \end{macrocode}
% Open output file.
% \begin{macrocode}
@@ -1153,9 +1793,11 @@
\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@addedCount\Changes@ID};%
+ \the\value{Changes@deletedCount\Changes@ID};%
+ \the\value{Changes@replacedCount\Changes@ID};%
+ \the\value{Changes@highlightCount\Changes@ID};%
+ \the\value{Changes@commentCount\Changes@ID}}%
}%
% \end{macrocode}
% Close output file.
@@ -1165,6 +1807,16 @@
% Restore original definition of \chcommand{protect}.
% \begin{macrocode}
\let\protect\Changes@protect
+% \end{macrocode}
+%
+% Write content of listofchanges to file.
+% \begin{macrocode}
+ \if@filesw
+ \@ifundefined{tf@loc}{%
+ \expandafter\newwrite\csname tf@loc\endcsname
+ \immediate\openout \csname tf@loc\endcsname \jobname.loc\relax
+ }{}%
+ \fi
}
% \end{macrocode}
%
@@ -1177,4 +1829,3 @@
%
%\Finale
\endinput
-
diff --git a/Master/texmf-dist/source/latex/changes/changes.ins b/Master/texmf-dist/source/latex/changes/changes.ins
index 45f8f7c4a11..00129d5b1bd 100644
--- a/Master/texmf-dist/source/latex/changes/changes.ins
+++ b/Master/texmf-dist/source/latex/changes/changes.ins
@@ -1,6 +1,6 @@
%% This file creates the needed files from changes.dtx
%%
-\def\filedate{2018/10/10}
+\def\filedate{2018/11/04}
\def\batchfile{changes.ins}
\input docstrip
@@ -61,21 +61,19 @@ Copyright 2007-2018 Ekkart Kleinod
\file{changes.example.markup.nocolor.tex}{\from{examples.dtx}{example:markup:nocolor}}
\file{changes.example.markup.wrong.tex}{\from{examples.dtx}{example:markup:wrong}}
%
- \file{changes.example.addedmarkup.none.tex}{\from{examples.dtx}{example:addedmarkup:none}}
+ \file{changes.example.addedmarkup.colored.tex}{\from{examples.dtx}{example:addedmarkup:colored}}
\file{changes.example.addedmarkup.uline.tex}{\from{examples.dtx}{example:addedmarkup:uline}}
\file{changes.example.addedmarkup.uuline.tex}{\from{examples.dtx}{example:addedmarkup:uuline}}
\file{changes.example.addedmarkup.uwave.tex}{\from{examples.dtx}{example:addedmarkup:uwave}}
\file{changes.example.addedmarkup.dashuline.tex}{\from{examples.dtx}{example:addedmarkup:dashuline}}
\file{changes.example.addedmarkup.dotuline.tex}{\from{examples.dtx}{example:addedmarkup:dotuline}}
- \file{changes.example.addedmarkup.sout.tex}{\from{examples.dtx}{example:addedmarkup:sout}}
- \file{changes.example.addedmarkup.xout.tex}{\from{examples.dtx}{example:addedmarkup:xout}}
\file{changes.example.addedmarkup.bf.tex}{\from{examples.dtx}{example:addedmarkup:bf}}
\file{changes.example.addedmarkup.it.tex}{\from{examples.dtx}{example:addedmarkup:it}}
\file{changes.example.addedmarkup.sl.tex}{\from{examples.dtx}{example:addedmarkup:sl}}
\file{changes.example.addedmarkup.em.tex}{\from{examples.dtx}{example:addedmarkup:em}}
\file{changes.example.addedmarkup.wrong.tex}{\from{examples.dtx}{example:addedmarkup:wrong}}
%
- \file{changes.example.deletedmarkup.none.tex}{\from{examples.dtx}{example:deletedmarkup:none}}
+ \file{changes.example.deletedmarkup.colored.tex}{\from{examples.dtx}{example:deletedmarkup:colored}}
\file{changes.example.deletedmarkup.uline.tex}{\from{examples.dtx}{example:deletedmarkup:uline}}
\file{changes.example.deletedmarkup.uuline.tex}{\from{examples.dtx}{example:deletedmarkup:uuline}}
\file{changes.example.deletedmarkup.uwave.tex}{\from{examples.dtx}{example:deletedmarkup:uwave}}
@@ -89,8 +87,19 @@ Copyright 2007-2018 Ekkart Kleinod
\file{changes.example.deletedmarkup.em.tex}{\from{examples.dtx}{example:deletedmarkup:em}}
\file{changes.example.deletedmarkup.wrong.tex}{\from{examples.dtx}{example:deletedmarkup:wrong}}
%
+ \file{changes.example.commentmarkup.margin.tex}{\from{examples.dtx}{example:commentmarkup:margin}}
+ \file{changes.example.commentmarkup.footnote.tex}{\from{examples.dtx}{example:commentmarkup:footnote}}
+ \file{changes.example.commentmarkup.uwave.tex}{\from{examples.dtx}{example:commentmarkup:uwave}}
+ \file{changes.example.commentmarkup.todo.tex}{\from{examples.dtx}{example:commentmarkup:todo}}
+%
+ \file{changes.example.highlightmarkup.background.tex}{\from{examples.dtx}{example:highlightmarkup:background}}
+ \file{changes.example.highlightmarkup.uuline.tex}{\from{examples.dtx}{example:highlightmarkup:uuline}}
+ \file{changes.example.highlightmarkup.uwave.tex}{\from{examples.dtx}{example:highlightmarkup:uwave}}
+%
\file{changes.example.setaddedmarkup.tex}{\from{examples.dtx}{example:setaddedmarkup}}
\file{changes.example.setdeletedmarkup.tex}{\from{examples.dtx}{example:setdeletedmarkup}}
+ \file{changes.example.setcommentmarkup.tex}{\from{examples.dtx}{example:setcommentmarkup}}
+ \file{changes.example.sethighlightmarkup.tex}{\from{examples.dtx}{example:sethighlightmarkup}}
%
\file{changes.example.authormarkup.superscript.tex}{\from{examples.dtx}{example:authormarkup:superscript}}
\file{changes.example.authormarkup.subscript.tex}{\from{examples.dtx}{example:authormarkup:subscript}}
@@ -111,14 +120,27 @@ Copyright 2007-2018 Ekkart Kleinod
\file{changes.example.setauthormarkupposition.tex}{\from{examples.dtx}{example:setauthormarkupposition}}
\file{changes.example.setauthormarkuptext.tex}{\from{examples.dtx}{example:setauthormarkuptext}}
%
- \file{changes.example.setremarkmarkup.tex}{\from{examples.dtx}{example:setremarkmarkup}}
+ \file{changes.example.settruncatewidth.tex}{\from{examples.dtx}{example:settruncatewidth}}
+%
+ \file{changes.example.setsummarywidth.tex}{\from{examples.dtx}{example:setsummarywidth}}
+ \file{changes.example.setsummarytowidth.tex}{\from{examples.dtx}{example:setsummarytowidth}}
%
\file{changes.example.setsocextension.tex}{\from{examples.dtx}{example:setsocextension}}
%
\file{changes.example.listofchanges.list.tex}{\from{examples.dtx}{example:listofchanges:list}}
\file{changes.example.listofchanges.summary.tex}{\from{examples.dtx}{example:listofchanges:summary}}
- \file{changes.example.listofchanges.both.tex}{\from{examples.dtx}{example:listofchanges:both}}
+ \file{changes.example.listofchanges.compactsummary.tex}{\from{examples.dtx}{example:listofchanges:compactsummary}}
+ \file{changes.example.listofchanges.all.tex}{\from{examples.dtx}{example:listofchanges:all}}
+ \file{changes.example.listofchanges.title.tex}{\from{examples.dtx}{example:listofchanges:title}}
+ \file{changes.example.listofchanges.show.tex}{\from{examples.dtx}{example:listofchanges:show}}
\file{changes.example.listofchanges.wrong.tex}{\from{examples.dtx}{example:listofchanges:wrong}}
+%
+ \file{changes.example.packageoptions.todonotes.tex}{\from{examples.dtx}{example:packageoptions.todonotes}}
+ \file{changes.example.packageoptions.truncate.tex}{\from{examples.dtx}{example:packageoptions.truncate}}
+ \file{changes.example.packageoptions.ulem.tex}{\from{examples.dtx}{example:packageoptions.ulem}}
+ \file{changes.example.packageoptions.xcolor.tex}{\from{examples.dtx}{example:packageoptions.xcolor}}
+%
+ \file{changes.example.screenshot.tex}{\from{example-screenshot.dtx}{example:screenshot}}
}
\endinput
diff --git a/Master/texmf-dist/source/latex/changes/example-screenshot.dtx b/Master/texmf-dist/source/latex/changes/example-screenshot.dtx
new file mode 100644
index 00000000000..251b4b5a7cb
--- /dev/null
+++ b/Master/texmf-dist/source/latex/changes/example-screenshot.dtx
@@ -0,0 +1,190 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2018-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
+% of this license or any later version.
+% The latest version of this license is in\\
+% \url{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.
+% \fi
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% \GetFileInfo{example-screenshot.dtx}
+%
+%^^A --------------------------------------------------------------------------
+%
+% This is the most compact example for screenshots for the website.
+%
+% Start the \LaTeX document the standard way.
+%
+% \begin{macrocode}
+\documentclass[11pt, a4paper, notitlepage, ngerman, english]{scrartcl}
+\usepackage{babel}
+% \end{macrocode}
+%
+% Set with basic package.
+%
+% \begin{macrocode}
+\usepackage[font=charter, oneside]{basis}
+\author{Ekkart Kleinod}
+\title{Basic changes example}
+% \end{macrocode}
+%
+% Smaller test for screenshots.
+%
+% \begin{macrocode}
+\setlength{\textwidth}{180pt}
+% \end{macrocode}
+%
+% Nice listing.
+%
+% \begin{macrocode}
+\usepackage{listings}
+\lstset{
+ language=[AlLaTeX]TeX,
+ float=hbp,
+ numberstyle=\tiny\ttfamily,
+ basicstyle=\scriptsize\ttfamily,
+ identifierstyle=\color{DimGrey},
+ morekeywords={
+ },
+ keywordstyle=\color{LightSlateBlue},
+ commentstyle=\itshape\color{Thistle},
+ backgroundcolor=\color{PapayaWhip},
+ columns=fixed,
+ tabsize=4,
+ frame=single,
+ extendedchars=true,
+ showspaces=false,
+ showstringspaces=false,
+ numbers=none,
+ breaklines=true,
+ breakindent=3em,
+ breakautoindent=true,
+ captionpos=t,
+ xleftmargin=1em,
+ xrightmargin=1em,
+ lineskip=0pt,
+ numbersep=1em,
+ classoffset=1,
+ morekeywords={
+ added,
+ changes,
+ color,
+ comment,
+ compactsummary,
+ deleted,
+ definechangesauthor,
+ highlight,
+ id,
+ listofchanges,
+ name,
+ replaced,
+ setsummarywidth,
+ setsummarytowidth,
+ settruncatewidth,
+ style,
+ xcolor,
+ },
+ keywordstyle=\color{Chocolate},
+ moredelim=[s][\color{SlateGrey}]{<}{>},
+ classoffset=0
+}
+% \end{macrocode}
+%
+% Changes package and author.
+%
+% \begin{macrocode}
+\usepackage{changes}
+\definechangesauthor[color=purple, name={Ekkart Kleinod}]{EK}
+\setsummarytowidth{Commentedmmm}
+% \end{macrocode}
+%
+% The content in English first.
+%
+% \begin{macrocode}
+\begin{document}
+
+\begin{lstlisting}
+\usepackage{changes}
+\definechangesauthor[color=purple, name={Ekkart Kleinod}]{EK}
+
+...
+
+\listofchanges[style=compactsummary]
+
+This is \added[id=EK, comment={Missed word!}]{new} text with a comment.
+This is deleted \deleted{wrong} text.
+And some \replaced[id=EK]{replaced}{relpaced} text.
+Let \highlight{this} word stand out.
+This is the commented\comment[id=EK]{for now} end.
+\end{lstlisting}
+
+\listofchanges[style=compactsummary]
+
+\noindent
+This is \added[id=EK, comment={Missed word!}]{new} text with a comment.\\
+This is deleted \deleted{wrong} text.\\
+And some \replaced[id=EK]{replaced}{relpaced} text.\\
+Let \highlight{this} word stand out.\\
+This is the commented\comment[id=EK]{for now} end.
+
+% \end{macrocode}
+%
+% Now the same in German.
+%
+% \begin{macrocode}
+\clearpage
+\selectlanguage{ngerman}
+
+\begin{lstlisting}
+\usepackage{changes}
+\definechangesauthor[color=purple, name={Ekkart Kleinod}]{EK}
+
+...
+
+\listofchanges[style=compactsummary]
+
+Ein \added[id=EK, comment={Wort fehlt!}]{neuer} Text mit Kommentar.
+Und entfernter \deleted{falscher} Text.
+Dazu \replaced[id=EK]{ersetzter}{esretzter} Text.
+Hebe \highlight{dieses} Wort hervor.
+Wir sind\comment[id=EK]{vorerst} am Ende.
+\end{lstlisting}
+
+\listofchanges[style=compactsummary]
+
+Das ist \added[id=EK, comment={Wort fehlt!}]{neuer} Text mit Kommentar.\\
+Das ist entfernter \deleted{falscher} Text.\\
+Dazu \replaced[id=EK]{ersetzter}{esretzter} Text.\\
+Hebe \highlight{dieses} Wort hervor.\\
+Wir sind\comment[id=EK]{vorerst} am Ende.
+
+\end{document}
+% \end{macrocode}
+%
+%\Finale
+\endinput
diff --git a/Master/texmf-dist/source/latex/changes/examples.dtx b/Master/texmf-dist/source/latex/changes/examples.dtx
index 18ceb6bf52b..4b617a95c98 100644
--- a/Master/texmf-dist/source/latex/changes/examples.dtx
+++ b/Master/texmf-dist/source/latex/changes/examples.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2007-2013
+% Copyright (C) 2007-2018
% Ekkart Kleinod (ekleinod@edgesoft.de)
% --------------------------------------------------------------------------
%
@@ -46,9 +46,9 @@
% Different package options.
%
% \begin{macrocode}
-%<*example:simple|example:setsocextension|example:setaddedmarkup|example:setdeletedmarkup|example:setauthormarkup|example:setauthormarkupposition|example:setauthormarkuptext|example:setremarkmarkup|example:listofchanges:list|example:listofchanges:summary|example:listofchanges:both|example:listofchanges:wrong>
+%<*example:simple|example:setsocextension|example:setaddedmarkup|example:setdeletedmarkup|example:setcommentmarkup|example:sethighlightmarkup|example:setauthormarkup|example:setauthormarkupposition|example:setauthormarkuptext|example:listofchanges:list|example:listofchanges:show|example:listofchanges:summary|example:listofchanges:compactsummary|example:listofchanges:all|example:listofchanges:title|example:listofchanges:wrong|example:settruncatewidth|example:setsummarywidth|example:setsummarytowidth>
\usepackage{changes}
-%</example:simple|example:setsocextension|example:setaddedmarkup|example:setdeletedmarkup|example:setauthormarkup|example:setauthormarkupposition|example:setauthormarkuptext|example:setremarkmarkup|example:listofchanges:list|example:listofchanges:summary|example:listofchanges:both|example:listofchanges:wrong>
+%</example:simple|example:setsocextension|example:setaddedmarkup|example:setdeletedmarkup|example:setcommentmarkup|example:sethighlightmarkup|example:setauthormarkup|example:setauthormarkupposition|example:setauthormarkuptext|example:listofchanges:list|example:listofchanges:show|example:listofchanges:summary|example:listofchanges:compactsummary|example:listofchanges:all|example:listofchanges:title|example:listofchanges:wrong|example:settruncatewidth|example:setsummarywidth|example:setsummarytowidth>
%
%<*example:draft>
\usepackage[draft]{changes}
@@ -73,9 +73,9 @@
\usepackage[markup=wrong]{changes}
%</example:markup:wrong>
%
-%<*example:addedmarkup:none>
-\usepackage[addedmarkup=none]{changes}
-%</example:addedmarkup:none>
+%<*example:addedmarkup:colored>
+\usepackage[addedmarkup=colored]{changes}
+%</example:addedmarkup:colored>
%<*example:addedmarkup:uline>
\usepackage[addedmarkup=uline]{changes}
%</example:addedmarkup:uline>
@@ -91,12 +91,6 @@
%<*example:addedmarkup:dotuline>
\usepackage[addedmarkup=dotuline]{changes}
%</example:addedmarkup:dotuline>
-%<*example:addedmarkup:sout>
-\usepackage[addedmarkup=sout]{changes}
-%</example:addedmarkup:sout>
-%<*example:addedmarkup:xout>
-\usepackage[addedmarkup=xout]{changes}
-%</example:addedmarkup:xout>
%<*example:addedmarkup:bf>
\usepackage[addedmarkup=bf]{changes}
%</example:addedmarkup:bf>
@@ -113,9 +107,9 @@
\usepackage[addedmarkup=wrong]{changes}
%</example:addedmarkup:wrong>
%
-%<*example:deletedmarkup:none>
-\usepackage[deletedmarkup=none]{changes}
-%</example:deletedmarkup:none>
+%<*example:deletedmarkup:colored>
+\usepackage[deletedmarkup=colored]{changes}
+%</example:deletedmarkup:colored>
%<*example:deletedmarkup:uline>
\usepackage[deletedmarkup=uline]{changes}
%</example:deletedmarkup:uline>
@@ -153,6 +147,29 @@
\usepackage[deletedmarkup=wrong]{changes}
%</example:deletedmarkup:wrong>
%
+%<*example:commentmarkup:margin>
+\usepackage[commentmarkup=margin]{changes}
+%</example:commentmarkup:margin>
+%<*example:commentmarkup:footnote>
+\usepackage[commentmarkup=footnote]{changes}
+%</example:commentmarkup:footnote>
+%<*example:commentmarkup:uwave>
+\usepackage[commentmarkup=uwave]{changes}
+%</example:commentmarkup:uwave>
+%<*example:commentmarkup:todo>
+\usepackage[commentmarkup=todo]{changes}
+%</example:commentmarkup:todo>
+%
+%<*example:highlightmarkup:background>
+\usepackage[highlightmarkup=background]{changes}
+%</example:highlightmarkup:background>
+%<*example:highlightmarkup:uuline>
+\usepackage[highlightmarkup=uuline]{changes}
+%</example:highlightmarkup:uuline>
+%<*example:highlightmarkup:uwave>
+\usepackage[highlightmarkup=uwave]{changes}
+%</example:highlightmarkup:uwave>
+%
%<*example:authormarkup:superscript>
\usepackage[authormarkup=superscript]{changes}
%</example:authormarkup:superscript>
@@ -192,12 +209,31 @@
\usepackage[authormarkuptext=wrong]{changes}
%</example:authormarkuptext:wrong>
%
+%<*example:packageoptions.todonotes>
+\usepackage[todonotes={textsize=tiny}]{changes}
+%</example:packageoptions.todonotes>
+%<*example:packageoptions.truncate>
+\usepackage[truncate=hyphenate]{changes}
+%</example:packageoptions.truncate>
+%<*example:packageoptions.ulem>
+\usepackage[ulem=UWforbf]{changes}
+%</example:packageoptions.ulem>
+%<*example:packageoptions.xcolor>
+\usepackage[xcolor=hideerrors]{changes}
+%</example:packageoptions.xcolor>
+%
%<*example:setaddedmarkup>
\setaddedmarkup{\emph{#1}}
%</example:setaddedmarkup>
%<*example:setdeletedmarkup>
\setdeletedmarkup{\emph{#1}}
%</example:setdeletedmarkup>
+%<*example:setcommentmarkup>
+\setcommentmarkup{\ifthenelse{\isColored}{\color{authorcolor}}{}---~\ifthenelse{\isAnonymous{#2}}{}{\textbf{#3} }#1~---}
+%</example:setcommentmarkup>
+%<*example:sethighlightmarkup>
+\sethighlightmarkup{\emph{#1}}
+%</example:sethighlightmarkup>
%
%<*example:setauthormarkup>
\setauthormarkup{\xout{#1}}
@@ -209,9 +245,16 @@
\setauthormarkuptext{name}
%</example:setauthormarkuptext>
%
-%<*example:setremarkmarkup>
-\setremarkmarkup{\footnote{#2 as was written by #1}}
-%</example:setremarkmarkup>
+%<*example:settruncatewidth>
+\settruncatewidth{.3\textwidth}
+%</example:settruncatewidth>
+%
+%<*example:setsummarywidth>
+\setsummarywidth{3cm}
+%</example:setsummarywidth>
+%<*example:setsummarytowidth>
+\setsummarytowidth{The longest text you can imagine for the summary.}
+%</example:setsummarytowidth>
%
%<*example:setsocextension>
\setsocextension{changes}
@@ -223,25 +266,55 @@
% \begin{macrocode}
\definechangesauthor[color=green]{Green}
\definechangesauthor[name={Mister Orange}, color=orange]{OA}
+\definechangesauthor{nochanges}
% \end{macrocode}
%
-% This ist the document we use, some paragraphs from \texttt{http://slipsum.com/}.
+% This is the document we use, some paragraphs from \texttt{http://slipsum.com/}.
%
% \begin{macrocode}
\begin{document}
-%<example:simple>\section*{Changes Example: Simple}
-%<*example:listofchanges:list>
+%<example:simple>\verb|\usepackage{changes}|
+%<example:listofchanges:summary>\verb|\listofchanges[style=summary]|
+%<example:setaddedmarkup>\verb|\setaddedmarkup{\emph{#1}}|
+%<example:setdeletedmarkup>\verb|\setdeletedmarkup{\emph{#1}}|
+%<example:setcommentmarkup>\verb|\setcommentmarkup{\ifthenelse{\isColored}{\color{authorcolor}}{}---~\ifthenelse{\isAnonymous{#2}}{}{\textbf{#3} }#1~---}|
+%<example:sethighlightmarkup>\verb|\sethighlightmarkup{\emph{#1}}|
+%<example:setauthormarkup>\verb|\setauthormarkup{\xout{#1}}|
+%<example:setauthormarkupposition>\verb|\setauthormarkupposition{left}|
+%<example:setauthormarkuptext>\verb|\setauthormarkuptext{name}|
+%<example:settruncatewidth>\verb|\settruncatewidth{.3\textwidth}|
+%<example:setsummarywidth>\verb|\setsummarywidth{3cm}|
+%<example:setsummarytowidth>\verb|\setsummarytowidth{The longest text you can imagine for the summary.}|
+
+
+%<*example:listofchanges:list|example:settruncatewidth>
\listofchanges
-%</example:listofchanges:list>
-%<*example:listofchanges:summary>
+%</example:listofchanges:list|example:settruncatewidth>
+%<*example:listofchanges:summary|example:setsummarywidth|example:setsummarytowidth>
\listofchanges[style=summary]
-%</example:listofchanges:summary>
-%<*example:listofchanges:both>
+%</example:listofchanges:summary|example:setsummarywidth|example:setsummarytowidth>
+%<*example:listofchanges:compactsummary>
+\listofchanges[style=compactsummary]
+%</example:listofchanges:compactsummary>
+%<*example:listofchanges:all>
\listofchanges
\listofchanges[style=summary]
-%</example:listofchanges:both>
+\listofchanges[style=compactsummary]
+%</example:listofchanges:all>
+%<*example:listofchanges:title>
+\listofchanges[title={New title for loc}]
+\listofchanges[style=summary, title={New title for summary}]
+\listofchanges[style=compactsummary, title={New title for compact summary}]
+%</example:listofchanges:title>
+%<*example:listofchanges:show>
+\listofchanges[title={Additions and deletions}, show=added|deleted]
+\listofchanges[title={Comments}, show=comment]
+\listofchanges[style=summary, title={Summary of comments and replacements}, show=comment|replaced]
+\listofchanges[style=compactsummary, title={Compact summary of replacements}, show=replaced]
+\listofchanges[style=compactsummary, title={Compact summary of all changes (show=wrong)}, show=wrong]
+%</example:listofchanges:show>
%<*example:listofchanges:wrong>
\listofchanges[style=wrong]
%</example:listofchanges:wrong>
@@ -252,29 +325,41 @@ You think water moves fast?
\added{You should see ice.}
It moves like it has a mind.
Like it knows it killed the world once and got a taste for murder.
-\deleted[remark={No?}]{After the avalanche, it took us a week to climb out.}
+\deleted[comment={No?}]{After the avalanche, it took us a week to climb out.}
Now, I don't know exactly \added{when} we turned on each other, but I know that seven of us survived the slide... and only five made it out.
\replaced{Now we took an oath, that I'm breaking now.}{We said we'd say it was the snow that killed the other two, but it wasn't.}
Nature is lethal but it doesn't hold a candle to man.
+However unreal\comment{speaking of unreal\dots} it may seem, we are connected, you and I.
+We're on the same curve, just on opposite ends.
+You don't get \highlight[comment={Yes, sick.}]{sick}, I do.
+That's also \highlight{clear}.
\subsection*{Changes by green author}
The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island.
-\added[id=Green]{Dr. Wu inserted} a gene \replaced[id=Green]{taht}{that} makes a \deleted[id=Green]{single} faulty enzyme in protein metabolism.
+Dr. Wu inserted a gene \replaced[id=Green]{taht}{that} makes a \deleted[id=Green]{single} faulty enzyme in protein metabolism.
The animals can't manufacture the amino acid lysine.
Unless \replaced[id=Green]{they're}{continually} supplied with lysine by us, they'll slip into a coma and die.
+We're on the same curve, just on opposite ends.
+However unreal\comment[id=Green]{speaking of unreal\dots} it may seem, we are connected, you and I.
+You don't get \highlight[id=Green, comment={Yes, sick.}]{sick}, I do.
+That's also \highlight[id=Green]{clear}.
-\subsection*{Changes by orange author with some remarks}
+\subsection*{Changes by orange author with some comments}
Now that we know who you are, I know who I am.
-\added[id=OA, remark={Yeah, I like animals better than people sometimes\dots}]{I'm not a mistake!}
+\added[id=OA, comment={Yeah, I like animals better than people sometimes\dots}]{I'm not a mistake!}
It all makes sense!
In a comic, you know how you can tell who the arch-villain's going to be?
-\deleted[id=OA, remark={Especially dogs. Dogs are the best.}]{He's the exact opposite of the hero.}
+\deleted[id=OA, comment={Especially dogs. Dogs are the best.}]{He's the exact opposite of the hero.}
\deleted[id=OA]{And most times they're friends, like you and me!}
I should've known way back when...
-\replaced[id=OA, remark={Every time you come home, they act like they haven't seen you in a year.}]{You know why, David?}{Because of the kids.}
+You know why, David?
They called me Mr Glass.
+However unreal\comment[id=OA]{just nice} it may seem, we are connected, you and I.
+We're on the same curve, just on opposite ends.
+You don't get \highlight[id=OA, comment={Yes, sick.}]{sick}, I do.
+That's also \highlight[id=OA]{clear}.
\subsection*{No changes}
@@ -288,10 +373,37 @@ We swallow it too fast, we choke.
\emph{We get some in our lungs, we drown.}
However unreal it may seem, we are connected, you and I.
We're on the same curve, just on opposite ends.
+You don't get sick, I do.
+That's also clear.
+
+%<*example:packageoptions.ulem>
+\subsection*{Options to ulem package: UWforbf}
+
+This is \textbf{bold} text, underwaved by \emph{ulem} because of the \emph{UWforbf} option.
+%</example:packageoptions.ulem>
+
+%<*example:packageoptions.xcolor>
+\subsection*{Options to xcolor package: hideerrors}
+
+\textcolor{rainbow}{This text is black instead of \emph{rainbow}, a color that does not exist.
+Because of the option \emph{hideerrors} only a warning is raised, not an error.}
+%</example:packageoptions.xcolor>
+
+%<*example:packageoptions.todonotes>
+\subsection*{Options to todonotes package: textsize=tiny}
+
+All\todo{very small text} notes have very small text.
+%</example:packageoptions.todonotes>
+
+%<*example:packageoptions.truncate>
+\subsection*{Options to truncate package: hyphenate}
+
+\truncate{12em}{Truncate word at hyphenation.}
+%</example:packageoptions.truncate>
+
\end{document}
% \end{macrocode}
%
%\Finale
\endinput
-