diff options
Diffstat (limited to 'macros/latex/contrib/changes')
80 files changed, 5303 insertions, 0 deletions
diff --git a/macros/latex/contrib/changes/README b/macros/latex/contrib/changes/README new file mode 100644 index 0000000000..b14ada07df --- /dev/null +++ b/macros/latex/contrib/changes/README @@ -0,0 +1,20 @@ +The changes-package allows the user to manually markup changes of text, such as additions, deletions, or replacements. +Changed text is shown in a different color; deleted text is striked out. +Additionally, text can be highlighted and/or commented. +The package allows free definition of additional authors and their associated color. +It also allows you to change the markup of changes, authors, highlights or comments. + +Das changes-Paket dient zur manuellen Markierung von geändertem Text, insbesondere Einfügungen, Löschungen und Ersetzungen. +Der geänderte Text wird farbig markiert und, bei gelöschtem Text, durchgestrichen. +Zusätzlich kann Text hervorgehoben und/oder kommentiert werden. +Das Paket ermöglicht die freie Definition von Autoren und deren zugeordneten Farben. +Es erlaubt zusätzlich die Änderung des Änderungs-, Autor-, Hervorhebungs- und Kommentarmarkups. + +Autor/author: Ekkart Kleinod <ekleinod@edgesoft.de> +Internet: http://changes.sourceforge.net/ + +This material is subject to the LaTeX Project Public License (LPPL 1.3 or any later version). +For more details please refer to the user documentation changes.english.pdf + +Dieses Paket steht unter der LaTeX Project Public License (LPPL 1.3 oder jeder späteren Version). +Für Details lesen Sie bitte die Nutzerdokumentation changes.ngerman.pdf diff --git a/macros/latex/contrib/changes/changes.drv b/macros/latex/contrib/changes/changes.drv new file mode 100644 index 0000000000..13ee48a492 --- /dev/null +++ b/macros/latex/contrib/changes/changes.drv @@ -0,0 +1,281 @@ +%%% +% driver file of changes package + +\documentclass[titlepage, parskip=half, toc=flat, cleardoublepage=empty, captions=nooneline, origlongtable, english]{scrartcl} + +% code definition and documentation +\usepackage{doc} + +% basis layout +\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{SteelBlue}, + 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, + deleted, + definechangesauthor, + highlight, + listofchanges, + replaced, + style, +% + draft, + final, + markup, + addedmarkup, + deletedmarkup, + highlightmarkup, + commentmarkup, + authormarkup, + authormarkupposition, + authormarkuptext, + todonotes, + truncate, + ulem, + xcolor, +% + default, + underlined, + bfit, + nocolor, +% + colored, + uline, + uuline, + uwave, + dashuline, + dotuline, + bf, + it, + sl, + em, +% + sout, + xout, +% + background, +% + todo, + margin, + footnote, +% + superscript, + subscript, + brackets, + none, +% + right, + left, +% + id, + name, +% + title, + show, +% + list, + summary, + compactsummary, +% + setaddedmarkup, + setdeletedmarkup, + sethighlightmarkup, + setcommentmarkup, + setauthormarkup, + setauthormarkupposition, + setauthormarkuptext, + settruncatewidth, + setsummarywidth, + setsummarytowidth, + setsocextension, + }, + keywordstyle=\color{Peru}, + moredelim=[s][\color{SlateGrey}]{<}{>}, + classoffset=0, + escapechar=! +} + +% minitocs +\usepackage{etoc} +\etocsettocstyle{}{} + +% language selection +\selectlanguage{english} + +% use change management ;) +\usepackage{changes} +\definechangesauthor[name={Ekkart Kleinod}, color=Sienna]{EK} +\setcommentmarkup{% + \ifthenelse{\isColored}% + {% + \ifthenelse{\isAnonymous{#2}}% + {% + \todo[color=authorcolor!10, bordercolor=authorcolor, linecolor=authorcolor!70, nolist]{\footnotesize\textbf{[\arabic{authorcommentcount}]} #1}% + }{% + \todo[color=authorcolor!10, bordercolor=authorcolor, linecolor=authorcolor!70, nolist]{\footnotesize\textbf{[#3~\arabic{authorcommentcount}]} #1}% + }% + }{% + \ifthenelse{\isAnonymous{#2}}% + {% + \todo[color=black!0, bordercolor=black, linecolor=black!70, nolist]{\footnotesize\textbf{[\arabic{authorcommentcount}]} #1}% + }{% + \todo[color=black!0, bordercolor=black, linecolor=black!70, nolist]{\footnotesize\textbf{[#3~\arabic{authorcommentcount}]:} #1}% + }% + }% +}% + +% full index +\EnableCrossrefs + +% with line numbers +\CodelineIndex + +% formatting +\newcommand{\chpackage}[1]{\textsl{#1}} +\newcommand{\choption}[1]{\texttt{#1}} +\newcommand{\chfile}[1]{\texttt{#1}} +\newcommand{\chcommand}[1]{\texttt{\textbackslash{}#1}} + +% additional description list formatting +\newlength{\mylabelwidth} +\settowidth{\mylabelwidth}{\texttt{compactsummarym}} +\setlist[description]{style=nextline, font=\normalfont, leftmargin=\mylabelwidth} + +% catchall - english +\newif\ifENGLISH +\ENGLISHtrue + +% german +\newif\ifGERMAN +\GERMANfalse +\iflanguage{ngerman}{\GERMANtrue\ENGLISHfalse}{} +\iflanguage{german}{\GERMANtrue\ENGLISHfalse}{} + +% example environment +\newcommand{\chinputlisting}[2]{% + \lstinputlisting[% + backgroundcolor=\color{white},% + xleftmargin=.5em,% + xrightmargin=.5em,% + frame=none,% + belowskip=0pt% + #1% + ]{#2}% +} +\newcommand{\chinline}[2][]{% + \chinputlisting{#1}{userdoc/in_#2}% +} +\newcommand{\chexample}[1]{ + \ifENGLISH + \minisec{Examples} + \fi + \ifGERMAN + \minisec{Beispiele} + \fi + \lstinputlisting{userdoc/ex_#1} +} +\newcommand{\chresult}[1]{ + \ifENGLISH + \minisec{Result} + \fi + \ifGERMAN + \minisec{Resultat} + \fi + \begin{quote} + \input{userdoc/ex_#1} + \end{quote} +} + + +\newenvironment{chusage}{ + \small + \begin{tabbing} + m\=m\=m\=\kill + \usagecall +}{% + \end{tabbing} +} +\newcommand{\usagecall}{ + \ifENGLISH + \textsl{Call}\\ + \fi + \ifGERMAN + \textsl{Aufruf}\\ + \fi +} +\newcommand{\usageexample}{ + \ifENGLISH + \textsl{Examples}\\ + \fi + \ifGERMAN + \textsl{Beispiele}\\ + \fi +} + +% important things +\newcommand{\chimportant}[1]{% + \begin{quote}% + \color{Teal}% + #1% + \end{quote}% +} + +% new commands +\newcommand{\chnewcmd}[1]{ + \subsubsection{\chcommand{#1}} + \label{sec:ui:cmd:#1} +} + +% document title +\ifENGLISH + \title{The \chpackage{changes}-package} + \subtitle{Manual change markup --- version 3.1.3} +\fi +\ifGERMAN + \title{Das \chpackage{changes}-Paket} + \subtitle{Manuelle Änderungsmarkierung -- Version 3.1.3} +\fi + +\author{Ekkart Kleinod} +\email{ekleinod@edgesoft.de} + +% only description part? +%\OnlyDescription + +% content +\begin{document} + + \DocInput{changes.dtx} + +\end{document} diff --git a/macros/latex/contrib/changes/changes.dtx b/macros/latex/contrib/changes/changes.dtx new file mode 100644 index 0000000000..1ca69d8a93 --- /dev/null +++ b/macros/latex/contrib/changes/changes.dtx @@ -0,0 +1,1849 @@ +% \CheckSum{1510} +% +% \iffalse meta-comment +% +% Copyright (C) 2007-2019 +% 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. +% +% Some code for providing multilanguage documentation was +% used from the pst-pdf package by Rolf Niepraschk and Hubert Gaesslein. +% \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 \~} +% +% \changes{v0.1}{2007/01/16}{Initial version.} +% \changes{v0.2}{2007/01/17}{new convenience commands, LPPL, bugfixes: missing babel package, ifthen-placement, loc, author markup} +% \changes{v0.3}{2007/01/22}{english documentation, replaced command changed with command replaced} +% \changes{v0.4}{2007/01/24}{pdfcolmk for improved markup, introduced author-ids, first CTAN version} +% \changes{v0.5}{2007/08/26}{reimplementation without array package, UTF-8, grayed text, change pf command arguments} +% \changes{v0.5.1}{2007/08/27}{deleted text is striked out again using package ulem, greying didn't work} +% \changes{v0.5.2}{2007/10/10}{package options for ulem and xcolor} +% \changes{v0.5.3}{2010/11/22}{use class options (final, draft) as well} +% \changes{v0.5.4}{2011/04/25}{extract user documentation; default language changed to English; script for removal of commands} +% \changes{v0.6.0}{2012/01/11}{redefined user interface for setting options, markup, authors; newly structured documentation} +% \changes{v1.0.0}{2012/04/25}{key-value-interface for change commands; special characters in list of changes} +% \changes{v2.0.0}{2013/06/30}{fixed problem with special characters in tabbing environment (loc), real list of changes, authormarkup} +% \changes{v2.0.1}{2013/08/10}{no changes in behavior or code; fixed problems with CTAN upload} +% \changes{v2.0.2}{2013/08/13}{again no changes in behavior or code; fixed CTAN upload - pdf files were corrupt; improved documentation} +% \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} +% \changes{v3.1.0}{2018/12/17}{new script for markup removal, improved user manual} +% \changes{v3.1.1}{2018/12/18}{bugfix: uneven dot fills in summaries} +% \changes{v3.1.2}{2019/01/26}{bugfix: problems with amsart class} +% \changes{v3.1.3}{2019/07/21}{bugfix: option clash for ulem and truncate; documentation of known problems and solutions} +% \GetFileInfo{changes.dtx} +% \RecordChanges +% +%^^A -------------------------------------------------------------------------- +% +% \maketitle +% +% \tableofcontents +% \cleardoublepage +% +% \ifENGLISH +% \input{userdoc/changes.en} +% \fi +% \ifGERMAN +% \input{userdoc/changes.de} +% \fi +% +%^^A -- source code +% +% \StopEventually +% +% \selectlanguage{english} +% +% \cleardoublepage +% \section{The documented sourcecode} +% +% The sourcecode is documented in English only. +% This is intended, please do not provide translations for the text below, just corrections or improvements. +% +% \begin{macrocode} +%<*changes> +% \end{macrocode} +% +% \subsection{Package information and options} +% +% Set needed \hologo{LaTeX}-format to \hologo{LaTeXe}, provide name, date, version. +% Type some information to the console. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{changes} +[2019/07/21 v3.1.3 changes package] +\typeout{*** changes package 2019/07/21 v3.1.3 ***} +% \end{macrocode} +% +% Package \chpackage{xkeyval} provides options with key-value-pairs. +% \begin{macrocode} +\RequirePackage{xkeyval} +% \end{macrocode} +% +% Package \chpackage{xifthen} provides improved \texttt{if} as well as a \texttt{while}-loop. +% \begin{macrocode} +\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}. +% \begin{macrocode} +\newboolean{Changes@optiondraft} +\setboolean{Changes@optiondraft}{true} +\DeclareOptionX{draft}{ + \setboolean{Changes@optiondraft}{true} + \typeout{changes-option '\CurrentOption'} +} +% \end{macrocode} +% +% Option \choption{final}, sets \choption{draft} to \texttt{false}. +% \begin{macrocode} +\DeclareOptionX{final}{ + \setboolean{Changes@optiondraft}{false} + \typeout{changes-option '\CurrentOption'} +} +% \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}{colored} +\newcommand{\Changes@optiondeletedmarkup}{sout} +\newcommand{\Changes@optionhighlightmarkup}{background} +\newcommand{\Changes@optioncommentmarkup}{todo} +% \end{macrocode} +% +% Option \choption{markup}, sets markup options accordingly. +% \begin{macrocode} +\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}} + { + % nothing to do + } + {} + \ifthenelse{\equal{\Changes@optionmarkup}{underlined}} + { + \renewcommand{\Changes@optionaddedmarkup}{uline} + \renewcommand{\Changes@optionhighlightmarkup}{uwave} + } + {} + \ifthenelse{\equal{\Changes@optionmarkup}{bfit}} + { + \renewcommand{\Changes@optionaddedmarkup}{bf} + \renewcommand{\Changes@optiondeletedmarkup}{it} + } + {} + \ifthenelse{\equal{\Changes@optionmarkup}{nocolor}} + { + \renewcommand{\Changes@optionaddedmarkup}{uline} + \renewcommand{\Changes@optionhighlightmarkup}{uwave} + } + {} + \typeout{changes-option 'markup=\Changes@optionmarkup'} +} +% \end{macrocode} +% +% Option \choption{addedmarkup}, stored or set to default value ``\texttt{colored}''. +% \begin{macrocode} +\DeclareOptionX{addedmarkup}{ + \ifthenelse{\equal{\@empty}{#1}} + {} + { + \ifthenelse{ + \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}{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'} +} +% \end{macrocode} +% +% Option \choption{deletedmarkup}, stored or set to default value ``\texttt{sout}''. +% \begin{macrocode} +\DeclareOptionX{deletedmarkup}{ + \ifthenelse{\equal{\@empty}{#1}} + {} + { + \ifthenelse{ + \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}{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'} +} +% \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} +\DeclareOptionX{authormarkup}{ + \ifthenelse{\equal{\@empty}{#1}} + {} + { + \ifthenelse{ + \equal{#1}{superscript}\or + \equal{#1}{subscript}\or + \equal{#1}{brackets}\or + \equal{#1}{footnote}\or + \equal{#1}{none} + } + {\renewcommand{\Changes@optionauthormarkup}{#1}} + {\PackageWarning{changes}{authormarkup '#1' unknown, using '\Changes@optionauthormarkup'}} + } + \typeout{changes-option 'authormarkup=\Changes@optionauthormarkup'} +} +% \end{macrocode} +% +% Declare storage for authormarkupposition option and store option value or set to default value ``\texttt{right}''. +% \begin{macrocode} +\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'} +} +% \end{macrocode} +% +% Declare storage for authormarkuptext option and store option value or set to default value ``\texttt{id}''. +% \begin{macrocode} +\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'} +} +% \end{macrocode} +% +% +% +% 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}{ + \typeout{ulem-option '#1', passed to package ulem} + \PassOptionsToPackage{#1}{ulem} +} +% \end{macrocode} +% +% Options for package \chpackage{xcolor} are directly passed to the package. +% \begin{macrocode} +\DeclareOptionX{xcolor}{ + \typeout{xcolor-option '#1', passed to package xcolor} + \PassOptionsToPackage{#1}{xcolor} +} +% \end{macrocode} +% +% Unknown options generate a package warning. +% \begin{macrocode} +\DeclareOptionX*{ + \PackageWarning{changes}{Unknown option '\CurrentOption'} +} +% \end{macrocode} +% +% \subsubsection{Command options} +% +% All options for commands (e.g. \chcommand{definechangesauthor}) have to be declared before option processing. +% +% \minisec{\chcommand{definechangesauthor}} +% +% Declare available options of the command, define value storage. +% \begin{macrocode} +\DeclareOptionX<Changes@definechangesauthor>{name}{\def\Changes@definechangesauthor@name{#1}} +\DeclareOptionX<Changes@definechangesauthor>{color}{\def\Changes@definechangesauthor@color{#1}} +% \end{macrocode} +% +% Set the default values of the options. +% \begin{macrocode} +\presetkeys{Changes@definechangesauthor}{ + name=\@empty, + color=blue +}{} +% \end{macrocode} +% +% \minisec{\chcommand{added}} +% +% Declare available options of the command, define value storage. +% \begin{macrocode} +\DeclareOptionX<Changes@added>{id}{\def\Changes@added@id{#1}} +\DeclareOptionX<Changes@added>{remark}{\def\Changes@added@remark{#1}} +\DeclareOptionX<Changes@added>{comment}{\def\Changes@added@comment{#1}} +% \end{macrocode} +% +% Set the default values of the options. +% \begin{macrocode} +\presetkeys{Changes@added}{ + id=\@empty, + remark=\@empty, + comment=\@empty, +}{} +% \end{macrocode} +% +% \minisec{\chcommand{deleted}} +% +% Declare available options of the command, define value storage. +% \begin{macrocode} +\DeclareOptionX<Changes@deleted>{id}{\def\Changes@deleted@id{#1}} +\DeclareOptionX<Changes@deleted>{remark}{\def\Changes@deleted@remark{#1}} +\DeclareOptionX<Changes@deleted>{comment}{\def\Changes@deleted@comment{#1}} +% \end{macrocode} +% +% Set the default values of the options. +% \begin{macrocode} +\presetkeys{Changes@deleted}{ + id=\@empty, + remark=\@empty, + comment=\@empty, +}{} +% \end{macrocode} +% +% \minisec{\chcommand{replaced}} +% +% Declare available options of the command, define value storage. +% \begin{macrocode} +\DeclareOptionX<Changes@replaced>{id}{\def\Changes@replaced@id{#1}} +\DeclareOptionX<Changes@replaced>{remark}{\def\Changes@replaced@remark{#1}} +\DeclareOptionX<Changes@replaced>{comment}{\def\Changes@replaced@comment{#1}} +% \end{macrocode} +% +% Set the default values of the options. +% \begin{macrocode} +\presetkeys{Changes@replaced}{ + id=\@empty, + remark=\@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} +% +% \minisec{\chcommand{listofchanges}} +% +% 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, + title=\@empty, + show=all, +}{} +% \end{macrocode} +% +% \subsubsection{Package options} +% +% In order to avoid option clashes for options, state them here instead at the moment of requiring the package. +% Thanks for Markus Pahlow for pointing this out and providing the solution. +% \begin{macrocode} +\ExecuteOptionsX{ + ulem={normalem,normalbf}, + truncate={breakall,fit} +} +% \end{macrocode} +% +% \subsubsection{Option processing} +% +% Process the options. +% \begin{macrocode} +\ProcessOptionsX*\relax +% \end{macrocode} +% +% \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} +\ifthenelse{\isColored} + { + \RequirePackage{xcolor} + \RequirePackage{pdfcolmk} + } + {} +% \end{macrocode} +% +% Package \chpackage{ulem} provides commands for striking out text. +% Providing the needed package options via \chcommand{ExecuteOptionsX}. +% \begin{macrocode} +\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@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}\or + \equal{\Changes@optioncommentmarkup}{uwave}\or + \equal{\Changes@optionhighlightmarkup}{uuline}\or + \equal{\Changes@optionhighlightmarkup}{uwave} +} + {\RequirePackage{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. +% If the \chpackage{babel} or the \chpackage{polyglossia} package is loaded, the default language is English too for undefined languages. +% \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} +% +% The check for \chpackage{babel} or \chpackage{polyglossia}, define language dependent texts afterwards. +% \begin{macrocode} +\newboolean{Changes@langpackage} +\setboolean{Changes@langpackage}{false} +\@ifpackageloaded{babel} + {\setboolean{Changes@langpackage}{true}} + {} +\@ifpackageloaded{polyglossia} + {\setboolean{Changes@langpackage}{true}} + {} +\ifthenelse{\boolean{Changes@langpackage}} + { + \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.}} + } + {} +% \end{macrocode} +% +% \subsection{File extension} +% +% \begin{macro}{\Changes@extension} +% Store file extension in variable, set default to \texttt{soc} (summary of changes). +% \begin{macrocode} +\newcommand{\Changes@extension}{soc} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\setsocextension} +% Set a new file extension. +% Argument: new extension. +% \begin{macrocode} +\newcommand{\setsocextension}[1]{ + \renewcommand{\Changes@extension}{#1} +} +% \end{macrocode} +% \end{macro} +% +% +% \subsection{Authors} +% +% \subsubsection{Author management} +% +% Author counter. +% \begin{macrocode} +\newcounter{Changes@AuthorCount} +\setcounter{Changes@AuthorCount}{0} +\newcounter{Changes@Author} +% \end{macrocode} +% +% \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: blue). +% +% Store id, name and color using named variables. +% Define counter and color per author. +% \begin{macrocode} +\newcommand*\definechangesauthor[2][]{ +% \end{macrocode} +% +% Call \emph{setkeys} in order to evaluate the key-value-options and fill the value storage. +% \begin{macrocode} + \setkeys{Changes@definechangesauthor}{#1} +% \end{macrocode} +% +% Increment author counter, later needed for \emph{while} loop of authors. +% \begin{macrocode} + \stepcounter{Changes@AuthorCount} +% \end{macrocode} +% +% Store the id in a name with the given counter/index. +% All other storage refers to the id. +% \begin{macrocode} + \@namedef{Changes@AuthorID\theChanges@AuthorCount}{#2} +% \end{macrocode} +% +% Store the author's definition in according variables/colors, create change counters. +% \begin{macrocode} + \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 default color. +% \begin{macrocode} +\definechangesauthor{\@empty} +% \end{macrocode} +% +% +% \subsubsection{Author markup} +% +% \begin{macro}{\Changes@Markup@author} +% Store markup for authors. +% \begin{macrocode} +\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}}{}% + \ifthenelse{\equal{\Changes@optionauthormarkup}{none}}{}{}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\setauthormarkup} +% Set markup for authors. +% \begin{macrocode} +\newcommand{\setauthormarkup}[1]{ + \renewcommand{\Changes@Markup@author}[1]{#1} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\setauthormarkupposition} +% Set position for author markup text. +% \begin{macrocode} +\newcommand{\setauthormarkupposition}[1]{ + \renewcommand{\Changes@optionauthormarkupposition}{#1} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\setauthormarkuptext} +% Set author markup text to be displayed. +% \begin{macrocode} +\newcommand{\setauthormarkuptext}[1]{ + \renewcommand{\Changes@optionauthormarkuptext}{#1} +} +% \end{macrocode} +% \end{macro} +% +% \subsection{Change management commands} +% +% \subsubsection{Text markup definition} +% +% 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} +% Store markup for added text. +% \begin{macrocode} +\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}{bf}}{\textbf{#1}}{}% + \ifthenelse{\equal{\Changes@optionaddedmarkup}{it}}{\textit{#1}}{}% + \ifthenelse{\equal{\Changes@optionaddedmarkup}{sl}}{\textsl{#1}}{}% + \ifthenelse{\equal{\Changes@optionaddedmarkup}{em}}{\emph{#1}}{}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\setaddedmarkup} +% Set markup for added text. +% \begin{macrocode} +\newcommand{\setaddedmarkup}[1]{ + \renewcommand{\Changes@Markup@added}[1]{#1} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\Changes@Markup@deleted} +% Store markup for deleted text. +% \begin{macrocode} +\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}{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}}{}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\setdeletedmarkup} +% Set markup for deleted text. +% \begin{macrocode} +\newcommand{\setdeletedmarkup}[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} +% +% +% \subsubsection{Change management command definition} +% +% \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 author's id +% \end{enumerate} +% +% \begin{macrocode} +\newtest{\isAnonymous}[1]{% + \equal{#1}{\@empty}% +} +% \end{macrocode} +% \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} +\newtest{\isAuthorEmpty}[2]{% + \isAnonymous{#1} \or \not\equal{\Changes@optionauthormarkupposition}{#2}% +} +% \end{macrocode} +% \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{#1}{\@nameuse{Changes@AuthorID\theChanges@Author}}}% + {\setboolean{Changes@WrongID}{false}}% + {}% + }% + \ifthenelse{\boolean{Changes@WrongID}}% + {\PackageError{changes}% + {Undefined changes author: #1}% + {You have to define the author #1 with e.g.: \definechangesauthor{#1}}}% + {}% + }% +} +% \end{macrocode} +% \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} +\DeclareRobustCommand{\Changes@output@author}[2]{% +% \end{macrocode} +% +% 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}}% + {% + #1% + }% + {}% + \ifthenelse{\equal{\Changes@optionauthormarkuptext}{name}}% + {% + \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} +% +% 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} +% +% 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{% + \equal{#1}{added}\or% + \equal{#1}{deleted}\or% + \equal{#1}{replaced}\or% + \equal{#1}{highlight}% + }% + {% +% \end{macrocode} +% +% Author text for left positioning (only without comment). +% \begin{macrocode} + \ifIsEmpty{#5}% + {% + \ifthenelse{\isAuthorEmpty{#2}{left}}% + {}% + {{% + \ifthenelse{\isColored}% + {\color{authorcolor}}% + {}% + \Changes@Markup@author{\Changes@output@author{#2}{left}}% + }}% + }{}% +% \end{macrocode} +% +% Changed/highlighted text. +% \begin{macrocode} + {% + \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} +% +% Author text for right positioning (only without comment). +% \begin{macrocode} + \ifIsEmpty{#5}% + {% + \ifthenelse{\isAuthorEmpty{#2}{right}}% + {}% + {{% + \ifthenelse{\isColored}% + {\color{authorcolor}}% + {}% + \Changes@Markup@author{\Changes@output@author{#2}{right}}% + }}% + }{}% +% \end{macrocode} +% +% Update counters. +% \begin{macrocode} + \stepcounter{Changes@#1Count#2}% + }{}% +% \end{macrocode} +% +% Comments. +% \begin{macrocode} + \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} + \ifIsEmpty{#2}% + {\def\Changes@locid{}}% + {\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} + {% + \ifIsEmpty{#3}% + {\@bsphack\@esphack}% + {#3}% + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\added} +% The command formats text as new text. +% +% Mandatory argument: added text. +% 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}% +% \end{macrocode} +% Check for use of deprecated \choption{remark} option. +% \begin{macrocode} + \ifIsEmpty{\Changes@added@remark}% + {}% + {% + \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}% + {#2}% + {}% + {\Changes@added@comment}% + {\changesaddname}% + {#2}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\deleted} +% The command formats text as deleted text. +% +% The definition of the empty text for unchanged text is provided by Frank Mittelbach, slightly modified by me. +% It solves the problem of additional space caused by an empty command (e.g. when using the \choption{final} option). +% 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, 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}% +% \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% + {deleted}% + {\Changes@deleted@id}% + {}% + {#2}% + {\Changes@deleted@comment}% + {\changesdeletename}% + {#2}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\replaced} +% The command formats text as replaced text. +% +% Mandatory arguments: new text and old text. +% 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}% +% \end{macrocode} +% Check for use of deprecated \choption{remark} option. +% \begin{macrocode} + \ifIsEmpty{\Changes@replaced@remark}% + {}% + {% + \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}% + {#2}% + {#3}% + {\Changes@replaced@comment}% + {\changesreplacename}% + {#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} +% +% \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) +% Providing the needed package options via \chcommand{ExecuteOptionsX}. +% \begin{macrocode} +\RequirePackage{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, highlighted, comment. +% The contents have to be separated by a semicolon. +% \begin{macrocode} +\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}{% + \@ifundefined{@dotsep}% + {\def\@dotsep{4.5}}{}% + \@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~\let\cleaders\leaders\dotfill~#2}#4% + }{}% + }{}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\listofchanges} +% +% 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 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. +% \begin{macrocode} +\newboolean{Changes@MoreLines} +\newboolean{Changes@ShowOK} +% \end{macrocode} +% The definition of \chcommand{listofchanges}. +% \begin{macrocode} +\newcommand{\listofchanges}[1][\@empty]{% + \setkeys{Changes@loc}{#1}% +% \end{macrocode} +% All work is done only in draft mode. +% \begin{macrocode} + \ifthenelse{\boolean{Changes@optiondraft}}% + {% +% \end{macrocode} +% +% Check if style is known, otherwise use \choption{list} by default. +% \begin{macrocode} + \ifIsEmpty{\Changes@loc@style}% + {\def\Changes@loc@style{list}}% + {% + \ifthenelse{% + \equal{\Changes@loc@style}{list}\or% + \equal{\Changes@loc@style}{summary}\or% + \equal{\Changes@loc@style}{compactsummary}% + }% + {}% + {% + \PackageWarning{changes}{Wrong style for list of changes: '\Changes@loc@style', using 'list' instead.}% + \def\Changes@loc@style{list}% + }% + }% +% \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} + \def\Changes@heading{\Changes@loc@title} + \ifIsEmpty{\Changes@loc@title}% + {% + \ifthenelse{\equal{\Changes@loc@style}{list}}% + {\def\Changes@heading{\listofchangesname}}{}% + \ifthenelse{\equal{\Changes@loc@style}{summary}}% + {\def\Changes@heading{\summaryofchangesname}}{}% + \ifthenelse{\equal{\Changes@loc@style}{compactsummary}}% + {\def\Changes@heading{\compactsummaryofchangesname}}{}% + }{}% + \section*{\Changes@heading} +% \end{macrocode} +% +% Print list. +% \begin{macrocode} + \ifthenelse{\equal{\Changes@loc@style}{list}}% + {% + \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}% + }% + }{}% +% \end{macrocode} +% Print summary or compact summary. +% \begin{macrocode} + \ifthenelse{\equal{\Changes@loc@style}{summary} \or \equal{\Changes@loc@style}{compactsummary}}% + {% + \IfFileExists{\jobname.\Changes@extension}% + {% + \setboolean{Changes@MoreLines}{true}% + \newread\Changes@InFile% + \openin\Changes@InFile = \jobname.\Changes@extension% + \whiledo{\boolean{Changes@MoreLines}}{% + \read\Changes@InFile to \Changes@Line% + \ifeof\Changes@InFile% + \setboolean{Changes@MoreLines}{false}% + \else% + \expandafter\changes@chopline\Changes@Line\\% + \textbf{% + \ifthenelse{\isColored}% + {\color{\Changes@InColor}}% + {}% + \ifthenelse{\equal{\Changes@InID}{\@empty}}% + {\changesauthorname: \changesanonymousname}% + {% + \changesauthorname: \Changes@InID% + \ifthenelse{\equal{\Changes@InName}{\@empty}}% + {}% + { (\Changes@InName)}% + }% + }\\% + \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% + }{% + \emph{\changesnosoc}% + \PackageWarning{changes}{LaTeX rerun needed for summary of changes}% + }% + }{}% +% \end{macrocode} +% In final mode print nothing. +% \begin{macrocode} + }{}% +} +% \end{macrocode} +% \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 \hologo{LaTeX}-formatted text, so they can simply be read via \chcommand{input}. +% +% 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{% +% \end{macrocode} +% Open output file. +% \begin{macrocode} + \newwrite\Changes@OutFile + \immediate\openout\Changes@OutFile = \jobname.\Changes@extension +% \end{macrocode} +% Redefine expandable of \chcommand{protect} in order to write correct special characters. +% Store original definition for resetting \chcommand{protect}. +% \begin{macrocode} + \let\Changes@protect\protect + \let\protect\@unexpandable@protect +% \end{macrocode} +% Output data for list of changes. +% \begin{macrocode} + \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@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. +% \begin{macrocode} + \immediate\closeout\Changes@OutFile +% \end{macrocode} +% 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} +% +% \begin{macrocode} +%</changes> +% \end{macrocode} +% +% \PrintChanges +% \PrintIndex +% +%\Finale +\endinput diff --git a/macros/latex/contrib/changes/changes.english.pdf b/macros/latex/contrib/changes/changes.english.pdf Binary files differnew file mode 100644 index 0000000000..9c82f24bef --- /dev/null +++ b/macros/latex/contrib/changes/changes.english.pdf diff --git a/macros/latex/contrib/changes/changes.english.withcode.pdf b/macros/latex/contrib/changes/changes.english.withcode.pdf Binary files differnew file mode 100644 index 0000000000..9a7fd6423d --- /dev/null +++ b/macros/latex/contrib/changes/changes.english.withcode.pdf diff --git a/macros/latex/contrib/changes/changes.ins b/macros/latex/contrib/changes/changes.ins new file mode 100644 index 0000000000..46e9854344 --- /dev/null +++ b/macros/latex/contrib/changes/changes.ins @@ -0,0 +1,146 @@ +%% This file creates the needed files from changes.dtx +%% +\def\filedate{2019/01/26} +\def\batchfile{changes.ins} +\input docstrip + +\keepsilent +\askforoverwritefalse + +\preamble + +changes.dtx +Copyright 2007-2019 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 + +\endpreamble + +\postamble +Copyright 2007-2019 Ekkart Kleinod +\endpostamble + +\generate{ + \file{changes.sty}{\from{changes.dtx}{changes}} +% + \file{changes.example.simple.tex}{\from{examples.dtx}{example:simple}} + \file{changes.example.draft.tex}{\from{examples.dtx}{example:draft}} + \file{changes.example.final.tex}{\from{examples.dtx}{example:final}} +% + \file{changes.example.markup.default.tex}{\from{examples.dtx}{example:markup:default}} + \file{changes.example.markup.underlined.tex}{\from{examples.dtx}{example:markup:underlined}} + \file{changes.example.markup.bfit.tex}{\from{examples.dtx}{example:markup:bfit}} + \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.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.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.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}} + \file{changes.example.deletedmarkup.dashuline.tex}{\from{examples.dtx}{example:deletedmarkup:dashuline}} + \file{changes.example.deletedmarkup.dotuline.tex}{\from{examples.dtx}{example:deletedmarkup:dotuline}} + \file{changes.example.deletedmarkup.sout.tex}{\from{examples.dtx}{example:deletedmarkup:sout}} + \file{changes.example.deletedmarkup.xout.tex}{\from{examples.dtx}{example:deletedmarkup:xout}} + \file{changes.example.deletedmarkup.bf.tex}{\from{examples.dtx}{example:deletedmarkup:bf}} + \file{changes.example.deletedmarkup.it.tex}{\from{examples.dtx}{example:deletedmarkup:it}} + \file{changes.example.deletedmarkup.sl.tex}{\from{examples.dtx}{example:deletedmarkup:sl}} + \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}} + \file{changes.example.authormarkup.brackets.tex}{\from{examples.dtx}{example:authormarkup:brackets}} + \file{changes.example.authormarkup.footnote.tex}{\from{examples.dtx}{example:authormarkup:footnote}} + \file{changes.example.authormarkup.none.tex}{\from{examples.dtx}{example:authormarkup:none}} + \file{changes.example.authormarkup.wrong.tex}{\from{examples.dtx}{example:authormarkup:wrong}} +% + \file{changes.example.authormarkupposition.left.tex}{\from{examples.dtx}{example:authormarkupposition:left}} + \file{changes.example.authormarkupposition.right.tex}{\from{examples.dtx}{example:authormarkupposition:right}} + \file{changes.example.authormarkupposition.wrong.tex}{\from{examples.dtx}{example:authormarkupposition:wrong}} +% + \file{changes.example.authormarkuptext.id.tex}{\from{examples.dtx}{example:authormarkuptext:id}} + \file{changes.example.authormarkuptext.name.tex}{\from{examples.dtx}{example:authormarkuptext:name}} + \file{changes.example.authormarkuptext.wrong.tex}{\from{examples.dtx}{example:authormarkuptext:wrong}} +% + \file{changes.example.setauthormarkup.tex}{\from{examples.dtx}{example:setauthormarkup}} + \file{changes.example.setauthormarkupposition.tex}{\from{examples.dtx}{example:setauthormarkupposition}} + \file{changes.example.setauthormarkuptext.tex}{\from{examples.dtx}{example:setauthormarkuptext}} +% + \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.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/macros/latex/contrib/changes/changes.ngerman.pdf b/macros/latex/contrib/changes/changes.ngerman.pdf Binary files differnew file mode 100644 index 0000000000..638fea2946 --- /dev/null +++ b/macros/latex/contrib/changes/changes.ngerman.pdf diff --git a/macros/latex/contrib/changes/example-screenshot.dtx b/macros/latex/contrib/changes/example-screenshot.dtx new file mode 100644 index 0000000000..251b4b5a7c --- /dev/null +++ b/macros/latex/contrib/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/macros/latex/contrib/changes/examples.dtx b/macros/latex/contrib/changes/examples.dtx new file mode 100644 index 0000000000..4b617a95c9 --- /dev/null +++ b/macros/latex/contrib/changes/examples.dtx @@ -0,0 +1,409 @@ +% \iffalse meta-comment +% +% Copyright (C) 2007-2018 +% Ekkart Kleinod (ekleinod@edgesoft.de) +% -------------------------------------------------------------------------- +% +% This work may be distributed and/or modified under the +% conditions of the \LaTeX\ Project Public License, either version~1.3 +% 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{examples.dtx} +% +%^^A -------------------------------------------------------------------------- +% +% Start the \LaTeX document the standard way. +% +% \begin{macrocode} +\documentclass[11pt, a4paper, notitlepage, english]{article} +\usepackage{babel} +% \end{macrocode} +% +% Different package options. +% +% \begin{macrocode} +%<*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: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} +%</example:draft> +%<*example:final> +\usepackage[final]{changes} +%</example:final> +% +%<*example:markup:default> +\usepackage[markup=default]{changes} +%</example:markup:default> +%<*example:markup:underlined> +\usepackage[markup=underlined]{changes} +%</example:markup:underlined> +%<*example:markup:bfit> +\usepackage[markup=bfit]{changes} +%</example:markup:bfit> +%<*example:markup:nocolor> +\usepackage[markup=nocolor]{changes} +%</example:markup:nocolor> +%<*example:markup:wrong> +\usepackage[markup=wrong]{changes} +%</example:markup:wrong> +% +%<*example:addedmarkup:colored> +\usepackage[addedmarkup=colored]{changes} +%</example:addedmarkup:colored> +%<*example:addedmarkup:uline> +\usepackage[addedmarkup=uline]{changes} +%</example:addedmarkup:uline> +%<*example:addedmarkup:uuline> +\usepackage[addedmarkup=uuline]{changes} +%</example:addedmarkup:uuline> +%<*example:addedmarkup:uwave> +\usepackage[addedmarkup=uwave]{changes} +%</example:addedmarkup:uwave> +%<*example:addedmarkup:dashuline> +\usepackage[addedmarkup=dashuline]{changes} +%</example:addedmarkup:dashuline> +%<*example:addedmarkup:dotuline> +\usepackage[addedmarkup=dotuline]{changes} +%</example:addedmarkup:dotuline> +%<*example:addedmarkup:bf> +\usepackage[addedmarkup=bf]{changes} +%</example:addedmarkup:bf> +%<*example:addedmarkup:it> +\usepackage[addedmarkup=it]{changes} +%</example:addedmarkup:it> +%<*example:addedmarkup:sl> +\usepackage[addedmarkup=sl]{changes} +%</example:addedmarkup:sl> +%<*example:addedmarkup:em> +\usepackage[addedmarkup=em]{changes} +%</example:addedmarkup:em> +%<*example:addedmarkup:wrong> +\usepackage[addedmarkup=wrong]{changes} +%</example:addedmarkup:wrong> +% +%<*example:deletedmarkup:colored> +\usepackage[deletedmarkup=colored]{changes} +%</example:deletedmarkup:colored> +%<*example:deletedmarkup:uline> +\usepackage[deletedmarkup=uline]{changes} +%</example:deletedmarkup:uline> +%<*example:deletedmarkup:uuline> +\usepackage[deletedmarkup=uuline]{changes} +%</example:deletedmarkup:uuline> +%<*example:deletedmarkup:uwave> +\usepackage[deletedmarkup=uwave]{changes} +%</example:deletedmarkup:uwave> +%<*example:deletedmarkup:dashuline> +\usepackage[deletedmarkup=dashuline]{changes} +%</example:deletedmarkup:dashuline> +%<*example:deletedmarkup:dotuline> +\usepackage[deletedmarkup=dotuline]{changes} +%</example:deletedmarkup:dotuline> +%<*example:deletedmarkup:sout> +\usepackage[deletedmarkup=sout]{changes} +%</example:deletedmarkup:sout> +%<*example:deletedmarkup:xout> +\usepackage[deletedmarkup=xout]{changes} +%</example:deletedmarkup:xout> +%<*example:deletedmarkup:bf> +\usepackage[deletedmarkup=bf]{changes} +%</example:deletedmarkup:bf> +%<*example:deletedmarkup:it> +\usepackage[deletedmarkup=it]{changes} +%</example:deletedmarkup:it> +%<*example:deletedmarkup:sl> +\usepackage[deletedmarkup=sl]{changes} +%</example:deletedmarkup:sl> +%<*example:deletedmarkup:em> +\usepackage[deletedmarkup=em]{changes} +%</example:deletedmarkup:em> +%<*example:deletedmarkup:wrong> +\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> +%<*example:authormarkup:subscript> +\usepackage[authormarkup=subscript]{changes} +%</example:authormarkup:subscript> +%<*example:authormarkup:brackets> +\usepackage[authormarkup=brackets]{changes} +%</example:authormarkup:brackets> +%<*example:authormarkup:footnote> +\usepackage[authormarkup=footnote]{changes} +%</example:authormarkup:footnote> +%<*example:authormarkup:none> +\usepackage[authormarkup=none]{changes} +%</example:authormarkup:none> +%<*example:authormarkup:wrong> +\usepackage[authormarkup=wrong]{changes} +%</example:authormarkup:wrong> +% +%<*example:authormarkupposition:left> +\usepackage[authormarkupposition=left]{changes} +%</example:authormarkupposition:left> +%<*example:authormarkupposition:right> +\usepackage[authormarkupposition=right]{changes} +%</example:authormarkupposition:right> +%<*example:authormarkupposition:wrong> +\usepackage[authormarkupposition=wrong]{changes} +%</example:authormarkupposition:wrong> +% +%<*example:authormarkuptext:id> +\usepackage[authormarkuptext=id]{changes} +%</example:authormarkuptext:id> +%<*example:authormarkuptext:name> +\usepackage[authormarkuptext=name]{changes} +%</example:authormarkuptext:name> +%<*example:authormarkuptext:wrong> +\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}} +%</example:setauthormarkup> +%<*example:setauthormarkupposition> +\setauthormarkupposition{left} +%</example:setauthormarkupposition> +%<*example:setauthormarkuptext> +\setauthormarkuptext{name} +%</example:setauthormarkuptext> +% +%<*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} +%</example:setsocextension> +% \end{macrocode} +% +% Define some authors. +% +% \begin{macrocode} +\definechangesauthor[color=green]{Green} +\definechangesauthor[name={Mister Orange}, color=orange]{OA} +\definechangesauthor{nochanges} +% \end{macrocode} +% +% This is the document we use, some paragraphs from \texttt{http://slipsum.com/}. +% +% \begin{macrocode} +\begin{document} + + +%<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:settruncatewidth> +%<*example:listofchanges:summary|example:setsummarywidth|example:setsummarytowidth> +\listofchanges[style=summary] +%</example:listofchanges:summary|example:setsummarywidth|example:setsummarytowidth> +%<*example:listofchanges:compactsummary> +\listofchanges[style=compactsummary] +%</example:listofchanges:compactsummary> +%<*example:listofchanges:all> +\listofchanges +\listofchanges[style=summary] +\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> + +\subsection*{Changes by default author} + +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[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. +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 comments} + +Now that we know who you are, I know who I am. +\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, 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... +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} + +Your bones don't break, mine do. +\textbf{That's clear.} +Your cells react to bacteria and viruses differently than mine. +\textsl{You don't get sick, I do.} +That's also clear. +\textit{But for some reason, you and I react the exact same way to water.} +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 diff --git a/macros/latex/contrib/changes/pyMergeChanges.py b/macros/latex/contrib/changes/pyMergeChanges.py new file mode 100644 index 0000000000..37209bdc64 --- /dev/null +++ b/macros/latex/contrib/changes/pyMergeChanges.py @@ -0,0 +1,277 @@ +#!/usr/bin/python +""" + pymergechanges: Merge commits made with changes package into text + Copyright (C) 2018 Y. Cui + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +pymergechanges: Merge commits made with changes package into text + +Requires Python version 3; Tested on Python 3.6.6 + +Supported commands: added, deleted, replaced, highlight +Usage: python pyMergeChanges.py [-arh] <Input File> <Output File> +<Output File> will be overwritten and must be different than <Input File>. +Options: + -a: accept all added, deleted and replaced + -r: reject all added, deleted and replaced + -h: remove all highlights +If no option is given, runs interactively. + +Created on Wed Dec 5 20:28:40 2018 + +""" + +import sys +import re +import codecs + +def parse_param(parstr): + if all(p in parstr for p in ('a', 'r')): + print('You cannot accept and reject at the same time.') + sys.exit(1) + parout = '' + for par in parstr[1:]: + if par == 'a': + print('Accepting all added, deleted and replaced') + parout += 'a' + elif par == 'r': + print('Rejecting all added, deleted and replaced') + parout += 'r' + elif par == 'h': + print('Removing all highlights.') + parout += 'h' + else: + print('Unknown parameter: ' + par) + sys.exit(1) + if not parout: + parout = 'i' + return parout + +def ask1(): # accept, reject, keep, break + if PARAMS == 'i': + while True: + ans = input('[a]ccept or [r]eject or [k]eep or [b]reak ? ').lower() + if ans == 'a': + print('Accepted.') + break + elif ans == 'r': + print('Rejected.') + break + elif ans == 'k': + print('Kept.') + break + elif ans == 'b': + print('Alright.') + break + elif any(p == 'a' for p in PARAMS): + print('Accepted.') + ans = 'a' + elif any(p == 'r' for p in PARAMS): + print('Rejected.') + ans = 'r' + else: + ans = 'k' + return ans + +def ask2(): # remove, keep, break + if PARAMS == 'i': + while True: + ans = input('[r]emove or [k]eep or [b]reak ? ').lower() + if ans == 'r': + print('Removed.') + break + elif ans == 'k': + print('Kept.') + break + elif ans == 'b': + print('Alright.') + break + return ans + elif any(p == 'h' for p in PARAMS): + print('Removed.') + ans = 'r' + else: + print('Kept.') + ans = 'k' + return ans + +def trim_space(line, pos): # trim two consecutive white spaces + if line[pos-1:pos+1] == ' ': + line = line[:pos] + line[pos+1:] + return line + +# BEGIN OF SCRIPT + +if len(sys.argv) not in [3, 4]: + print(__doc__) + sys.exit(1) + +# parse input parameters +if len(sys.argv) == 3: + print('Running in interactive mode. ') + INPUTFILE, OUTPUTFILE = sys.argv[1:] + PARAMS = "i" +if len(sys.argv) == 4: + PARAMLIST, INPUTFILE, OUTPUTFILE = sys.argv[1:] + PARAMS = parse_param(PARAMLIST) + +if INPUTFILE == OUTPUTFILE: + print('Input File and Output File must be different.') + sys.exit(1) + +RE_ADDED = re.compile(r'\\added(\[[^\]]*\]){0,1}\{([^\}]*)\}') +RE_DELETED = re.compile(r'\\deleted(\[[^\]]*\]){0,1}\{([^\}]*)\}') +RE_REPLACED = re.compile(r'\\replaced(\[[^\]]*\]){0,1}\{([^\}]*)\}\{([^\}]*)\}') +RE_HIGHLIGHT = re.compile(r'\\highlight(\[[^\]]*\]){0,1}\{([^\}]*)\}') +RE_COMMENT = re.compile(r'\\comment(\[[^\]]*\]){0,1}\{([^\}]*)\}') + +codecs.open(OUTPUTFILE, mode='w', encoding='utf8').close() +with codecs.open(INPUTFILE, mode='r', encoding='utf8') as fin, \ +codecs.open(OUTPUTFILE, mode='a', encoding='utf8') as fout: + LINE_COUNT = 0 + FLAG_FAST_BREAK = False # if you want to halt merging for some reason + for linein in fin: + if FLAG_FAST_BREAK: + fout.write(linein) + continue + LINE_COUNT += 1 + lineout = linein + matchAdded = RE_ADDED.search(lineout) + matchDeleted = RE_DELETED.search(lineout) + matchReplaced = RE_REPLACED.search(lineout) + matchHighlight = RE_HIGHLIGHT.search(lineout) + matchComment = RE_COMMENT.search(lineout) + flagHasCommit = matchAdded or matchDeleted or matchReplaced or matchHighlight or matchComment + if flagHasCommit: + print('\n******** In Line %i :\n %s' % (LINE_COUNT, lineout)) + next_pos = 0 + while matchAdded: + if FLAG_FAST_BREAK: + break + print('\n** add commit ** \n' + matchAdded.group()) + answer = ask1() + if answer == 'a': + lineout = (lineout[:matchAdded.start(0)] + + matchAdded.group(2) + lineout[matchAdded.end(0):]) + lineout = trim_space(lineout, matchAdded.start(0) + + len(matchAdded.group(2))) + lineout = trim_space(lineout, matchAdded.start(0)) + elif answer == 'r': + lineout = (lineout[:matchAdded.start(0)] + lineout[matchAdded.end(0):]) + lineout = trim_space(lineout, matchAdded.start(0)) + elif answer == 'k': + lineout = lineout + next_pos = matchAdded.end(0) + elif answer == 'b': + FLAG_FAST_BREAK = True + break + matchAdded = RE_ADDED.search(lineout, next_pos) # redo matching for updated text + + next_pos = 0 + while matchDeleted: + if FLAG_FAST_BREAK: + break + print('\n** delete commit ** \n' + matchDeleted.group()) + answer = ask1() + if answer == 'a': + lineout = (lineout[:matchDeleted.start(0)] + lineout[matchDeleted.end(0):]) + lineout = trim_space(lineout, matchDeleted.start(0)) + elif answer == 'r': + lineout = (lineout[:matchDeleted.start(0)] + matchDeleted.group(2) + + lineout[matchDeleted.end(0):]) + elif answer == 'k': + lineout = lineout + next_pos = matchDeleted.end(0) + elif answer == 'b': + FLAG_FAST_BREAK = True + break + matchDeleted = RE_DELETED.search(lineout, next_pos) + + next_pos = 0 + while matchReplaced: + if FLAG_FAST_BREAK: + break + print('\n** replace commit ** \n' + matchReplaced.group()) + answer = ask1() + if answer == 'a': + lineout = (lineout[:matchReplaced.start(0)] + + matchReplaced.group(2) + lineout[matchReplaced.end(0):]) + lineout = trim_space(lineout, matchReplaced.start(0) + + len(matchReplaced.group(2))) + lineout = trim_space(lineout, matchReplaced.start(0)) + elif answer == 'r': + lineout = (lineout[:matchReplaced.start(0)] + + matchReplaced.group(3) + lineout[matchReplaced.end(0):]) + lineout = trim_space(lineout, matchReplaced.start(0) + + len(matchReplaced.group(3))) + lineout = trim_space(lineout, matchReplaced.start(0)) + elif answer == 'k': + lineout = lineout + next_pos = matchReplaced.end(0) + elif answer == 'b': + FLAG_FAST_BREAK = True + break + matchReplaced = RE_REPLACED.search(lineout, next_pos) + + next_pos = 0 + while matchHighlight: + if FLAG_FAST_BREAK: + break + print('\n** highlight commit ** \n' + matchHighlight.group()) + answer = ask2() + if answer == 'r': + lineout = (lineout[:matchHighlight.start(0)] + + matchHighlight.group(2) + lineout[matchHighlight.end(0):]) + lineout = trim_space(lineout, matchHighlight.start(0) + + len(matchHighlight.group(2))) + lineout = trim_space(lineout, matchHighlight.start(0)) + elif answer == 'k': + lineout = lineout + next_pos = matchHighlight.end(0) + elif answer == 'b': + FLAG_FAST_BREAK = True + break + matchHighlight = RE_HIGHLIGHT.search(lineout, next_pos) + + next_pos = 0 + while matchComment: + if FLAG_FAST_BREAK: + break + print('\n** comment commit ** \n' + matchComment.group()) + answer = ask2() + if answer == 'r': + lineout = (lineout[:matchComment.start(0)] + + matchComment.group(2) + lineout[matchComment.end(0):]) + lineout = trim_space(lineout, matchComment.start(0) + + len(matchComment.group(2))) + lineout = trim_space(lineout, matchComment.start(0)) + elif answer == 'k': + lineout = lineout + next_pos = matchComment.end(0) + elif answer == 'b': + FLAG_FAST_BREAK = True + break + matchComment = RE_COMMENT.search(lineout, next_pos) + + if lineout.isspace(): + print('\nResult is empty line and not stored.') + else: + print('\nResult: \n' + lineout + '\n') + fout.write(lineout) + + else: + fout.write(linein) +# +# END OF SCRIPT diff --git a/macros/latex/contrib/changes/userdoc/changes.de.tex b/macros/latex/contrib/changes/userdoc/changes.de.tex new file mode 100644 index 0000000000..f63ad7309d --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/changes.de.tex @@ -0,0 +1,1000 @@ +%^^A ---- introduction +\section{Einleitung} + +Dieses Paket dient dazu, manuelle Änderungsmarkierung zu ermöglichen. + +Verbesserungsvorschläge, Gedanken oder Kritik sind willkommen. +Das Paket wird auf \emph{gitlab} gehalten, bitte gehen Sie zu + +\url{http://edgesoft.de/projects/latex/changes/} + +für Links zum Quellcodezugang, Fehler- und Featuretracker etc. +Wenn Sie mich direkt kontaktieren wollen, mailen Sie bitte an \href{mailto:ekleinod@edgesoft.de}{ekleinod@edgesoft.de}. +Bitte starten Sie Ihr Mail-Subject mit \texttt{[changes]}. + +\begin{quote} + Das changes-Paket dient zur manuellen Markierung von geändertem Text, insbesondere Einfügungen, Löschungen und Ersetzungen. + Der geänderte Text wird farbig markiert und, bei gelöschtem Text, durchgestrichen. + Zusätzlich kann Text hervorgehoben und/oder kommentiert werden. + Das Paket ermöglicht die freie Definition von Autoren und deren zugeordneten Farben. + Es erlaubt zusätzlich die Änderung des Änderungs-, Autor-, Hervorhebungs- und Kommentarmarkups. +\end{quote} + +Ein kurzes Beispiel für Änderungsmarkierung: + +\begin{quote} + Das ist \added[id=EK, comment={fehlendes Wort}]{zugefügter} Text. + In diesem Satz ersetze ich ein \replaced[id=EK]{gutes}{schlechtes} Wort. + Und jetzt noch ein \deleted[id=EK]{schlechtes} Wort zum Löschen. + Text kann auch \highlight[id=EK]{hervorgehoben} oder nur \comment[id=EK]{Aus Spaß!} kommentiert werden. +\end{quote} + +Im gleichen Ordner wie dieses Handbuch befindet sich ein Ordner "`examples"', der eine reichhaltige Auswahl an Anwendungsbeispielen für das Paket und dessen Befehle enthält. +Bitte sehen Sie die Beispiele als Inspiration oder erste Fehlerlösungsquelle an. + + +%^^A ---- usage +\cleardoublepage +\section{Benutzung des \chpackage{changes}-Pakets} +\label{sec:usage} + +In diesem Kapitel wird die Nutzung des \chpackage{changes}-Pakets beschrieben. +Dabei wird ein typischer Anwendungsfall geschildert. +Die ausführliche Beschreibung der Paketoptionen und neuen Befehle finden Sie nicht hier, sondern in \autoref{sec:ui}. + +Ausgangslage ist ein Text, an dem Änderungen vorgenommen werden sollen. +Diese Änderungen sollen markiert werden, und zwar für jeden Autor einzeln. +Eine solche Änderungsmarkierung ist \zB von WYSIWYG-Textprogrammen wie \emph{LibreOffice}, \emph{OpenOffice} oder \emph{Word} bekannt. + +Zu diesem Zweck wurde das \chpackage{changes}-Paket entwickelt. +Das Paket stellt Befehle zur Verfügung, um verschiedene Autoren zu definieren und Text als zugefügt, gelöscht oder geändert zu markieren. +Zusätzlich kann Text hervorgehoben oder kommentiert werden. +Um das Paket zu nutzen, sollten Sie folgende Schritte ausführen: + +\begin{enumerate} + \item \chpackage{changes}-Paket einbinden + \item Autoren definieren + \item Textänderungen markieren + \item Text hervorheben und kommentieren + \item Dokument mit \hologo{LaTeX} setzen + \item Liste von Änderungen anzeigen lassen + \item Markierungen entfernen +\end{enumerate} + +\minisec{\chpackage{changes}-Paket einbinden} + +Um die Änderungsverfolgung zu aktivieren, ist das \chpackage{changes}-Paket wie folgt einzubinden: + +\chinline{usepackage_changes} + +bzw. + +\chinline{usepackage_options_changes} + +Mit den verfügbaren Optionen bestimmen Sie hauptsächlich das Aussehen der Änderungsmarkierungen. +Sie können das Aussehen der Änderungsmarkierungen auch nach Einbinden des \chpackage{changes}-Pakets verändern. + +Für Details lesen Sie bitte \autoref{sec:ui:options} und \autoref{sec:ui:customizingoutput}. + +\minisec{Autoren definieren} + +Das \chpackage{changes}-Paket stellt einen vordefinierten anonymen Autor zur Verfügung. +Wenn Sie jedoch die Änderungen per Autor\_in verfolgen wollen, müssen Sie die entsprechenden Autor\_innen definieren. +Dies geht wie folgt: + +\chinline{definechangesauthor} + +Über die ID werden der/die Autor\_in und die zugehörigen Textänderungen eindeutig identifiziert. +Optional können Sie einen Namen angeben und dem/der Autor\_in eine eigene Farbe zuweisen. + +Für Details lesen Sie bitte \autoref{sec:ui:authormanagement}. + +\minisec{Textänderungen markieren} + +Jetzt ist alles vorbereitet, um den geänderten Text zu markieren. +Benutzen Sie bitte je nach Änderung die folgenden Befehle: + +für neu zugefügten Text: + +\chinline{added} + +für gelöschten Text: + +\chinline{deleted} + +für geänderten Text: + +\chinline{replaced} + +Die Angabe von Autoren-ID und eines Kommentars ist optional. + +Für Details lesen Sie bitte \autoref{sec:ui:changemanagement}. + + +\minisec{Text hervorheben und kommentieren} + +Vielleicht möchten Sie noch Text hervorheben oder kommentieren? + +Text hervorheben: + +\chinline{highlight} + +Text kommentieren: + +\chinline{comment} + +Die Angabe der Autoren-ID und des Kommentars für Hervorhebungen ist optional. + +Für Details lesen Sie bitte \autoref{sec:ui:comment}. + + +\minisec{Dokument mit \hologo{LaTeX} setzen} + +Nachdem Sie die Änderungen im \hologo{LaTeX}-Text markiert haben, können Sie sie im erzeugten Dokument sichtbar machen, indem Sie das Dokument ganz normal übersetzen. +Durch die Übersetzung wird der geänderte Text so markiert, wie Sie das mittels der Optionen bzw.\ speziellen Befehle eingestellt haben. + +\minisec{Liste von Änderungen anzeigen lassen} + +Sie können sich eine Liste der Änderungen ausgeben lassen. +Dies erfolgt mit dem Kommando: + +\chinline{listofchanges} + +Die Ausgabe ist gedacht als Analogon zur Liste von Tabellen oder Abbildungen. + +Die Angabe des Stils ist optional, standardmäßig wird \choption{style=list} gewählt. +Um einen schnellen Überblick über Art und Anzahl der Änderungen abhängig von dem/der Autor\_in zu bekommen, verwenden Sie den Befehl mit der Option \choption{style=summary} oder \choption{style=compactsummary}. +Zeigen Sie nur bestimme Änderungstypen mit der \choption{show}-Option. + +Bei jedem \hologo{LaTeX}-Lauf werden die Daten für diese Liste in eine Hilfsdatei geschrieben. +Beim nächsten \hologo{LaTeX}-Lauf werden dann diese Daten genutzt, um die Änderungsliste anzuzeigen. +Daher sind nach jeder Änderung zwei \hologo{LaTeX}-Läufe notwendig, um eine aktuelle Änderungsliste anzuzeigen. + +Für Details lesen Sie bitte \autoref{sec:ui:overview}. + +\minisec{Markierungen entfernen} + +Oft ist es der Fall, dass die Änderungen eines Dokuments angenommen oder abgelehnt werden und nach diesem Prozess die Änderungsmarkierungen entfernt werden sollen. +Sie können die Ausgabe der Änderungsmarkierungen per Option beim Einbinden des \chpackage{changes}-Pakets unterdrücken: + +\chinline{usepackage_final_changes} + +Die Entfernung der Markierungen aus dem Quelltext müssen Sie von Hand vornehmen, dafür steht auch ein Script von Yvon Cui zur Verfügung. +Das Script liegt im Verzeichnis: + +\chinline[, language=bash]{path_script} + +Das Script entfernt alle Markierungen, indem die Änderungen angenommen oder abgelehnt werden. +Sie können die zu entfernenden Markierungen individuell im interaktiven Modus selektieren bzw.\ selektieren, indem Sie das Skript ohne Optionen starten. + +Das Skript benötigt \emph{python3}. + +Nutzen Sie das Skript wie folgt: + +\chinputlisting{, language=bash}{userdoc/script_pymergechanges} + +Starten Sie das Skript ohne Optionen und Dateien für eine kurze Hilfe: + +\chinputlisting{, language=bash}{userdoc/script_pymergechanges_empty} + +Bekannte Probleme: + +\begin{itemize} + \item entfernt nur Markierungen, die in einer Zeile stehen, Markierungen, die mehrere Zeilen umfassen, werden ignoriert + \item Probleme mit vernesteten Kommandos +\end{itemize} + + + +%^^A ---- limitations +\cleardoublepage +\section{Einschränkungen und Erweiterungsmöglichkeiten} +\label{sec:limitations} + +Das \chpackage{changes}-Paket ist sorgfältig programmiert und getestet worden. +Dennoch kann es vorkommen, dass Fehler im Paket sind, dass die Benutzung problematisch ist oder dass eine Funktion fehlt, die Sie gerne hätten. +In diesem Fall gehen Sie bitte zu + +\url{http://changes.sourceforge.net/} + +Dort finden Sie Links, wie Fehler oder Verbesserungen gemeldet werden können, wie Tips für andere Nutzerinnen angegeben werden können oder wie Sie bei der Entwicklung des Pakets mithelfen können. + +Eine Übersicht über alle mir bekannten Probleme und eventuell vorhandenen Lösungen finden Sie in \autoref{sec:known-problems}. +Bitte sehen Sie dort zunächst nach, ob Ihr Problem schon bekannt ist und es eine Lösung gibt. + +Sie können mir auch eine Mail schreiben an \href{mailto:ekleinod@edgesoft.de}{ekleinod@edgesoft.de}, in diesem Fall starten Sie bitte Ihr Mail-Subject mit \texttt{[changes]}. + +Die Änderungsmarkierung von Text funktioniert recht gut, es können auch ganze Absätze markiert werden. +Die Markierung ist eingeschränkt oder nicht möglich für: + +\begin{itemize} + \item Abbildungen + \item Tabellen + \item Überschriften + \item manche Kommandos + \item mehrere Absätze (manchmal) +\end{itemize} + +Sie können versuchen, solchen Text in eine eigene Datei auszulagern, und diese mit \texttt{input} einzubinden. +Manchmal hilft das, oft ist es einen Versuch wert. +Danke an Charly Arenz für diesen Tip. + + + +%^^A ---- user interface +\cleardoublepage +\section{Die Benutzerschnittstelle des \chpackage{changes}-Pakets} +\label{sec:ui} + +In diesem Kapitel wird die Nutzerschnittstelle des \chpackage{changes}-Pakets vorgestellt, \dh alle Optionen und Kommandos. +Jede Option bzw. jedes neue Kommando werden beschrieben. +Wenn Sie die Optionen und Kommandos im Beispiel sehen wollen, sehen Sie bitte in das Beispielverzeichnis unter + +\chinline[, language=bash]{path_doc_examples} + +Die Beispieldateien sind mit der benutzten Option bzw. dem benutzten Kommando benannt. + +%^^A -- options +\subsection{Paketoptionen} +\label{sec:ui:options} + +\chinline{usepackage_options_changes} + +Die Paketoptionen bestimmen das Verhalten des Gesamtpakets, \dh aller Befehle. + +Die folgenden Optionen sind definiert: + +\localtableofcontents + + + +\subsubsection{draft} + +\chinline{usepackage_draft_changes} + +Die \choption{draft}-Option bewirkt, dass alle Änderungen markiert werden. +Die Änderungsliste kann durch \chcommand{listofchanges} ausgegeben werden. +Diese Option ist automatisch voreingestellt. + +Die Angabe von \choption{draft} in \chcommand{documentclass} wird vom \chpackage{changes}-Paket mitgenutzt. +Die lokale Angabe von \choption{final} überstimmt die Angabe von \choption{draft} in \chcommand{documentclass}. + +\subsubsection{final} + +\chinline{usepackage_final_changes} + +Die \choption{final}-Option bewirkt, dass alle Änderungsmarkierungen ausgeblendet werden und nur noch der korrekte Text ausgegeben wird. +Die Änderungsliste wird ebenfalls unterdrückt. + +Die Angabe von \choption{final} in \chcommand{documentclass} wird vom \chpackage{changes}-Paket mitgenutzt. +Die lokale Angabe von \choption{draft} überstimmt die Angabe von \choption{final} in \chcommand{documentclass}. + +\subsubsection{markup} + +\chinline{usepackage_markup_changes} + +Die \choption{markup}-Option wählt ein vordefiniertes visuelles Markup für geänderten Text. +Das default-Markup wird gewählt, wenn die Option nicht gesetzt wird. +Das mit \choption{markup} gewählte Markup kann mit den spezielleren Optionen \choption{addedmarkup}, \choption{deletedmarkup}, \choption{commentmarkup} oder \choption{highlightmarkup} geändert werden. + +Die folgenden Werte für \emph{markup} sind definiert: +\begin{description} + \item [\choption{default}] default für zugefügten, gelöschten und hervorgehobenen Text sowie Kommentare (default) + \item [\choption{underlined}] zugefügter Text wird unterstrichen, gewellt unterstrichen für Hervorhebungen, default für gelöschten Text sowie Kommentare + \item [\choption{bfit}] fetter zugefügter Text, schräger gelöschter Text, default für hervorgehobenen Text sowie Kommentare + \item [\choption{nocolor}] es werden keine Farben verwendet, zugefügter Text wird unterstrichen, gewellt unterstrichen für Hervorhebungen, default für gelöschten Text sowie Kommentare +\end{description} + +\chexample{usepackage_markup_changes} + +Wenn von farbigem zu nichtfarbigem Markup oder umgekehrt gewechselt wird und eine Hilfsdatei existiert werden einige Kompilierfehler angezeigt. +Über diese ist hinwegzuspringen, beim zweiten Durchlauf sollten die Fehler verschwunden sein. + + +\subsubsection{addedmarkup} + +\chinline{usepackage_addedmarkup_changes} + +Die \choption{addedmarkup}-Option wählt ein vordefiniertes visuelles Markup für zugefügten Text. +Das default-Markup wird gewählt, wenn die Option nicht gesetzt wird. +Die Option \choption{addedmarkup} überschreibt das mit \choption{markup} gewählte Markup. + +Die folgenden Werte für \emph{addedmarkup} sind definiert: +\begin{description} + \item [\choption{colored}] kein Textmarkup, nur farbige Kennzeichnung -- {\color{orange} Beispiel} (default) + \item [\choption{uline}] unterstrichener Text -- \uline{Beispiel} + \item [\choption{uuline}] doppelt unterstrichener Text -- \uuline{Beispiel} + \item [\choption{uwave}] gewellt unterstrichener Text -- \uwave{Beispiel} + \item [\choption{dashuline}] gestrichelt unterstrichener Text -- \dashuline{Beispiel} + \item [\choption{dotuline}] gepunktet unterstrichener Text -- \dotuline{Beispiel} + \item [\choption{bf}] fetter Text -- \textbf{Beispiel} + \item [\choption{it}] italic Text -- \textit{Beispiel} + \item [\choption{sl}] schräger Text -- \textsl{Beispiel} + \item [\choption{em}] hervorgehobener Text -- \emph{Beispiel} +\end{description} + +Die Ausgabe ersetzten Texts ist ein Kombination von zugefügtem und gelöschten Text, daher beeinflusst deren Layoutänderung auch das Layout ersetzen Texts. + +\chexample{usepackage_addedmarkup_changes} + + +\subsubsection{deletedmarkup} +\label{sec:ui:options:deletedmarkup} + +\chinline{usepackage_deletedmarkup_changes} + +Die \choption{addedmarkup}-Option wählt ein vordefiniertes visuelles Markup für zugefügten Text. +Die \choption{deletedmarkup}-Option wählt analog ein vordefiniertes visuelles Markup für gelöschten Text. +Das default-Markup wird gewählt, wenn die Option nicht gesetzt wird. +Die Optionen \choption{addedmarkup} und \choption{deletedmarkup} überschreiben das mit \choption{markup} gewählte Markup. + +Die folgenden Werte für \emph{addedmarkup} sind definiert: + +\begin{description} + \item [\choption{sout}] durchgestrichener Text -- \sout{Beispiel} (default) + \item [\choption{xout}] schräg durchgestrichener Text -- \xout{Beispiel} + \item [\choption{colored}] kein Textmarkup, nur farbige Kennzeichnung -- {\color{orange} Beispiel} + \item [\choption{uline}] unterstrichener Text -- \uline{Beispiel} + \item [\choption{uuline}] doppelt unterstrichener Text -- \uuline{Beispiel} + \item [\choption{uwave}] gewellt unterstrichener Text -- \uwave{Beispiel} + \item [\choption{dashuline}] gestrichelt unterstrichener Text -- \dashuline{Beispiel} + \item [\choption{dotuline}] gepunktet unterstrichener Text -- \dotuline{Beispiel} + \item [\choption{bf}] fetter Text -- \textbf{Beispiel} + \item [\choption{it}] italic Text -- \textit{Beispiel} + \item [\choption{sl}] schräger Text -- \textsl{Beispiel} + \item [\choption{em}] hervorgehobener Text -- \emph{Beispiel} +\end{description} + +Die Ausgabe ersetzten Texts ist ein Kombination von zugefügtem und gelöschten Text, daher beeinflusst deren Layoutänderung auch das Layout ersetzen Texts. + +\chexample{usepackage_deletedmarkup_changes} + + +\subsubsection{highlightmarkup} + +\chinline{usepackage_highlightmarkup_changes} + +Die \choption{highlightmarkup}-Option wählt ein vordefiniertes visuelles Markup für hervorgehobenen Text. +Das default-Markup wird gewählt, wenn die Option nicht gesetzt wird. +Die Option \choption{highlightmarkup} überschreibt das mit \choption{markup} gewählte Markup. + +Die folgenden Werte für \emph{highlightmarkup} sind definiert: + +\begin{description} + \item [\choption{background}] Hervorhebung durch Hintergrundfarbe -- \colorbox{orange!30}{Beispiel} (default) + \item [\choption{uuline}] doppelt unterstrichener Text -- \uuline{Beispiel} + \item [\choption{uwave}] gewellt unterstrichener Text -- \uwave{Beispiel} +\end{description} + +\chexample{usepackage_highlightmarkup_changes} + + +\subsubsection{commentmarkup} + +\chinline{usepackage_commentmarkup_changes} + +Die \choption{commentmarkup}-Option wählt ein vordefiniertes visuelles Markup für Kommentare. +Das default-Markup wird gewählt, wenn die Option nicht gesetzt wird. +Die Option \choption{commentmarkup} überschreibt das mit \choption{markup} gewählte Markup. + +Die folgenden Werte für \emph{commentmarkup} sind definiert: + +\begin{description} + \item [\choption{todo}] Kommentar als ToDo-Notiz, die nicht in der Liste der ToDos erscheint\todo{Beispielkommentar} (default) + \item [\choption{margin}] Kommentar im Seitenrand\marginpar{Beispielkommentar} + \item [\choption{footnote}] Kommentar als Fußnote\footnote{Beispielkommentar} + \item [\choption{uwave}] gewellt unterstrichener Text -- \uwave{Beispielkommentar} +\end{description} + +\chexample{usepackage_commentmarkup_changes} + + +\subsubsection{authormarkup} + +\chinline{usepackage_authormarkup_changes} + +Die \choption{authormarkup}-Option wählt ein vordefiniertes visuelles Markup für die Autor-Identifizierung. +Das default-Markup wird gewählt, wenn die Option nicht gesetzt wird. + +Die folgenden Werte für \emph{authormarkup} sind definiert: + +\begin{description} + \item [\choption{superscript}] hochgestellter Text -- Text\textsuperscript{Autor} (default) + \item [\choption{subscript}] tiefgestellter Text -- Text\textsubscript{Autor} + \item [\choption{brackets}] Text in Klammern -- Text(Autor) + \item [\choption{footnote}] Text in einer Fußnote -- Text\footnote{Autor} + \item [\choption{none}] keine Autor-Identifizierung +\end{description} + +\chexample{usepackage_authormarkup_changes} + + +\subsubsection{authormarkupposition} + +\chinline{usepackage_authormarkupposition_changes} + +Die \choption{authormarkupposition}-Option gibt an, wo die Autor-Identifizierung gesetzt wird. +Der default-Wert wird gewählt, wenn die Option nicht gesetzt wird. + +Die folgenden Werte für \emph{authormarkupposition} sind definiert: + +\begin{description} + \item [\choption{right}] rechts vom Text -- Text\textsuperscript{Autor} (default) + \item [\choption{left}] links vom Text -- \textsuperscript{Autor}Text +\end{description} + +\chexample{usepackage_authormarkupposition_changes} + + +\subsubsection{authormarkuptext} + +\chinline{usepackage_authormarkuptext_changes} + +Die \choption{authormarkuptext}-Option gibt an, was für die Autor-Identifizierung genutzt wird. +Der default-Wert wird gewählt, wenn die Option nicht gesetzt wird. + +Die folgenden Werte für \emph{authormarkuptext} sind definiert: + +\begin{description} + \item [\choption{id}] Autoren-ID -- Text\textsuperscript{ID} (default) + \item [\choption{name}] Autorenname -- Text\textsuperscript{Autorenname} +\end{description} + +\chexample{usepackage_authormarkuptext_changes} + + +\subsubsection{todonotes} + +\chinline{usepackage_todonotes_changes} + +Optionen für das \chpackage{todonotes}-Paket können als Parameter der \choption{todonotes}-Option angegeben werden. +Mehrere Optionen oder Angaben mit Sonderzeichen müssen in geschweifte Klammern gesetzt werden. + +\chexample{usepackage_todonotes_changes} + + + +\subsubsection{truncate} + +\chinline{usepackage_truncate_changes} + +Optionen für das \chpackage{truncate}-Paket können als Parameter der \choption{truncate}-Option angegeben werden. +Mehrere Optionen oder Angaben mit Sonderzeichen müssen in geschweifte Klammern gesetzt werden. + +\chexample{usepackage_truncate_changes} + + + +\subsubsection{ulem} + +\chinline{usepackage_ulem_changes} + +Optionen für das \chpackage{ulem}-Paket können als Parameter der \choption{ulem}-Option angegeben werden. +Mehrere Optionen oder Angaben mit Sonderzeichen müssen in geschweifte Klammern gesetzt werden. + +\chexample{usepackage_ulem_changes} + + + +\subsubsection{xcolor} + +\chinline{usepackage_xcolor_changes} + +Optionen für das \chpackage{xcolor}-Paket können als Parameter der \choption{xcolor}-Option angegeben werden. +Mehrere Optionen oder Angaben mit Sonderzeichen müssen in geschweifte Klammern gesetzt werden. + +\chexample{usepackage_xcolor_changes} + + +%^^A ---- change management + +\subsection{Änderungsmanagement} +\label{sec:ui:changemanagement} + +\localtableofcontents + +\chnewcmd{added} + +\chinline{added} + +Der Befehl \chcommand{added} markiert zugefügten Text. +Der neue Text wird in geschweiften Klammern übergeben. + +Das optionale Argument enthält Key-Value-Paare für die Angabe von Autor-ID sowie eines Kommentars. +Die Autor-ID muss mit einer mit dem \chcommand{definechangesauthor}-Befehl definierten ID übereinstimmen. +Enthält der Kommentar Sonderzeichen oder Leerzeichen, ist er in geschweifte Klammern einzuschließen. + +Wenn ein Kommentar angegeben wurde, wird das direkte Autormarkup am geänderten Text unterdrückt, da es im Kommentar erscheint. + +\chexample{added} +\chresult{added} + + +\chnewcmd{deleted} + +\chinline{deleted} + +Der Befehl \chcommand{deleted} markiert gelöschten Text. +Der gelöschte Text wird in geschweiften Klammern übergeben. + +Optionale Argumente: siehe \chcommand{added} (\autoref{sec:ui:cmd:added}). + +\chexample{deleted} +\chresult{deleted} + + +\chnewcmd{replaced} + +\chinline{replaced} + +Der Befehl \chcommand{replaced} markiert geänderten Text. +Der neue sowie der alte Text werden in dieser Reihenfolge jeweils in geschweiften Klammern übergeben. + +Optionale Argumente: siehe \chcommand{added} (\autoref{sec:ui:cmd:added}). + +Die Ausgabe ersetzten Texts ist ein Kombination von zugefügtem und gelöschten Text, daher beeinflusst deren Layoutänderung auch das Layout ersetzen Texts. + +\chexample{replaced} +\chresult{replaced} + + + +%^^A -- Highlighting and Comments ------------------------------------------------------ +\subsection{Hervorhebungen und Kommentare} +\label{sec:ui:comment} + +\localtableofcontents + +\chnewcmd{highlight} + +\chinline{highlight} + +Der Befehl \chcommand{highlight} markiert hervorgehobenen Text. +Der hervorzuhebende Text wird in geschweiften Klammern übergeben. + +Optionale Argumente: siehe \chcommand{added} (\autoref{sec:ui:cmd:added}). + +\chexample{highlight} +\chresult{highlight} + + +\chnewcmd{comment} + +\chinline{comment} + +Der Befehl \chcommand{comment} fügt dem Dokument einen Kommentar hinzu. +Der Kommentar wird als in geschweiften Klammern übergeben. + +Der Befehl besitzt nur ein optionales Argument: ein Key-Value-Paar für die Angabe der Autor-ID. +Die Autor-ID muss mit einer mit dem \chcommand{definechangesauthor}-Befehl definierten ID übereinstimmen. + +Die Kommentare werden durchnumeriert, die Nummer erscheint im Kommentar. + +\chexample{comment} +\chresult{comment} + + + + + + +%^^A -- Overview of changes +\subsection{Änderungsübersicht} +\label{sec:ui:overview} + + +\chnewcmd{listofchanges} + +\chinline{listofchanges} + +Der Befehl \chcommand{listofchanges} gibt eine Liste oder Zusammenfassung der Änderungen aus. +Im ersten \hologo{LaTeX}-Lauf wird eine Hilfsdatei angelegt, deren Daten im zweiten Durchlauf eingebunden werden. +Für eine aktuelle Liste der Änderungen sind daher zwei \hologo{LaTeX}-Läufe notwendig. + +Es können drei optionale Argumente angegeben werden: + +\begin{description} + \item[\choption{style}] Listenstil + \item[\choption{title}] individueller Titel + \item[\choption{show}] Änderungstypen +\end{description} + +\paragraph{style} +Über das Argument \choption{style} können verschiedene Listenstile für die Anzeige ausgewählt werden. +Es sind folgende drei Stile definiert: + +\begin{description} + \item[\choption{list}] gibt die Änderungsliste wie ein Inhaltsverzeichnis aus (default) + \item[\choption{summary}] gibt die Anzahl der Änderungen gruppiert nach Autor aus + \item[\choption{compactsummary}] wie \choption{summary}, jedoch werden Änderungen mit Anzahl 0 nicht ausgegeben +\end{description} + +\paragraph{title} +Mit dem Argument \choption{title} kann ein eigener Titel für die Änderungsliste angegeben werden. +Wenn Sie Sonderzeichen oder Leerzeichen im Titel benutzen wollen, klammern Sie den Titel geschweift ein. + +\paragraph{show} +Das Argument \choption{show} gibt an, welche Änderungstypen in der Änderungsliste ausgegeben werden. +Sie können die Typen mit Hilfe des Zeichens \texttt{|} kombinieren. +Wenn Sie \zB alle neuen Texte und alle Löschungen anzeigen wollen, geben Sie \texttt{show=added|deleted} an. + +Die folgenden Werte sind definiert: + +\begin{description} + \item[\choption{all}] alle Typen (default) + \item[\choption{added}] nur neue Texte + \item[\choption{deleted}] nur Löschungen + \item[\choption{replaced}] nur Ersetzungen + \item[\choption{highlight}] nur Hervorhebungen + \item[\choption{comment}] nur Kommentare +\end{description} + +\chexample{listofchanges} + + + +%^^A ---- Author management + +\subsection{Autorenverwaltung} +\label{sec:ui:authormanagement} + +\chnewcmd{definechangesauthor} + +\chinline{definechangesauthor} + +Der Befehl \chcommand{definechangesauthor} definiert einen neuen Autor/eine neue Autorin für Änderungen. +Es muss eine eindeutige Autor-ID angegeben werden, die keine Sonder- oder Leerzeichen enthalten darf. + +Optional kann eine Farbe und ein Name angegeben werden. +Wird keine Farbe angegeben, wird blau genutzt. + +Der Name wird in der Änderungsliste sowie im Markup benutzt, im Markup jedoch nur, wenn die entsprechende Option gesetzt ist. + +Das Paket definiert einen anonymen Autor vor, der ohne ID genutzt werden kann. + +\chexample{definechangesauthor} + + +%^^A ---- Adaptation of the output +\subsection{Anpassung der Ausgabe} +\label{sec:ui:customizingoutput} + +\localtableofcontents + +\chnewcmd{setaddedmarkup} + +\chinline{setaddedmarkup} + +Der Befehl \chcommand{setaddedmarkup} legt fest, wie neuer Text ausgezeichnet wird. +Ohne andere Definition gilt, dass der Text farbig oder je nach Option \choption{markup} bzw.\ \choption{addedmarkup} erscheint. + +Werte für die Definition: + +\begin{itemize} + \item beliebige \hologo{LaTeX}-Befehle + \item neuer Text wird mit "`\#1"' genutzt +\end{itemize} + +\chexample{setaddedmarkup} + + +\chnewcmd{setdeletedmarkup} + +\chinline{setdeletedmarkup} + +Der Befehl \chcommand{setdeletedmarkup} legt fest, wie gelöschter Text ausgezeichnet wird. +Ohne andere Definition gilt, dass der Text durchgestrichen wird oder je nach Option \choption{markup} bzw.\ \choption{deletedmarkup} erscheint. + +Werte für die Definition: + +\begin{itemize} + \item beliebige \hologo{LaTeX}-Befehle + \item gelöschter Text wird mit "`\#1"' genutzt +\end{itemize} + +Die Ausgabe ersetzten Texts ist ein Kombination von zugefügtem und gelöschten Text, daher beeinflusst deren Layoutänderung auch das Layout ersetzen Texts. + +\chexample{setdeletedmarkup} + + +\chnewcmd{sethighlightmarkup} + +\chinline{sethighlightmarkup} + +Der Befehl \chcommand{sethighlightmarkup} legt fest, wie hervorgehobene Texte gesetzt werden. +Ohne andere Definition gilt, dass die Hervorhebung über die Hintergrundfarbe erfolgt oder je nach Option \choption{markup} bzw.\ \choption{commentmarkup} erscheint. + +Werte für die Definition: + +\begin{itemize} + \item beliebige \hologo{LaTeX}-Befehle + \item hervorgehobener Text wird mit "`\#1"' genutzt + \item \chpackage{ifthenelse} boolscher Test auf farbigen Text mit ``\chcommand{isColored}'' + \item Autorenfarbe wird mit ``authorcolor'' genutzt +\end{itemize} + +\chexample{sethighlightmarkup} + + +\chnewcmd{setcommentmarkup} + +\chinline{setcommentmarkup} + +Der Befehl \chcommand{setcommentmarkup} legt fest, wie Kommentare gesetzt werden. +Ohne andere Definition gilt, dass Kommentare im Rand oder je nach Option \choption{markup} bzw.\ \choption{commentmarkup} erscheint. + +Werte für die Definition: + +\begin{itemize} + \item beliebige \hologo{LaTeX}-Befehle + \item Kommentar wird mit "`\#1"' genutzt + \item Autor-ID wird mit ``\#2'' genutzt + \item Autor-Ausgabe (ID oder Name) wird mit ``\#3'' genutzt + \item \chpackage{ifthenelse} boolscher Test auf anonymen Autor Text mit ``\chcommand{isAnonymous}'' + \item \chpackage{ifthenelse} boolscher Test auf farbigen Text mit ``\chcommand{isColored}'' + \item Autorenfarbe wird mit ``authorcolor'' genutzt + \item Kommentaranzahl wird mit ``authorcommentcount'' genutzt +\end{itemize} + +\chexample{setcommentmarkup} + + +\chnewcmd{setauthormarkup} + +\chinline{setauthormarkup} + +Der Befehl \chcommand{setauthormarkup} legt fest, wie der Autortext im Text angezeigt wird. +Ohne andere Definition gilt, dass der Autor hochgestellt erscheint. + +Werte für die Definition: + +\begin{itemize} + \item beliebige \hologo{LaTeX}-Befehle + \item Autor-Ausgabe (ID oder Name) wird mit ``\#1'' genutzt +\end{itemize} + +\chexample{setauthormarkup} + + +\chnewcmd{setauthormarkupposition} + +\chinline{setauthormarkupposition} + +Der Befehl \chcommand{setauthormarkupposition} legt fest, auf welcher Seite der Autor im Text angezeigt wird. +Ohne andere Definition gilt, dass der Autor rechts von den Änderungen erscheint. + +Die folgenden Werte für \emph{authormarkupposition} sind definiert: + +\begin{description} + \item [\choption{right}] rechts vom Text -- Text\textsuperscript{Autor} (default) + \item [\choption{left}] links vom Text -- \textsuperscript{Autor}Text +\end{description} + +\chexample{setauthormarkupposition} + + +\chnewcmd{setauthormarkuptext} + +\chinline{setauthormarkuptext} + +Der Befehl \chcommand{setauthormarkuptext} legt fest, welche Information des Autors im Text angezeigt wird. +Ohne andere Definition gilt, dass die Autor-ID genutzt wird. + +Die folgenden Werte für \emph{authormarkuptext} sind definiert: + +\begin{description} + \item [\choption{id}] Autoren-ID -- Text\textsuperscript{ID} (default) + \item [\choption{name}] Autorenname -- Text\textsuperscript{Autorenname} +\end{description} + +\chexample{setauthormarkuptext} + + + +\chnewcmd{settruncatewidth} + +\chinline{settruncatewidth} + +Der Befehl \chcommand{settruncatewidth} legt die Breite der Textkürzung in der Änderungsliste fest. +Die Standardbreite ist \texttt{0.6}\chcommand{textwidth}. + +\chexample{settruncatewidth} + + + +\chnewcmd{setsummarywidth} + +\chinline{setsummarywidth} + +Der Befehl \chcommand{setsummarywidth} legt die Breite der Änderungsliste mit Stil \choption{summary} bzw.\ \choption{compactsummary} fest. +Die Standardbreite ist \texttt{0.3}\chcommand{textwidth}. + +\chexample{setsummarywidth} + + + +\chnewcmd{setsummarytowidth} + +\chinline{setsummarytowidth} + +Der Befehl \chcommand{setsummarytowidth} legt die Breite der Änderungsliste mit Stil \choption{summary} bzw.\ \choption{compactsummary} anhand der Breite des übergebenen Texts fest. + +\chexample{setsummarytowidth} + + + +\chnewcmd{setsocextension} + +\chinline{setsocextension} + +Der Befehl \chcommand{setsocextension} legt die Dateierweiterung der Hilfsdatei für die Änderungszusammenfassung (soc-Datei\footnote{% + "`soc"' steht dabei für "`summary of changes"'. +}) fest. +Ohne andere Definition gilt das Suffix "`\texttt{soc}"'. + +Im angegebenen Beispiel würde für "`\texttt{foo.tex}"' eine Hilfsdatei erzeugt werden, die "`\texttt{foo.changes}"' bzw.\ "`\texttt{foo.chg}"' statt des Standardnamens "`\texttt{foo.soc}"' hieße. + +\chexample{setsocextension} + +\chimportant{Nutzen Sie keine Standard-\hologo{LaTeX}-Dateierweiterungen wie "`toc"' oder "`loc"', da das den normalen \hologo{LaTeX}-Lauf stören würde.} + + +%^^A ---- packages +\subsection{Benötigte Pakete} +\label{sec:ui:packages} + +Das \chpackage{changes}-Paket bindet bereits Pakete ein, die für die Funktion des Pakets notwendig sind. +Eine genauere Beschreibung der einzelnen Pakete ist in der Dokumentation der Pakete selbst zu finden. + +Die folgenden Pakete sind zwingend notwendig und müssen für die Nutzung des \chpackage{changes}-Pakets installiert sein: +\begin{description} + \item [xifthen] stellt eine verbesserte \texttt{if}-Abfrage sowie eine \texttt{while}-Schleife zur Verfügung + \item [xkeyval] Eingabe von Optionen mit Werteübergabe + \item [xstring] verbesserte Stringoperationen +\end{description} + +Die folgenden Pakete sind manchmal notwendig und müssen installiert sein, wenn sie über die entsprechende Option genutzt werden: +\begin{description} + \item [pdfcolmk] wird geladen, wenn farbiger Text genutzt wird (default Markup); löst das Problem farbigen Texts über Seitenumbrüche hinweg (bei pdflatex) + \item [todonotes] wird geladen, wenn Kommentare als ToDo-Notizen gesetzt werden (default Markup) + \item [ulem] wird geladen, wenn Text durchgestrichen oder ausge-x-t wird (default Markup) + \item [xcolor] wird geladen, wenn farbiger Text genutzt wird (default Markup) +\end{description} + + +%^^A ---- Known problems and solutions +\cleardoublepage +\section{Bekannte Probleme und Lösungen} +\label{sec:known-problems} + +In diesem Kapitel sammle ich die häufigsten Probleme und mir dazu bekannte Lösungen. +Wenn Ihr Problem hier nicht aufgeführt ist, sehen Sie bitte im Issue-Tracker auf gitlab nach, ob das Problem dort beschrieben ist (es gibt eine Suche): + +\url{https://gitlab.com/ekleinod/changes/issues} + +Wenn das alles zu nichts führt, öffnen Sie bitte ein neues Issue für das Problem, beschreiben Sie das Problem genau und liefern Sie, wenn möglich, eine kleine Beispieldatei mit dem problematischen Verhalten mit. + +\subsection{Besondere Inhalte} + +Die Änderungsmarkierung von Text funktioniert recht gut, es können auch ganze Absätze markiert werden. +Die Markierung ist eingeschränkt oder nicht möglich für: + +\begin{itemize} + \item Abbildungen + \item Tabellen + \item Überschriften + \item manche Kommandos + \item mehrere Absätze (manchmal) +\end{itemize} + +Sie können versuchen, solchen Text in eine eigene Datei auszulagern, und diese mit \texttt{input} einzubinden. +Manchmal hilft das, oft ist es einen Versuch wert. +Danke an Charly Arenz für diesen Tip. + +\subsection{Fußnoten und Randnotizen} + +Fußnoten oder Randnotizen werden in bestimmten Umgebungen, \zB Tabellen oder der \emph{tabbing}-Umgebung, nicht korrekt gesetzt. +Vermeiden Sie das Markup, wenn Sie diese Umgebungen benutzen. + +\subsection{Das \chpackage{ulem}-Paket} + +Ich verwende standardmäßig das \chpackage{ulem}-Paket für das Durchstreichen von Text. +Das führt bei manchen Befehlen und Umgebungen zu Problemen, \zB + +\begin{itemize} + \item im Mathemodus + \item bei Verwendung des \chpackage{siunitx}-Pakets + \item bei Nutzung der \chcommand{citet}- oder \chcommand{citep}-Befehle +\end{itemize} + +In dem Fall gibt es wenig gute Möglichkeiten, am besten ist es, das Markup für Löschungen selbst zu definieren und das \chpackage{ulem}-Paket zu vermeiden. +Siehe + +\begin{itemize} + \item \autoref{sec:ui:options:deletedmarkup} + \item \autoref{sec:ui:cmd:setdeletedmarkup} +\end{itemize} + +%^^A ---- Authors +\cleardoublepage +\section{Autorinnen und Autoren} +\label{sec:authors} + +Am \chpackage{changes}-Paket haben mehrere Autorinnen und Autoren mitgewirkt. +Viele Probleme wurden in de.comp.text.tex gelöst oder deren Lösung durch Lösungsansätzen inspiriert. +Danke. + +Die Autorinnen und Autoren sind in alphabetischer Reihenfolge: +\begin{itemize} + \item Chiaradonna, Silvano + \item Cui, Yvon + \item Fischer, Ulrike + \item Giovannini, Daniele + \item Kleinod, Ekkart + \item Mittelbach, Frank + \item Voss, Herbert + \item Wölfel, Philipp + \item Wolter, Steve +\end{itemize} + + + +%^^A ---- Versions +\cleardoublepage +\section{Versionen} +\label{sec:versions} + +Für eine Liste der verfügbaren Versionen und deren Änderungen gehen Sie bitte zu + +\url{https://gitlab.com/ekleinod/changes/blob/master/changelog.md} + +Dort sind auch die bereits implementierten aber noch nicht veröffentlichten Änderungen verzeichnet. + +Wenn Sie an geplanten, zukünftigen Änderungen interessiert sind, finden Sie diese unter + +\url{https://gitlab.com/ekleinod/changes/milestones} + + +%^^A ---- copyright, license +\cleardoublepage +\section{Weitergabe, Copyright, Lizenz} + +Copyright 2007-2019 Ekkart Kleinod (\href{mailto:ekleinod@edgesoft.de}{ekleinod@edgesoft.de}) + +Dieses Paket darf unter der "`\hologo{LaTeX} Project Public License"' Version~1.3 oder jeder späteren Version weitergegeben und/oder geändert werden. +Die neueste Version dieser Lizenz steht auf \url{http://www.latex-project.org/lppl.txt} Version~1.3 und spätere Versionen sind Teil aller \hologo{LaTeX}-Distributionen ab Version~2005/12/01. + +Dieses Paket besitzt den Status "`maintained"' (verwaltet). +Der aktuelle Verwalter dieses Pakets ist Ekkart Kleinod. + +Dieses Paket besteht aus den Dateien + +\begin{tabbing} + mm\=\kill + \>\texttt{source/latex/changes/changes.drv}\\ + \>\texttt{source/latex/changes/changes.dtx}\\ + \>\texttt{source/latex/changes/changes.ins}\\ + \>\texttt{source/latex/changes/examples.dtx}\\ + \>\texttt{source/latex/changes/README}\\ + \>\texttt{source/latex/changes/userdoc/*.tex}\\ + + \>\texttt{scripts/changes/pyMergeChanges.py} +\end{tabbing} + + +und den generierten Dateien + +\begin{tabbing} + mm\=\kill + \>\texttt{doc/latex/changes/changes.english.pdf}\\ + \>\texttt{doc/latex/changes/changes.english.withcode.pdf}\\ + \>\texttt{doc/latex/changes/changes.ngerman.pdf}\\ + + \>\texttt{doc/latex/changes/examples/changes.example.*.tex}\\ + \>\texttt{doc/latex/changes/examples/changes.example.*.pdf}\\ + + \>\texttt{tex/latex/changes/changes.sty} +\end{tabbing} + + +%^^A end of user documentation diff --git a/macros/latex/contrib/changes/userdoc/changes.en.tex b/macros/latex/contrib/changes/userdoc/changes.en.tex new file mode 100644 index 0000000000..2a6fb3964a --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/changes.en.tex @@ -0,0 +1,1008 @@ +%^^A ---- introduction +\section{Introduction} + +This package provides means for manual change markup. + +Any comments, thoughts or improvements are welcome. +The package is maintained at \emph{gitlab}, please see + +\url{http://edgesoft.de/projects/latex/changes/} + +for links to source code access, bug and feature tracker, etc. +If you want to contact me directly, please send an email to \href{mailto:ekleinod@edgesoft.de}{ekleinod@edgesoft.de}. +Please start your email subject with \texttt{[changes]}. + +\begin{quote} + The changes-package allows the user to manually markup changes of text, such as additions, deletions, or replacements. + Changed text is shown in a different color; deleted text is striked out. + Additionally, text can be highlighted and/or commented. + The package allows free definition of additional authors and their associated color. + It also allows you to change the markup of changes, authors, highlights or comments. +\end{quote} + +Here is a short example of change markup: + +\begin{quote} + This is \added[id=EK, comment={missing word}]{new} text. + In this sentence, I replace a \replaced[id=EK]{good}{bad} word. + And, to sum up the text changes, there is another \deleted[id=EK]{obsolete} word to delete. + Furthermore, text can be \highlight[id=EK]{highlighted} or just \comment[id=EK]{For the fun of it.}commented. +\end{quote} + +Parallel to this manual is a folder ``examples'' which contains an extensive collection of example files, both \hologo{LaTeX} and PDF files. +Please refer to these examples for inspiration and first problem solving. + + +%^^A ---- usage +\cleardoublepage +\section{Using the \chpackage{changes}-package} +\label{sec:usage} + +In this section a typical use case of the \chpackage{changes}-package is described. +You can find the detailed description of the package options and new commands in \autoref{sec:ui}. + +We start with the text you want to change. +You want to markup the changes for each author individually. +Such a change markup is well-known in WYSIWYG text processors such as \emph{LibreOffice}, \emph{OpenOffice}, or \emph{Word}. + +The \chpackage{changes}-package was developed in order to support such change markup. +The package provides commands for defining authors, and for marking text as added, deleted, or replaced. +Additionally, text can be highlighted or commented. +In order to use the package, you should follow these steps: + +\begin{enumerate} + \item use \chpackage{changes}-package + \item define authors + \item markup text changes + \item highlight and comment text + \item typeset the document with \hologo{LaTeX} + \item output list of changes + \item remove markup +\end{enumerate} + + +\minisec{Use \chpackage{changes}-package} + +In order to activate change management, use the \chpackage{changes}-package as follows: + +\chinline{usepackage_changes} + +respectively + +\chinline{usepackage_options_changes} + +You can use the options for defining the layout of the change markup. +You can change the layout after using the \chpackage{changes}-package as well. + +For detailed information please refer to \autoref{sec:ui:options} and \autoref{sec:ui:customizingoutput}. + + +\minisec{Define authors} + +The \chpackage{changes}-package provides a default anonymous author. +If you want to track your changes depending on the author, you have to define the needed authors as follows: + +\chinline{definechangesauthor} + +Every author is uniquely identified through his or her id. +You can give every author an optional name and/or color. + +For detailed information please refer to \autoref{sec:ui:authormanagement}. + + +\minisec{Markup text changes} + +Now everything is set to markup the changed text. +Please use the following commands according to your change: + +for added text: + +\chinline{added} + +for deleted text: + +\chinline{deleted} + +for replaced text: + +\chinline{replaced} + +Stating the author's id and/or a comment is optional. + +For detailed information please refer to \autoref{sec:ui:changemanagement}. + + +\minisec{Highlight and comment text} + +Maybe you want to highlight orcomment some text? + +highlight text: + +\chinline{highlight} + +comment text: + +\chinline{comment} + +Stating the author's id and/or a comment for highlights is optional. + +For detailed information please refer to \autoref{sec:ui:comment}. + + +\minisec{Typeset the document with \hologo{LaTeX}} + +After marking your changes in the text you are able to display them in the generated document by processing it as usual with \hologo{LaTeX}. +By processing your document the changed text is layouted as you stated by the corresponding options and/or special commands. + +\minisec{Output list of changes} + +You can print a list of changes using: + +\chinline{listofchanges} + +The list is meant to be the analogon to the list of tables, or the list of figures. + +Stating the style is optional, default is \choption{style=list}. +In order to print a quick overview of the number and kind of changes of every author, use the option \choption{style=summary} or \choption{style=compactsummary}. +Show only specific changes by using the \choption{show} option. + +By running \hologo{LaTeX} the data of the list is written into an auxiliary file. +This data is used in the next \hologo{LaTeX} run for typesetting the list of changes. +Therefore, two \hologo{LaTeX} runs are needed after every change in order to typeset an up-to-date list of changes. + +For detailed information please refer to \autoref{sec:ui:overview}. + + +\minisec{Remove markup} + +Often you want to remove the change markup after acknowledging or rejecting the changes. +You can suppress the output of changes with: + +\chinline{usepackage_final_changes} + +In order to remove the markup from the \hologo{LaTeX} files, you have to remove the commands by hand or use the script by Yvon Cui. +You find the script in the directory: + +\chinline[, language=bash]{path_script} + +The script removes all markups either keeping or rejecting the change. +You can select or deselect markup from removal using the interactive mode by starting the script without options. + +The script requires \emph{python3}. + +Use the script as follows: + +\chinputlisting{, language=bash}{userdoc/script_pymergechanges} + +Run the script with no options and files for a short help text: + +\chinputlisting{, language=bash}{userdoc/script_pymergechanges_empty} + +Known issues: + +\begin{itemize} + \item removes only markup that is used in one line, not markup that spans multiple lines + \item problems with nested commands +\end{itemize} + + + + + +%^^A ---- limitations +\cleardoublepage +\section{Limitations and possible enhancements} +\label{sec:limitations} + +The \chpackage{changes}-package was carefully programmed and tested. +Yet the possibility of errors in the package exists, you might encounter problem during use, or you might miss functionality. +In that case, please go to + +\url{http://changes.sourceforge.net/} + +There you find information on how to report errors or improvements, give advice to other users, or participate in the development of the package. + +You can find a list of known problems and possible solutions in \autoref{sec:known-problems}. +Please refer to the section first if your problem is known and is a solution exists. + +You can write me an email too, please send it to \href{mailto:ekleinod@edgesoft.de}{ekleinod@edgesoft.de}. +In that case, please start your email subject with \texttt{[changes]}. + +Change markup of texts works well, it is possible to markup whole paragraphs. +You cannot markup: + +\begin{itemize} + \item figures + \item tables + \item headings + \item some commands + \item several paragraphs (sometimes) +\end{itemize} + +You can try putting such text in an extra file and include in with \texttt{input}. +This works sometimes, give it a try. +Kudos to Charly Arenz for this tip. + + +%^^A ---- user interface +\cleardoublepage +\section{User interface of the \chpackage{changes}-package} +\label{sec:ui} + +This section describes the user interface of the \chpackage{changes}-package, i.e.\ all options and commands of the package. +Every option and new command is described. +If you want to see the options and commands in action, please refer to the examples in + +\chinline[, language=bash]{path_doc_examples} + +The example files are named with the used option respectively command. + +%^^A -- options +\subsection{Package Options} +\label{sec:ui:options} + +\chinline{usepackage_options_changes} + +The package options control the behavior of the overall package, i.\,e.\ all markup commands. + +The following options are defined: + +\localtableofcontents + + + +\subsubsection{draft} + +\chinline{usepackage_draft_changes} + +The \choption{draft}-option enables markup of changes. +The list of changes is available via \chcommand{listofchanges}. +This option is the default option, if no other option is selected. + +The \chpackage{changes} package reuses the declaration of \choption{draft} in \chcommand{documentclass}. +The local declaration of \choption{final} overrules the declaration of \choption{draft} in \chcommand{documentclass}. + +\subsubsection{final} + +\chinline{usepackage_final_changes} + +The \choption{final}-option disables markup of changes, only the correct text will be shown. +The list of changes is disabled, too. + +The \chpackage{changes} package reuses the declaration of \choption{final} in \chcommand{documentclass}. +The local declaration of \choption{draft} overrules the declaration of \choption{final} in \chcommand{documentclass}. + + +\subsubsection{markup} + +\chinline{usepackage_markup_changes} + +The \choption{markup} option chooses a predefined visual markup of changed text. +The default markup is chosen if no explicit markup is given. +The markup chosen with \choption{markup} can be overwritten with the more special markup options \choption{addedmarkup}, \choption{deletedmarkup}, \choption{commentmarkup}, or \choption{highlightmarkup}. + +The following values for \emph{markup} are defined: + +\begin{description} + \item [\choption{default}] default markup for added and deleted text, comments and highlighted text (default markup) + \item [\choption{underlined}] underlined for added text, wavy underlined for highlighted text, default for deleted text, and comments + \item [\choption{bfit}] bold added text, italic deleted text, default for comments and highlighted text + \item [\choption{nocolor}] no colored markup, underlined for added text, wavy underlined for highlighted text, default for deleted text and comments +\end{description} + +\chexample{usepackage_markup_changes} + +When changing from color markup to markup without color and vice versa, some errors occur if an auxiliary file exists. +Please ignore the errors, they vanish in the second run. + +\subsubsection{addedmarkup} + +\chinline{usepackage_addedmarkup_changes} + +The \choption{addedmarkup} option chooses a predefined visual markup of added text. +The default markup is chosen if no explicit markup is given. +The option \choption{addedmarkup} overwrites the markup chosen with \choption{markup}. + +The following values for \emph{addedmarkup} are defined: + +\begin{description} + \item [\choption{colored}] no text markup, just coloring -- {\color{orange} example} (default) + \item [\choption{uline}] underlined text -- \uline{example} + \item [\choption{uuline}] double underlined text -- \uuline{example} + \item [\choption{uwave}] wavy underlined text -- \uwave{example} + \item [\choption{dashuline}] dashed underlined text -- \dashuline{example} + \item [\choption{dotuline}] dotted underlined text -- \dotuline{example} + \item [\choption{bf}] bold text -- \textbf{example} + \item [\choption{it}] italic text -- \textit{example} + \item [\choption{sl}] slanted text -- \textsl{example} + \item [\choption{em}] emphasized text -- \emph{example} +\end{description} + +The output of replaced text is a combination of added and deleted text, thus any change in their layout influences the layout of replaced text. + +\chexample{usepackage_addedmarkup_changes} + + +\subsubsection{deletedmarkup} +\label{sec:ui:options:deletedmarkup} + +\chinline{usepackage_deletedmarkup_changes} + +The \choption{deletedmarkup} option chooses a predefined visual markup of deleted texty. +The default markup is chosen if no explicit markup is given. +The option \choption{deletedmarkup} overwrites the markup chosen with \choption{markup}. + +The following values for \emph{deletedmarkup} are defined: + +\begin{description} + \item [\choption{sout}] striked out text -- \sout{example} (default) + \item [\choption{xout}] crossed out text -- \xout{example} + \item [\choption{colored}] no text markup, just coloring -- {\color{orange} example} + \item [\choption{uline}] underlined text -- \uline{example} + \item [\choption{uuline}] double underlined text -- \uuline{example} + \item [\choption{uwave}] wavy underlined text -- \uwave{example} + \item [\choption{dashuline}] dashed underlined text -- \dashuline{example} + \item [\choption{dotuline}] dotted underlined text -- \dotuline{example} + \item [\choption{bf}] bold text -- \textbf{example} + \item [\choption{it}] italic text -- \textit{example} + \item [\choption{sl}] slanted text -- \textsl{example} + \item [\choption{em}] emphasized text -- \emph{example} +\end{description} + +The output of replaced text is a combination of added and deleted text, thus any change in their layout influences the layout of replaced text. + +\chexample{usepackage_deletedmarkup_changes} + + +\subsubsection{highlightmarkup} + +\chinline{usepackage_highlightmarkup_changes} + +The \choption{highlightmarkup} option chooses a predefined visual markup for highlighted text. +The default markup is chosen if no explicit markup is given. +The option \choption{highlightmarkup} overwrites the markup chosen with \choption{markup}. + +The following values for \emph{highlightmarkup} are defined: + +\begin{description} + \item [\choption{background}] markup by background color -- \colorbox{orange!30}{example} (default) + \item [\choption{uuline}] double underlined text -- \uuline{example} + \item [\choption{uwave}] wavy underlined text -- \uwave{example} +\end{description} + +\chexample{usepackage_highlightmarkup_changes} + + + +\subsubsection{commentmarkup} + +\chinline{usepackage_commentmarkup_changes} + +The \choption{commentmarkup} option chooses a predefined visual markup for comments. +The default markup is chosen if no explicit markup is given. +The option \choption{commentmarkup} overwrites the markup chosen with \choption{markup}. + +The following values for \emph{commentmarkup} are defined: + +\begin{description} + \item [\choption{todo}] comment as todo note, which is not added to list of todos \todo{example comment}(default) + \item [\choption{margin}] comment in margin\marginpar{example comment} + \item [\choption{footnote}] comment as footnote\footnote{example comment} + \item [\choption{uwave}] wavy underlined text -- \uwave{example comment} +\end{description} + +\chexample{usepackage_commentmarkup_changes} + + +\subsubsection{authormarkup} + +\chinline{usepackage_authormarkup_changes} + +The \choption{authormarkup} option chooses a predefined visual markup of the author's identification. +The default markup is chosen if no explicit markup is given. + +The following values for \emph{authormarkup} are defined: + +\begin{description} + \item [\choption{superscript}] superscripted text -- text\textsuperscript{author} (default) + \item [\choption{subscript}] subscripted text -- text\textsubscript{author} + \item [\choption{brackets}] text in brackets -- text(author) + \item [\choption{footnote}] text in footnote -- text\footnote{author} + \item [\choption{none}] no author identification +\end{description} + +\chexample{usepackage_authormarkup_changes} + + +\subsubsection{authormarkupposition} + +\chinline{usepackage_authormarkupposition_changes} + +The \choption{authormarkupposition} option chooses the position of the author's identification. +The default value is chosen if no explicit markup is given. + +The following values for \emph{authormarkupposition} are defined: + +\begin{description} + \item [\choption{right}] right of the text -- text\textsuperscript{author} (default) + \item [\choption{left}] left of the text -- \textsuperscript{author}text +\end{description} + +\chexample{usepackage_authormarkupposition_changes} + + + +\subsubsection{authormarkuptext} + +\chinline{usepackage_authormarkuptext_changes} + +The \choption{authormarkuptext} option chooses the text that is used for the author's identification. +The default value is chosen if no explicit markup is given. + +The following values for \emph{authormarkuptext} are defined: + +\begin{description} + \item [\choption{id}] author's id -- text\textsuperscript{id} (default) + \item [\choption{name}] author's name -- text\textsuperscript{authorname} +\end{description} + +\chexample{usepackage_authormarkuptext_changes} + + +\subsubsection{todonotes} + +\chinline{usepackage_todonotes_changes} + +Options for the \chpackage{todonotes} package can be specified as parameters of the \choption{todonotes}-option. +Several options or options with special characters have to be put in curly brackets. + +\chexample{usepackage_todonotes_changes} + + + +\subsubsection{truncate} + +\chinline{usepackage_truncate_changes} + +Options for the \chpackage{truncate} package can be specified as parameters of the \choption{truncate}-option. +Several options or options with special characters have to be put in curly brackets. + +\chexample{usepackage_truncate_changes} + + +\subsubsection{ulem} + +\chinline{usepackage_ulem_changes} + +Options for the \chpackage{ulem} package can be specified as parameters of the \choption{ulem}-option. +Several options or options with special characters have to be put in curly brackets. + +\chexample{usepackage_ulem_changes} + + +\subsubsection{xcolor} + +\chinline{usepackage_xcolor_changes} + +Options for the \chpackage{xcolor} package can be specified as parameters of the \choption{xcolor}-option. +Several options or options with special characters have to be put in curly brackets. + +\chexample{usepackage_xcolor_changes} + + + +%^^A -- Change management ---------------------------------------------------------- +\subsection{Change management} +\label{sec:ui:changemanagement} + +\localtableofcontents + +\chnewcmd{added} + +\chinline{added} + +The command \chcommand{added} marks newly added text. +The new text is given in curly braces. + +The optional argument contains key-value-pairs for author-id and comment. +The author-id has to be defined using \chcommand{definechangesauthor}. +If the comment contains special characters or spaces, use curly brackets to enclose the comment. + +If a comment is given, the direct author markup at the changes text is omitted, because the author is printed in the comment. + +\chexample{added} +\chresult{added} + + +\chnewcmd{deleted} + +\chinline{deleted} + +The command \chcommand{deleted} marks deleted text. +The deleted text is given in curly braces. + +For the optional arguments see \chcommand{added} (\autoref{sec:ui:cmd:added}). + +\chexample{deleted} +\chresult{deleted} + + + +\chnewcmd{replaced} + +\chinline{replaced} + +The command \chcommand{replaced} marks replaced text. +The new and the replaced text are given in this order in curly braces. + +For the optional arguments see \chcommand{added} (\autoref{sec:ui:cmd:added}). + +The output of replaced text is a combination of added and deleted text, thus any change in their layout influences the layout of replaced text. + +\chexample{replaced} +\chresult{replaced} + + + +%^^A -- Highlighting and Comments ------------------------------------------------------ +\subsection{Highlighting and Comments} +\label{sec:ui:comment} + +\localtableofcontents + +\chnewcmd{highlight} + +\chinline{highlight} + +The command \chcommand{highlight} highlights text. +The highlighted text is given in curly braces. + +For the optional arguments see \chcommand{added} (\autoref{sec:ui:cmd:added}). + +\chexample{highlight} +\chresult{highlight} + + +\chnewcmd{comment} + +\chinline{comment} + +The command \chcommand{comments} adds a comment to the document. +The comment is given in curly braces. + +The command has only one optional argument: a key-value-pair for the author-id. +The author-id has to be defined using \chcommand{definechangesauthor}. + +The comments are numbered automatically, the number is printed in the comment. + +\chexample{comment} +\chresult{comment} + + + + +%^^A -- Overview of changes +\subsection{Overview of changes} +\label{sec:ui:overview} + + +\chnewcmd{listofchanges} + +\chinline{listofchanges} + +The command \chcommand{listofchanges} outputs a list or summary of changes. +The first \hologo{LaTeX}-run creates an auxiliary file, the second run uses the data of this file. +Therefore you need two \hologo{LaTeX}-runs for an up-to-date list of changes. + +There are three optional arguments: + +\begin{description} + \item[\choption{style}] list style + \item[\choption{title}] individual title + \item[\choption{show}] markup types +\end{description} + +\paragraph{style} +The \choption{style} argument defines the layout of the list of changes. +Three styles are defined: + +\begin{description} + \item[\choption{list}] prints the list of changes like a list of figures (default) + \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} + +\paragraph{title} +The \choption{title} argument is used to change the title for the list. +If you want to use special characters or spaces in the title, enclose it in curly braces. + +\paragraph{show} +The \choption{show} argument defines which types of change markup are shown in the list of changes. +You can combine the values using the \texttt{|} character. +For example if you want to show all additions and deletions, use \texttt{show=added|deleted}. + +The following values are defined: + +\begin{description} + \item[\choption{all}] show all types (default) + \item[\choption{added}] show only additions + \item[\choption{deleted}] show only deletions + \item[\choption{replaced}] show only replacements + \item[\choption{highlight}] show only highlights + \item[\choption{comment}] show only comments +\end{description} + +\chexample{listofchanges} + + + +%^^A -- Author management ----------------------------------------------------- +\subsection{Author management} +\label{sec:ui:authormanagement} + +\chnewcmd{definechangesauthor} + +\chinline{definechangesauthor} + +The command \chcommand{definechangesauthor} defines a new author for changes. +You have to define a unique author's id, special characters or spaces are not allowed within the author's id. + +You may define a corresponding color and the author's name. +If you do not define a color, blue is used. + +The author's name is used in the list of changes and in the markup if you set the corresponding option. + +The package predefines one anonymous author without id. + +\chexample{definechangesauthor} + + +%^^A -- Adaptation of the output ----------------------------------------------------- +\subsection{Adaptation of the output} +\label{sec:ui:customizingoutput} + +\localtableofcontents + +\chnewcmd{setaddedmarkup} + +\chinline{setaddedmarkup} + +The command \chcommand{setaddedmarkup} defines the layout of added text. +The default markup is colored text, or the markup set with the option \choption{markup} respectively \choption{addedmarkup}. + +Values for definition: + +\begin{itemize} + \item any \hologo{LaTeX}-commands + \item added text can be used with ``\#1'' +\end{itemize} + +The output of replaced text is a combination of added and deleted text, thus any change in their layout influences the layout of replaced text. + +\chexample{setaddedmarkup} + + +\chnewcmd{setdeletedmarkup} + +\chinline{setdeletedmarkup} + +The command \chcommand{setdeletedmarkup} defines the layout of deleted text. +The default markup is striked-out, or the markup set with the option \choption{markup} respectively \choption{deletedmarkup}. + +Values for definition: + +\begin{itemize} + \item any \hologo{LaTeX}-commands + \item deleted text can be used with ``\#1'' +\end{itemize} + +The output of replaced text is a combination of added and deleted text, thus any change in their layout influences the layout of replaced text. + +\chexample{setdeletedmarkup} + + +\chnewcmd{sethighlightmarkup} + +\chinline{sethighlightmarkup} + +The command \chcommand{sethighlightmarkup} defines the layout of highlighted text. +The default markup is via a background color, or the markup set with the option \choption{markup} respectively \choption{highlightmarkup}. + +Values for definition: + +\begin{itemize} + \item any \hologo{LaTeX}-commands + \item highlighted text can be used with ``\#1'' + \item \chpackage{ifthenelse} boolean test for colored text ``\chcommand{isColored}'' + \item author's color can be used with color ``authorcolor'' +\end{itemize} + +\chexample{sethighlightmarkup} + + +\chnewcmd{setcommentmarkup} + +\chinline{setcommentmarkup} + +The command \chcommand{setcommentmarkup} defines the layout of comments. +The default markup is a margin note, or the markup set with the option \choption{markup} respectively \choption{commentmarkup}. + +Values for definition: + +\begin{itemize} + \item any \hologo{LaTeX}-commands + \item comment can be used with ``\#1'' + \item author's id can be used with ``\#2'' + \item author output (id or name) can be used with ``\#3'' + \item \chpackage{ifthenelse} boolean test for anonymous author ``\chcommand{isAnonymous}'' + \item \chpackage{ifthenelse} boolean test for colored text ``\chcommand{isColored}'' + \item author's color can be used with color ``authorcolor'' + \item comment count of the autor can be used with counter ``authorcommentcount'' +\end{itemize} + +\chexample{setcommentmarkup} + + +\chnewcmd{setauthormarkup} + +\chinline{setauthormarkup} + +The command \chcommand{setauthormarkup} defines the layout of the author's markup in the text. +The default markup is a superscripted author's text. + +Values for definition: + +\begin{itemize} + \item any \hologo{LaTeX}-commands + \item author output (id or name) can be used with ``\#1'' +\end{itemize} + +\chexample{setauthormarkup} + + +\chnewcmd{setauthormarkupposition} + +\chinline{setauthormarkupposition} + +The command \chcommand{setauthormarkupposition} defines the position of the author's markup relative to the changed text. +The default position is right of the changed text. + +The following values for \emph{authormarkupposition} are defined: + +\begin{description} + \item [\choption{right}] right of the text -- text\textsuperscript{author} (default) + \item [\choption{left}] left of the text -- \textsuperscript{author}text +\end{description} + +\chexample{setauthormarkupposition} + + +\chnewcmd{setauthormarkuptext} + +\chinline{setauthormarkuptext} + +The command \chcommand{setauthormarkuptext} defines the text for the author's markup. +The default markup is the author's id. + +The following values for \emph{authormarkuptext} are defined: + +\begin{description} + \item [\choption{id}] author's id -- text\textsuperscript{id} (default) + \item [\choption{name}] author's name -- text\textsuperscript{authorname} +\end{description} + +\chexample{setauthormarkuptext} + + + +\chnewcmd{settruncatewidth} + +\chinline{settruncatewidth} + +The command \chcommand{settruncatewidth} sets the width of the truncation in the list of changes to the given width. +The default width is \texttt{0.6}\chcommand{textwidth}. + +\chexample{settruncatewidth} + + + +\chnewcmd{setsummarywidth} + +\chinline{setsummarywidth} + +The command \chcommand{setsummarywidth} sets the width of the list of changes in summary style to the given width. +The default width is \texttt{0.3}\chcommand{textwidth}. + +\chexample{setsummarywidth} + + + +\chnewcmd{setsummarytowidth} + +\chinline{setsummarytowidth} + +The command \chcommand{setsummarytowidth} sets the width of the list of changes in summary style to the width of the given text. + +\chexample{setsummarytowidth} + + + +\chnewcmd{setsocextension} + +\chinline{setsocextension} + +The command \chcommand{setsocextension} sets the extension of the auxiliary file for the summary of changes (soc-file\footnote{% + ``soc'' stands for ``summary of changes''. +}). +The default extension is ``\texttt{soc}''. + +In the example, the soc-file for ``\texttt{foo.tex}'' would be named ``\texttt{foo.changes}'' resp.\ ``\texttt{foo.chg}'' instead of the default name ``\texttt{foo.soc}''. + +\chexample{setsocextension} + +\chimportant{Do not use a \hologo{LaTeX} standard file extension, such as ``toc'' or ``loc'', as this would collide with the normal \hologo{LaTeX} run.} + + + +%^^A -- packages +\subsection{Used packages} +\label{sec:ui:packages} + +The \chpackage{changes}-package uses already existing packages for it's functions. +You will find detailed description of the packages in their distributions. + +The following packages are always required and have to be installed for the \chpackage{changes}-package: +\begin{description} + \item [xifthen] provides an enhanced \chcommand{if}-command as well as a \texttt{while}-loop + \item [xkeyval] provides options with key-value-pairs + \item [xstring] improves string operations +\end{description} + +The following packages are sometimes required and have to be installed if used by the corresponding option: +\begin{description} + \item [pdfcolmk] loaded if colored text is used for markup (default markup); solves the problem of colored text and page breaks (with pdflatex) + \item [todonotes] loaded if comments are layouted as todo notes (default markup) + \item [ulem] loaded if text has to be striked or exed out (default markup) + \item [xcolor] loaded if colored text is used for markup (default markup) +\end{description} + + +%^^A ---- Known problems and solutions +\cleardoublepage +\section{Known problems and solutions} +\label{sec:known-problems} + +This section contains known problems and their solutions as far as I know some. +If your problem is not listed here, please see the issue tracker on gitlab if it contains your problem (a search exists): + +\url{https://gitlab.com/ekleinod/changes/issues} + +If your problem is not listed, please open a new issue for your problem. +Describe your problem as specific as possible, if possible, include a small example file with the problematic behavior. + +\subsection{Special content} + +Change markup of texts works well, it is possible to markup whole paragraphs. +You cannot markup: + +\begin{itemize} + \item figures + \item tables + \item headings + \item some commands + \item several paragraphs (sometimes) +\end{itemize} + +You can try putting such text in an extra file and include in with \texttt{input}. +This works sometimes, give it a try. +Kudos to Charly Arenz for this tip. + +\subsection{Footnotes and margin notes} + +There is a problem of typesetting footnotes or margin notes in special environments, such as tables or tabbings. +Avoid such markup when using these environments. + + +\subsection{The \chpackage{ulem} package} + +I am using the \chpackage{ulem} package for striking out text as default. +This leads to problems with some commands or environments, e.g. + +\begin{itemize} + \item in math mode + \item when using the \chpackage{siunitx} package + \item when using the \chcommand{citet} or \chcommand{citep} command +\end{itemize} + +In that case there are only a few good solutions, the best way is to avoid using the \chpackage{ulem} package by defining your own deletion markup. +See + +\begin{itemize} + \item \autoref{sec:ui:options:deletedmarkup} + \item \autoref{sec:ui:cmd:setdeletedmarkup} +\end{itemize} + + +%^^A -- Authors ------------------------------------------------------------- +\cleardoublepage +\section{Authors} +\label{sec:authors} + +Several authors contributed to the \chpackage{changes}-package. +Many bugs and problems were solved or their solution inspired via de.comp.text.tex. +Thanks. + +The authors are (in alphabetical order): +\begin{itemize} + \item Chiaradonna, Silvano + \item Cui, Yvon + \item Fischer, Ulrike + \item Giovannini, Daniele + \item Kleinod, Ekkart + \item Mittelbach, Frank + \item Voss, Herbert + \item Wölfel, Philipp + \item Wolter, Steve +\end{itemize} + + + +%^^A -- Versions ------------------------------------------------------------- +\cleardoublepage +\section{Versions} +\label{sec:versions} + +For a list of versions and the changes within these version, please refer to + +\url{https://gitlab.com/ekleinod/changes/blob/master/changelog.md} + +Here you too find the implemented but not released changes for the new version. + +If you are interested in planned new features, please see + +\url{https://gitlab.com/ekleinod/changes/milestones} + + +%^^A ---- copyright, license +\cleardoublepage +\section{Distribution, Copyright, License} + +Copyright 2007-2019 Ekkart Kleinod (\href{mailto:ekleinod@edgesoft.de}{ekleinod@edgesoft.de}) + +This work may be distributed and/or modified under the conditions of the \hologo{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 \hologo{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 + +\begin{tabbing} + mm\=\kill + \>\texttt{source/latex/changes/changes.drv}\\ + \>\texttt{source/latex/changes/changes.dtx}\\ + \>\texttt{source/latex/changes/changes.ins}\\ + \>\texttt{source/latex/changes/examples.dtx}\\ + \>\texttt{source/latex/changes/README}\\ + \>\texttt{source/latex/changes/userdoc/*.tex}\\ + + \>\texttt{scripts/changes/pyMergeChanges.py} +\end{tabbing} + + +and the derived files + +\begin{tabbing} + mm\=\kill + \>\texttt{doc/latex/changes/changes.english.pdf}\\ + \>\texttt{doc/latex/changes/changes.english.withcode.pdf}\\ + \>\texttt{doc/latex/changes/changes.ngerman.pdf}\\ + + \>\texttt{doc/latex/changes/examples/changes.example.*.tex}\\ + \>\texttt{doc/latex/changes/examples/changes.example.*.pdf}\\ + + \>\texttt{tex/latex/changes/changes.sty} +\end{tabbing} + + +%^^A end of user documentation diff --git a/macros/latex/contrib/changes/userdoc/ex_added.tex b/macros/latex/contrib/changes/userdoc/ex_added.tex new file mode 100644 index 0000000000..917cd78746 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_added.tex @@ -0,0 +1,4 @@ +This is \added{new} text. +This is \added[id=EK]{new} text too. +This is more \added[id=EK, comment={has to be in it}]{new} text. +This is the last \added[comment=anonymous]{new} text. diff --git a/macros/latex/contrib/changes/userdoc/ex_comment.tex b/macros/latex/contrib/changes/userdoc/ex_comment.tex new file mode 100644 index 0000000000..2b0655a2c4 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_comment.tex @@ -0,0 +1,2 @@ +This is \comment{Sure}commented text. +This is \comment[id=EK]{Correct.}commented text too. diff --git a/macros/latex/contrib/changes/userdoc/ex_definechangesauthor.tex b/macros/latex/contrib/changes/userdoc/ex_definechangesauthor.tex new file mode 100644 index 0000000000..278fcc6e04 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_definechangesauthor.tex @@ -0,0 +1,4 @@ +\definechangesauthor{EK} +\definechangesauthor[color=orange]{EK} +\definechangesauthor[name={Ekkart Kleinod}]{EK} +\definechangesauthor[name={Ekkart Kleinod}, color=orange]{EK} diff --git a/macros/latex/contrib/changes/userdoc/ex_deleted.tex b/macros/latex/contrib/changes/userdoc/ex_deleted.tex new file mode 100644 index 0000000000..3ae710b378 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_deleted.tex @@ -0,0 +1,4 @@ +This is \deleted{old} text. +This is \deleted[id=EK]{old} text too. +This is more \deleted[id=EK, comment={too old}]{old} text. +This is the last \deleted[comment=away]{old} text. diff --git a/macros/latex/contrib/changes/userdoc/ex_highlight.tex b/macros/latex/contrib/changes/userdoc/ex_highlight.tex new file mode 100644 index 0000000000..f7ae9fcfb5 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_highlight.tex @@ -0,0 +1,4 @@ +This is \highlight{highlighted} text. +This is \highlight[id=EK]{highlighted} text too. +This is more \highlight[id=EK, comment={Good one.}]{highlighted} text. +This is the last \highlight[comment=remember]{highlighted} text. diff --git a/macros/latex/contrib/changes/userdoc/ex_listofchanges.tex b/macros/latex/contrib/changes/userdoc/ex_listofchanges.tex new file mode 100644 index 0000000000..28670de33e --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_listofchanges.tex @@ -0,0 +1,5 @@ +\listofchanges +\listofchanges[style=list] !\Corresponds! \listofchanges +\listofchanges[style=summary, title={My Summary}] +\listofchanges[title={List of comments}, show=comment]} +\listofchanges[style=compactsummary, show=added|deleted|replaced, title={Text changes}]} diff --git a/macros/latex/contrib/changes/userdoc/ex_replaced.tex b/macros/latex/contrib/changes/userdoc/ex_replaced.tex new file mode 100644 index 0000000000..e1040929f7 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_replaced.tex @@ -0,0 +1,4 @@ +This is \replaced{new}{replaced} text. +This is \replaced[id=EK]{new}{replaced} text too. +This is more \replaced[id=EK, comment={better}]{new}{replaced} text. +This is the last \replaced[comment=improved]{new}{replaced} text. diff --git a/macros/latex/contrib/changes/userdoc/ex_setaddedmarkup.tex b/macros/latex/contrib/changes/userdoc/ex_setaddedmarkup.tex new file mode 100644 index 0000000000..49e9386fc3 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_setaddedmarkup.tex @@ -0,0 +1,2 @@ +\setaddedmarkup{\emph{#1}} +\setaddedmarkup{+++: #1} diff --git a/macros/latex/contrib/changes/userdoc/ex_setauthormarkup.tex b/macros/latex/contrib/changes/userdoc/ex_setauthormarkup.tex new file mode 100644 index 0000000000..51592c856b --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_setauthormarkup.tex @@ -0,0 +1,3 @@ +\setauthormarkup{(#1)} +\setauthormarkup{(#1)~--~} +\setauthormarkup{\marginpar{#1}} diff --git a/macros/latex/contrib/changes/userdoc/ex_setauthormarkupposition.tex b/macros/latex/contrib/changes/userdoc/ex_setauthormarkupposition.tex new file mode 100644 index 0000000000..a94425ea8a --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_setauthormarkupposition.tex @@ -0,0 +1,2 @@ +\setauthormarkupposition{right} +\setauthormarkupposition{left} diff --git a/macros/latex/contrib/changes/userdoc/ex_setauthormarkuptext.tex b/macros/latex/contrib/changes/userdoc/ex_setauthormarkuptext.tex new file mode 100644 index 0000000000..f9b15959f5 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_setauthormarkuptext.tex @@ -0,0 +1,2 @@ +\setauthormarkuptext{id} +\setauthormarkuptext{name} diff --git a/macros/latex/contrib/changes/userdoc/ex_setcommentmarkup.tex b/macros/latex/contrib/changes/userdoc/ex_setcommentmarkup.tex new file mode 100644 index 0000000000..121e2d9dc8 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_setcommentmarkup.tex @@ -0,0 +1,4 @@ +\setcommentmarkup{-- #1 --} +\setcommentmarkup{\ifthenelse{\isColored}{\color{authorcolor}}{}#1} +\setcommentmarkup{\ifthenelse{\isAnonymous{#2}}{}{\textbf{#3: }}#1} +\setcommentmarkup{[\arabic{authorcommentcount}] #1} diff --git a/macros/latex/contrib/changes/userdoc/ex_setdeletedmarkup.tex b/macros/latex/contrib/changes/userdoc/ex_setdeletedmarkup.tex new file mode 100644 index 0000000000..f7ed2e2114 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_setdeletedmarkup.tex @@ -0,0 +1,2 @@ +\setdeletedmarkup{\emph{#1}} +\setdeletedmarkup{---: #1} diff --git a/macros/latex/contrib/changes/userdoc/ex_sethighlightmarkup.tex b/macros/latex/contrib/changes/userdoc/ex_sethighlightmarkup.tex new file mode 100644 index 0000000000..e731735ce2 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_sethighlightmarkup.tex @@ -0,0 +1,2 @@ +\sethighlightmarkup{\emph{#1}} +\sethighlightmarkup{\ifthenelse{\isColored}{\color{authorcolor}}{}\#\#: #1} diff --git a/macros/latex/contrib/changes/userdoc/ex_setsocextension.tex b/macros/latex/contrib/changes/userdoc/ex_setsocextension.tex new file mode 100644 index 0000000000..381c411114 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_setsocextension.tex @@ -0,0 +1,2 @@ +\setsocextension{changes} +\setsocextension{chg} diff --git a/macros/latex/contrib/changes/userdoc/ex_setsummarytowidth.tex b/macros/latex/contrib/changes/userdoc/ex_setsummarytowidth.tex new file mode 100644 index 0000000000..ad5a04fe3e --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_setsummarytowidth.tex @@ -0,0 +1,2 @@ +\setsummarytowidth{Highlighted \qquad} +\setsummarytowidth{The longest text you can imagine for the summary.} diff --git a/macros/latex/contrib/changes/userdoc/ex_setsummarywidth.tex b/macros/latex/contrib/changes/userdoc/ex_setsummarywidth.tex new file mode 100644 index 0000000000..75cfda0de5 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_setsummarywidth.tex @@ -0,0 +1,2 @@ +\setsummarywidth{3cm} +\setsummarywidth{.5\textwidth} diff --git a/macros/latex/contrib/changes/userdoc/ex_settruncatewidth.tex b/macros/latex/contrib/changes/userdoc/ex_settruncatewidth.tex new file mode 100644 index 0000000000..e9b76536f6 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_settruncatewidth.tex @@ -0,0 +1,2 @@ +\settruncatewidth{5cm} +\settruncatewidth{.3\textwidth} diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_addedmarkup_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_addedmarkup_changes.tex new file mode 100644 index 0000000000..32a2415bf3 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_addedmarkup_changes.tex @@ -0,0 +1,3 @@ +\usepackage[addedmarkup=colored]{changes} !\Corresponds! \usepackage{changes} +\usepackage[addedmarkup=uline]{changes} +\usepackage[addedmarkup=bf]{changes} diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkup_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkup_changes.tex new file mode 100644 index 0000000000..4008a8f784 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkup_changes.tex @@ -0,0 +1,3 @@ +\usepackage[authormarkup=superscript]{changes} !\Corresponds! \usepackage{changes} +\usepackage[authormarkup=brackets]{changes} +\usepackage[authormarkup=none]{changes} diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkupposition_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkupposition_changes.tex new file mode 100644 index 0000000000..9467a99c55 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkupposition_changes.tex @@ -0,0 +1,2 @@ +\usepackage[authormarkupposition=right]{changes} !\Corresponds! \usepackage{changes} +\usepackage[authormarkupposition=left]{changes} diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkuptext_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkuptext_changes.tex new file mode 100644 index 0000000000..9d07908314 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_authormarkuptext_changes.tex @@ -0,0 +1,2 @@ +\usepackage[authormarkuptext=id]{changes} !\Corresponds! \usepackage{changes} +\usepackage[authormarkuptext=name]{changes} diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_commentmarkup_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_commentmarkup_changes.tex new file mode 100644 index 0000000000..5d590fa14f --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_commentmarkup_changes.tex @@ -0,0 +1,3 @@ +\usepackage[commentmarkup=todo]{changes} !\Corresponds! \usepackage{changes} +\usepackage[commentmarkup=footnote]{changes} +\usepackage[commentmarkup=uwave]{changes} diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_deletedmarkup_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_deletedmarkup_changes.tex new file mode 100644 index 0000000000..474ad61388 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_deletedmarkup_changes.tex @@ -0,0 +1,3 @@ +\usepackage[deletedmarkup=sout]{changes} !\Corresponds! \usepackage{changes} +\usepackage[deletedmarkup=xout]{changes} +\usepackage[deletedmarkup=uwave]{changes} diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_highlightmarkup_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_highlightmarkup_changes.tex new file mode 100644 index 0000000000..282d033540 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_highlightmarkup_changes.tex @@ -0,0 +1,2 @@ +\usepackage[highlightmarkup=background]{changes} !\Corresponds! \usepackage{changes} +\usepackage[highlightmarkup=uuline]{changes} diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_markup_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_markup_changes.tex new file mode 100644 index 0000000000..897656139c --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_markup_changes.tex @@ -0,0 +1,4 @@ +\usepackage[markup=default]{changes} !\Corresponds! \usepackage{changes} +\usepackage[markup=underlined]{changes} +\usepackage[markup=bfit]{changes} +\usepackage[markup=nocolor]{changes} diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_todonotes_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_todonotes_changes.tex new file mode 100644 index 0000000000..be450838ed --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_todonotes_changes.tex @@ -0,0 +1 @@ +\usepackage[todonotes={textsize=tiny}]{changes} diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_truncate_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_truncate_changes.tex new file mode 100644 index 0000000000..075ec61a80 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_truncate_changes.tex @@ -0,0 +1 @@ +\usepackage[truncate=hyphenate]{changes} diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_ulem_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_ulem_changes.tex new file mode 100644 index 0000000000..54aba86502 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_ulem_changes.tex @@ -0,0 +1,2 @@ +\usepackage[ulem=UWforbf]{changes} +\usepackage[ulem={normalem,normalbf}]{changes} diff --git a/macros/latex/contrib/changes/userdoc/ex_usepackage_xcolor_changes.tex b/macros/latex/contrib/changes/userdoc/ex_usepackage_xcolor_changes.tex new file mode 100644 index 0000000000..36409ef3e4 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/ex_usepackage_xcolor_changes.tex @@ -0,0 +1,2 @@ +\usepackage[xcolor=dvipdf]{changes} +\usepackage[xcolor={dvipdf,gray}]{changes} diff --git a/macros/latex/contrib/changes/userdoc/in_added.tex b/macros/latex/contrib/changes/userdoc/in_added.tex new file mode 100644 index 0000000000..0bd19a7a55 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_added.tex @@ -0,0 +1 @@ +\added[id=<id>, comment=<comment>]{<new text>} diff --git a/macros/latex/contrib/changes/userdoc/in_comment.tex b/macros/latex/contrib/changes/userdoc/in_comment.tex new file mode 100644 index 0000000000..851b22f22f --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_comment.tex @@ -0,0 +1 @@ +\comment[id=<id>]{<comment>} diff --git a/macros/latex/contrib/changes/userdoc/in_definechangesauthor.tex b/macros/latex/contrib/changes/userdoc/in_definechangesauthor.tex new file mode 100644 index 0000000000..196c911dec --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_definechangesauthor.tex @@ -0,0 +1 @@ +\definechangesauthor[name=<name>, color=<color>]{<id>} diff --git a/macros/latex/contrib/changes/userdoc/in_deleted.tex b/macros/latex/contrib/changes/userdoc/in_deleted.tex new file mode 100644 index 0000000000..0a6b6fa444 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_deleted.tex @@ -0,0 +1 @@ +\deleted[id=<id>, comment=<comment>]{<old text>} diff --git a/macros/latex/contrib/changes/userdoc/in_highlight.tex b/macros/latex/contrib/changes/userdoc/in_highlight.tex new file mode 100644 index 0000000000..ef6a26c546 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_highlight.tex @@ -0,0 +1 @@ +\highlight[id=<id>, comment=<comment>]{<text>} diff --git a/macros/latex/contrib/changes/userdoc/in_listofchanges.tex b/macros/latex/contrib/changes/userdoc/in_listofchanges.tex new file mode 100644 index 0000000000..62eed33347 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_listofchanges.tex @@ -0,0 +1 @@ +\listofchanges[style=<style>, title=<title>, show=<type>] diff --git a/macros/latex/contrib/changes/userdoc/in_path_doc_examples.tex b/macros/latex/contrib/changes/userdoc/in_path_doc_examples.tex new file mode 100644 index 0000000000..ebd4eab862 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_path_doc_examples.tex @@ -0,0 +1 @@ +<texpath>/doc/latex/changes/examples/ diff --git a/macros/latex/contrib/changes/userdoc/in_path_script.tex b/macros/latex/contrib/changes/userdoc/in_path_script.tex new file mode 100644 index 0000000000..fe17199aed --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_path_script.tex @@ -0,0 +1 @@ +<texpath>/scripts/changes/ diff --git a/macros/latex/contrib/changes/userdoc/in_replaced.tex b/macros/latex/contrib/changes/userdoc/in_replaced.tex new file mode 100644 index 0000000000..3c51087abf --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_replaced.tex @@ -0,0 +1 @@ +\replaced[id=<id>, comment=<comment>]{<new text>}{<old text>} diff --git a/macros/latex/contrib/changes/userdoc/in_setaddedmarkup.tex b/macros/latex/contrib/changes/userdoc/in_setaddedmarkup.tex new file mode 100644 index 0000000000..b0038e3640 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_setaddedmarkup.tex @@ -0,0 +1 @@ +\setaddedmarkup{<definition>} diff --git a/macros/latex/contrib/changes/userdoc/in_setauthormarkup.tex b/macros/latex/contrib/changes/userdoc/in_setauthormarkup.tex new file mode 100644 index 0000000000..b5f1edba8b --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_setauthormarkup.tex @@ -0,0 +1 @@ +\setauthormarkup{<definition>} diff --git a/macros/latex/contrib/changes/userdoc/in_setauthormarkupposition.tex b/macros/latex/contrib/changes/userdoc/in_setauthormarkupposition.tex new file mode 100644 index 0000000000..d66708d743 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_setauthormarkupposition.tex @@ -0,0 +1 @@ +\setauthormarkupposition{<authormarkupposition>} diff --git a/macros/latex/contrib/changes/userdoc/in_setauthormarkuptext.tex b/macros/latex/contrib/changes/userdoc/in_setauthormarkuptext.tex new file mode 100644 index 0000000000..bcb95276bd --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_setauthormarkuptext.tex @@ -0,0 +1 @@ +\setauthormarkuptext{<authormarkuptext>} diff --git a/macros/latex/contrib/changes/userdoc/in_setcommentmarkup.tex b/macros/latex/contrib/changes/userdoc/in_setcommentmarkup.tex new file mode 100644 index 0000000000..ad8bd1bba1 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_setcommentmarkup.tex @@ -0,0 +1 @@ +\setcommentmarkup{<definition>} diff --git a/macros/latex/contrib/changes/userdoc/in_setdeletedmarkup.tex b/macros/latex/contrib/changes/userdoc/in_setdeletedmarkup.tex new file mode 100644 index 0000000000..41f404cd9c --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_setdeletedmarkup.tex @@ -0,0 +1 @@ +\setdeletedmarkup{<definition>} diff --git a/macros/latex/contrib/changes/userdoc/in_sethighlightmarkup.tex b/macros/latex/contrib/changes/userdoc/in_sethighlightmarkup.tex new file mode 100644 index 0000000000..b67cec700a --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_sethighlightmarkup.tex @@ -0,0 +1 @@ +\sethighlightmarkup{<definition>} diff --git a/macros/latex/contrib/changes/userdoc/in_setsocextension.tex b/macros/latex/contrib/changes/userdoc/in_setsocextension.tex new file mode 100644 index 0000000000..d0d3339e82 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_setsocextension.tex @@ -0,0 +1 @@ +\setsocextension{<extension>} diff --git a/macros/latex/contrib/changes/userdoc/in_setsummarytowidth.tex b/macros/latex/contrib/changes/userdoc/in_setsummarytowidth.tex new file mode 100644 index 0000000000..25238fc21a --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_setsummarytowidth.tex @@ -0,0 +1 @@ +\setsummarytowidth{<text>} diff --git a/macros/latex/contrib/changes/userdoc/in_setsummarywidth.tex b/macros/latex/contrib/changes/userdoc/in_setsummarywidth.tex new file mode 100644 index 0000000000..4d84a18bf1 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_setsummarywidth.tex @@ -0,0 +1 @@ +\setsummarywidth{<width>} diff --git a/macros/latex/contrib/changes/userdoc/in_settruncatewidth.tex b/macros/latex/contrib/changes/userdoc/in_settruncatewidth.tex new file mode 100644 index 0000000000..c6de5edfb6 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_settruncatewidth.tex @@ -0,0 +1 @@ +\settruncatewidth{<width>} diff --git a/macros/latex/contrib/changes/userdoc/in_usepackage_addedmarkup_changes.tex b/macros/latex/contrib/changes/userdoc/in_usepackage_addedmarkup_changes.tex new file mode 100644 index 0000000000..ffeb96ce16 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_usepackage_addedmarkup_changes.tex @@ -0,0 +1 @@ +\usepackage[addedmarkup=<addedmarkup>]{changes} diff --git a/macros/latex/contrib/changes/userdoc/in_usepackage_authormarkup_changes.tex b/macros/latex/contrib/changes/userdoc/in_usepackage_authormarkup_changes.tex new file mode 100644 index 0000000000..b02ea84a5f --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_usepackage_authormarkup_changes.tex @@ -0,0 +1 @@ +\usepackage[authormarkup=<authormarkup>]{changes} diff --git a/macros/latex/contrib/changes/userdoc/in_usepackage_authormarkupposition_changes.tex b/macros/latex/contrib/changes/userdoc/in_usepackage_authormarkupposition_changes.tex new file mode 100644 index 0000000000..a031eda5e9 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_usepackage_authormarkupposition_changes.tex @@ -0,0 +1 @@ +\usepackage[authormarkupposition=<authormarkupposition>]{changes} diff --git a/macros/latex/contrib/changes/userdoc/in_usepackage_authormarkuptext_changes.tex b/macros/latex/contrib/changes/userdoc/in_usepackage_authormarkuptext_changes.tex new file mode 100644 index 0000000000..e824e626f0 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_usepackage_authormarkuptext_changes.tex @@ -0,0 +1 @@ +\usepackage[authormarkuptext=<authormarkuptext>]{changes} diff --git a/macros/latex/contrib/changes/userdoc/in_usepackage_changes.tex b/macros/latex/contrib/changes/userdoc/in_usepackage_changes.tex new file mode 100644 index 0000000000..0f542f61dc --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_usepackage_changes.tex @@ -0,0 +1 @@ +\usepackage{changes} diff --git a/macros/latex/contrib/changes/userdoc/in_usepackage_commentmarkup_changes.tex b/macros/latex/contrib/changes/userdoc/in_usepackage_commentmarkup_changes.tex new file mode 100644 index 0000000000..6f92a4bccd --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_usepackage_commentmarkup_changes.tex @@ -0,0 +1 @@ +\usepackage[commentmarkup=<commentmarkup>]{changes} diff --git a/macros/latex/contrib/changes/userdoc/in_usepackage_deletedmarkup_changes.tex b/macros/latex/contrib/changes/userdoc/in_usepackage_deletedmarkup_changes.tex new file mode 100644 index 0000000000..4678399b55 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_usepackage_deletedmarkup_changes.tex @@ -0,0 +1 @@ +\usepackage[deletedmarkup=<deletedmarkup>]{changes} diff --git a/macros/latex/contrib/changes/userdoc/in_usepackage_draft_changes.tex b/macros/latex/contrib/changes/userdoc/in_usepackage_draft_changes.tex new file mode 100644 index 0000000000..5d6c17eea2 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_usepackage_draft_changes.tex @@ -0,0 +1 @@ +\usepackage[draft]{changes} !\Corresponds! \usepackage{changes} diff --git a/macros/latex/contrib/changes/userdoc/in_usepackage_final_changes.tex b/macros/latex/contrib/changes/userdoc/in_usepackage_final_changes.tex new file mode 100644 index 0000000000..50e96e334c --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_usepackage_final_changes.tex @@ -0,0 +1 @@ +\usepackage[final]{changes} diff --git a/macros/latex/contrib/changes/userdoc/in_usepackage_highlightmarkup_changes.tex b/macros/latex/contrib/changes/userdoc/in_usepackage_highlightmarkup_changes.tex new file mode 100644 index 0000000000..b834ac3fee --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_usepackage_highlightmarkup_changes.tex @@ -0,0 +1 @@ +\usepackage[highlightmarkup=<highlightmarkup>]{changes} diff --git a/macros/latex/contrib/changes/userdoc/in_usepackage_markup_changes.tex b/macros/latex/contrib/changes/userdoc/in_usepackage_markup_changes.tex new file mode 100644 index 0000000000..0b1b3e4e45 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_usepackage_markup_changes.tex @@ -0,0 +1 @@ +\usepackage[markup=<markup>]{changes} diff --git a/macros/latex/contrib/changes/userdoc/in_usepackage_options_changes.tex b/macros/latex/contrib/changes/userdoc/in_usepackage_options_changes.tex new file mode 100644 index 0000000000..6adf76a9dc --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_usepackage_options_changes.tex @@ -0,0 +1 @@ +\usepackage[<options>]{changes} diff --git a/macros/latex/contrib/changes/userdoc/in_usepackage_todonotes_changes.tex b/macros/latex/contrib/changes/userdoc/in_usepackage_todonotes_changes.tex new file mode 100644 index 0000000000..4761059b90 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_usepackage_todonotes_changes.tex @@ -0,0 +1 @@ +\usepackage[todonotes=<options>]{changes} diff --git a/macros/latex/contrib/changes/userdoc/in_usepackage_truncate_changes.tex b/macros/latex/contrib/changes/userdoc/in_usepackage_truncate_changes.tex new file mode 100644 index 0000000000..4afeb2fa49 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_usepackage_truncate_changes.tex @@ -0,0 +1 @@ +\usepackage[truncate=<options>]{changes} diff --git a/macros/latex/contrib/changes/userdoc/in_usepackage_ulem_changes.tex b/macros/latex/contrib/changes/userdoc/in_usepackage_ulem_changes.tex new file mode 100644 index 0000000000..ea60df8a49 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_usepackage_ulem_changes.tex @@ -0,0 +1 @@ +\usepackage[ulem=<options>]{changes} diff --git a/macros/latex/contrib/changes/userdoc/in_usepackage_xcolor_changes.tex b/macros/latex/contrib/changes/userdoc/in_usepackage_xcolor_changes.tex new file mode 100644 index 0000000000..6a99177d82 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/in_usepackage_xcolor_changes.tex @@ -0,0 +1 @@ +\usepackage[xcolor=<options>]{changes} diff --git a/macros/latex/contrib/changes/userdoc/script_pymergechanges.tex b/macros/latex/contrib/changes/userdoc/script_pymergechanges.tex new file mode 100644 index 0000000000..7c677fa4ab --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/script_pymergechanges.tex @@ -0,0 +1,6 @@ +python pyMergeChanges.py [-arh] <Input File> <Output File> +Options: + -a: accept all added, deleted and replaced + -r: reject all added, deleted and replaced + -h: remove all highlights +If no option is given, runs interactively. diff --git a/macros/latex/contrib/changes/userdoc/script_pymergechanges_empty.tex b/macros/latex/contrib/changes/userdoc/script_pymergechanges_empty.tex new file mode 100644 index 0000000000..7715bb0989 --- /dev/null +++ b/macros/latex/contrib/changes/userdoc/script_pymergechanges_empty.tex @@ -0,0 +1 @@ +python pyMergeChanges.py |