Path: blob/main/tests/docs/manuscript/qmd-full/trackchanges.sty
3588 views
%%1%% This file is part of TrackChanges2%% Copyright 2006-20093%% Novimir Antoniuk Pablant <[email protected]>4%% Felix Salfner <[email protected]>5%%6%% http://trackchanges.sourceforge.net/7%%8%% Portions of this code adapted from the 'soul' package.9%% Copyright (C) 1998-2003 Melchior FRANZ10%%11%% TrackChanges is free software: you can redistribute it and/or modify12%% it under the terms of the GNU General Public License as published by13%% the Free Software Foundation, either version 2 of the License, or14%% (at your option) any later version.15%%16%% TrackChanges is distributed in the hope that it will be useful,17%% but WITHOUT ANY WARRANTY; without even the implied warranty of18%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the19%% GNU General Public License for more details.20%%21%% You should have received a copy of the GNU General Public License22%% along with TrackChanges. If not, see <http://www.gnu.org/licenses/>.23%%24%%25%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%26%% trackchanges.sty27%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%28%% A graphical interface has been written to allow the changes made29%% using this style file to be interactively accepted, rejected30%% or changed.31%% trackchanges.py32%%33%% To find the latest versions this latex style file and the34%% associated files file go to:35%% http://trackchanges.sourceforge.net/36%%37%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%38%% Usage:39%%40%% Help files are included as part of this package:41%% ./documentation/web/html_css/help.html42%%43%% TrackChanges adds the following 5 commands to allow for collaborative44%% editing of LaTeX documents.45%%46%% \add[editor]{text to add}47%% \remove[editor]{text to remove}48%% \change[editor]{text to remove}{text to add}49%% \annote[editor]{text to annotate}{note}50%% \note[editor]{note}51%%52%% In all cases 'editor' is optional.53%%54%% In order to have comments color coded by editor, the editors must55%% be added in the preamble.56%%57%% \addeditor{editor}58%%59%%60%% Options61%%62%% There are 5 display options. These are specified with the63%% \usepackage[options]{trackchanges)64%%65%% finalold66%% Ignore all of the edits.67%% The document will look as if the edits had not been added.68%% finalnew69%% Accept all of the edits.70%% Notes will not be shown in the final output.71%% footnotes72%% Added text will be shown inline. Removed text and notes73%% will be shown as footnotes.74%% This is the default option.75%% margins76%% Added text will be shown inline. Removed text and notes77%% will be shown in the margin.78%% Margin notes will be aligned with the edits when possible.79%% inline80%% All edits will be shown inline.81%%82%% The following two options are to be used with the 'margins'83%% display style. They are used to make more space for the margin84%% notes. By default the margins are left as in the original85%% document.86%%87%% movemargins88%% Move the text over to the left hand side.89%% The textwidth will stay the same.90%% adjustmargins91%% Reduce the textwidth and move the text over to the left92%% hand side.This option will produced the most space for93%% the margin notes.94%%95%%96%% Advanced Usage97%%98%% Certain types of commands cannot be used inside of the TrackChanges99%% edit commands without special handling. For more details see100%% the limitations section.101%%102%% This option can be used to deal with incompatible commands.103%%104%% ignoremode105%%106%% Additional commands can be added to the ignore list with the107%% following command.108%%109%% \tcignore{<command name>}{<num args>}{<arg num to pass>}110%%111%% The last argument specifies which, if any, arguments to pass112%% as plain text when the command is ignored. If the last113%% argument is zero, then all of the arguments will be ignored.114%% If \color and \textcolor were not already on the ignore115%% list then the following commands could be used to add them:116%%117%% \tcignore{\textcolor}{2}{2}118%% \tcignore{\color}{1}{0}119%%120%%121%% TrackChanges also requires special handling for font changing122%% commands. These type of commands may have to be registered123%% with track changes to be dealt with properly. To register a124%% new command use the following command.125%%126%% \tcregister{<command name>}{<num args>}127%%128%% All of the standard font switching command are registered by129%% default. If \bf and \emph were not already registered then130%% the following commands could be used to add them:131%%132%% \tcregister{\bf}{0}133%% \tcregister{\emph}{1}134%%135%% While register commands is primarily for font changing it may136%% work for other types of commands that are causing problems.137%%138%%139%%140%% Limitations141%%142%% - If another package is used that adjusts the margins, it143%% can take precedence over the TrackChanges handling.144%% To make sure TrackChanges has the last word, load it145%% after all other margin related packages.146%%147%% - Incompatable with the package 'ulem'148%% Use the package 'soul' instead for underlining/strikeout.149%%150%% - TrackChanges cannot handle certain kinds of commands inside151%% the edit commands. In particular \color, \textcolor and152%% any commands from the underlining package 'soul' will not work.153%% There are two ways to get around these issues.154%% 1. The 'ignoremode' option can be used.155%% This will tell TrackChanges to ignore certain commands156%% (Including the ones mentioned above).157%% Additional commands can be added to the ignore list with158%% the \tcignore command.159%% 2. Sometimes the problematic commands can be preceded by160%% \protect. This however can have strange behavior.161%%162%% - TrackChanges requires special handling for certain kinds of163%% commands inside of edit commands. These problematic commands164%% are generally font switching commands. All of the common165%% font switching commands (such as \emph, \textbf, etc.)166%% are already handled. If you run into an issue you can try167%% using \tcregister to register the problematic command.168%%169%% - No easy way to tell TrackChanges not to split footnotes170%% across multiple pages.171%%172%% - Some other packages that take over footnote handling may be173%% incompatible with TrackChanges. Using a footnote package174%% such as footmisc may fix these problems.175%%176%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%177%% trackchanges version 0.6, 2007-06-13178%% written by Felix Salfner179%%180%% trackchanges version 0.7, 2009-03-09181%% rewritten by Novimir Pablant182%%183%% version 0.7.0, 2009-04-22 - Novimir Pablant184%% Overhauled how the editors are set up. Now each editor can be185%% added simply by using the /addeditor{name} command.186%% Color system completely overhauled, now uses the 'soul' package.187%% Added margin commands 'movemargins' and 'adjustmargins'.188%% Added an option ignoremode and a reimplementation of portions189%% of 'soul' to allow commands to be ignored inside edits.190%% Commands \tcignore and \tcregister were added.191%% Added depreciation warnings for TrackChanges v0.6 commands.192%% Numerous other internal changes.193%%194%%195%% ---------------------------------------------------------------------196%% To do:197%% - Add ability to set custom colors.198%%199%% - Create a better way of adding editors that does not have a200%% five editor limit.201%%202%% - Check if the package 'ulem' is loaded, and issue an error.203%% Right now I am checking if the \ulem command exists.204%% and issuing a warning.205%%206%% - Better error handling, error messages.207%%208%%209%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%210\NeedsTeXFormat{LaTeX2e}[1995/12/01]211\ProvidesPackage{trackchanges}212[2009/04/22 v0.7.0 TrackChanges file ]213214% Setup the required packages.215\RequirePackage{color}216\RequirePackage{ifthen}217\RequirePackage{calc}218\RequirePackage{soul}219\RequirePackage{morefloats}220221% I ran into some conflicts with other packages that deal222% with footnotes. Adding footmisc solved those problems for me.223%\RequirePackage{footmisc}224%\RequirePackage{manyfoot}225226%%227%% -------------- Setup the options228\newif\if@trackchanges229\@trackchangestrue230\newif\if@trackinmargins231\@trackinmarginsfalse232\newif\if@trackinline233\@trackinlinefalse234\newif\if@keepnew235\@keepnewfalse236\newif\if@movemargins237\@movemarginsfalse238\newif\if@adjustmargins239\@adjustmarginsfalse240\newif\if@TCignoremode241\@TCignoremodefalse242243\DeclareOption{finalold}{\@trackchangesfalse\@keepnewfalse}244\DeclareOption{finalnew}{\@trackchangesfalse\@keepnewtrue}245\DeclareOption{margins}{\@trackchangestrue\@trackinmarginstrue\@trackinlinefalse}246\DeclareOption{inline}{\@trackchangestrue\@trackinlinetrue\@trackinmarginsfalse}247\DeclareOption{footnotes}{\@trackchangestrue\@trackinmarginsfalse\@trackinlinefalse}248249\DeclareOption{movemargins}{\@movemarginstrue\@adjustmarginsfalse}250\DeclareOption{adjustmargins}{\@adjustmarginstrue\@movemarginstrue}251252\DeclareOption{ignoremode}{\@TCignoremodetrue}253\DeclareOption{ignoremodeoff}{\@TCignoremodefalse}254255%% This option exists for backwards compatibility with v0.6.256%% A depreciated warning will be displayed.257\DeclareOption{final}{\@trackchangesfalse\@keepnewfalse258\PackageWarningNoLine{trackchanges}{%259Option 'final' is depreciated.\MessageBreak%260Use 'finalold' instead%261}%262}263264\ProcessOptions265266267%%268%% -------------- Inhibit footnotes getting split across pages269%% This will inhibit splitting completely.270%% LaTeX will complain about `Underfull \vbox' unless271%% \raggedbottom is also used.272%273%\interfootnotelinepenalty=10000274%275%% Default value is 100.276277278%%279%% -------------- Set options for the soul package280\setstcolor{red}281\setuloverlap{0pt}282283%%284%% -------------- Make an alias to the 'soulregister' command.285\let\tcregister\soulregister286287%% -------------- Setup new macros for the soul package.288%% Here we setup two new commands using soul package macros.289%% These will allow strikeout, and underline with colored290%% text. These are important as they ensure that color is291%% maintained even in situations such as a footnote getting292%% split across pages.293294%% This is where the color is actually added.295\def\SOUL@coloreverysyllable{%296\SOUL@textcolor{\the\SOUL@syllable%297\SOUL@setkern\SOUL@charkern%298}%299}300301%% This is where the color is actually added.302\def\SOUL@ulcoloreverysyllable{%303\SOUL@textcolor{\SOUL@uleverysyllable}%304}305306%% Here we define a new command with the text color.307\def\SOUL@settextcolor#1{%308\def\SOUL@textcolor{\textcolor{#1}}%309}310311%% This is the setup command for colored text.312\def\SOUL@colorsetup#1{%313\SOUL@settextcolor{#1}%314\SOUL@setup%315\let\SOUL@everysyllable\SOUL@coloreverysyllable%316}317318%% This is the setup command for strikeout with colored text.319\def\SOUL@stcolorsetup#1{%320\SOUL@settextcolor{#1}%321\SOUL@stsetup%322\let\SOUL@everysyllable\SOUL@ulcoloreverysyllable%323}324325%% This is the setup command for underline with colored text.326\def\SOUL@ulcolorsetup#1{%327\SOUL@settextcolor{#1}%328\SOUL@ulsetup%329\let\SOUL@everysyllable\SOUL@ulcoloreverysyllable%330}331332%% Here I define the new callables.333334%% Color with strikeout335\DeclareRobustCommand*{\stcolor}[1]{%336\SOUL@stcolorsetup{#1}%337\SOUL@%338}339340%% Color with underline341\DeclareRobustCommand*{\ulcolor}[1]{%342\SOUL@ulcolorsetup{#1}%343\SOUL@%344}345346%% Colored text347\DeclareRobustCommand*{\soulcolor}[1]{%348\SOUL@colorsetup{#1}%349\SOUL@%350}351352%%353%% -------------- Setup counters354\newcounter{userid}355\setcounter{userid}{-1}356\newcounter{changenumber}[page]357\setcounter{changenumber}{0}358\newcounter{storefootnote}359\newcounter{numeditors}360\setcounter{numeditors}{0}361\newcounter{maxeditors}362\setcounter{maxeditors}{5}363364365%%366%% ----------- Create commands for five users367\newcommand{\TC@editorOne}{n/n}368\newcommand{\TC@editorTwo}{n/n}369\newcommand{\TC@editorThree}{n/n}370\newcommand{\TC@editorFour}{n/n}371\newcommand{\TC@editorFive}{n/n}372373374%%375%% ----------- create commands to add an editor.376\newcommand{\addeditor}[1]{377\matchuser{#1}378\ifthenelse{\value{userid} = -1}379{\addNewEditor{#1}}{}380}381\newcommand{\addNewEditor}[1]{382\stepcounter{numeditors}383\setcounter{userid}{\value{numeditors}}384% Check the number of authors.385\ifthenelse{\value{numeditors} > \value{maxeditors}}386{\TC@WarningTooManyEditors}387{}388\ifthenelse{\value{userid} = 1}389{\renewcommand{\TC@editorOne}{#1}}390{\ifthenelse{\value{userid} = 2}391{\renewcommand{\TC@editorTwo}{#1}}392{\ifthenelse{\value{userid} = 3}393{\renewcommand{\TC@editorThree}{#1}}394{\ifthenelse{\value{userid} = 4}395{\renewcommand{\TC@editorFour}{#1}}396{\ifthenelse{\value{userid} = 5}%397{\renewcommand{\TC@editorFive}{#1}}398{}399}400}401}402}403}404405406%%407%% --------------- define text colors for different users408\newcommand{\usercolor}{%409\ifthenelse{\value{userid} = 0}%410{\definecolor{UserColor}{rgb}{0.33,0.11,0.46}}% Purple411{\ifthenelse{\value{userid} = 1}%412{\definecolor{UserColor}{rgb}{0.1,0.1,0.8}}% Blue413{\ifthenelse{\value{userid} = 2}%414{\definecolor{UserColor}{rgb}{0.0,0.6,0.0}}% Green415{\ifthenelse{\value{userid} = 3}%416{\definecolor{UserColor}{rgb}{0.68,0.17,0.5}}% Magenta417{\ifthenelse{\value{userid} = 4}%418{\definecolor{UserColor}{rgb}{0.13,0.60,0.65}}% Cyan419{\ifthenelse{\value{userid} = 5}%420{\definecolor{UserColor}{rgb}{0.86,0.50,0.12}}% Orange421{\definecolor{UserColor}{rgb}{0.13,0.70,0.50}}% Teal422}%423}%424}%425}%426}%427}428429430%%431%% -------------- set counter userid according to editor432\newcommand{\matchuser}[1]{%433\ifthenelse{\equal{#1}{}}%434{\setcounter{userid}{0}}%435{\ifthenelse{\equal{#1}{\TC@editorOne}}%436{\setcounter{userid}{1}}%437{\ifthenelse{\equal{#1}{\TC@editorTwo}}%438{\setcounter{userid}{2}}%439{\ifthenelse{\equal{#1}{\TC@editorThree}}%440{\setcounter{userid}{3}}%441{\ifthenelse{\equal{#1}{\TC@editorFour}}%442{\setcounter{userid}{4}}%443{\ifthenelse{\equal{#1}{\TC@editorFive}}%444{\setcounter{userid}{5}}%445{\setcounter{userid}{-1}}%446}%447}%448}%449}%450}%451\usercolor%452}453454%% --------------- Setup a command for the user label.455\newcommand{\UserLabel}{}456%%457\newcommand{\GetUserLabel}[1]{%458\ifthenelse{\equal{#1}{}}%459{}%460{\userco{\textit{#1}:}}%461}462463464%%465%% --------------- define commands to color text.466%% The first command works properly across paragraphs.467%% The second works well with the footnote.468%%469%% The last two use the soul package.470\newcommand{\usertext}[1]{\color{UserColor}{#1}\normalcolor}471\newcommand{\usertextfoot}[1]{\textcolor{UserColor}{#1}}472\newcommand{\userco}[1]{\soulcolor{UserColor}{#1}}473\newcommand{\userst}[1]{\stcolor{UserColor}{#1}}474\newcommand{\userul}[1]{\ulcolor{UserColor}{#1}}475476477%%478%% --------------- define command for margin text.479\newcommand{\marginText}[2]{%480\renewcommand{\baselinestretch}{0.8}%481\marginpar{\raggedright%482\footnotesize%483\textsuperscript{\thefootnote}%484\UserLabel~#2%485}%486}487488489%%490%% --------------- This need to be called at the beginning of every command.491\newcommand{\trackingstart}[1]{%492% Set the ignores if the 'ignore' option was set.493\if@TCignoremode%494\TC@SetIgnores%495\fi%496\setcounter{storefootnote}{\value{footnote}}%497\refstepcounter{changenumber}%498\matchuser{#1}%499\ifthenelse{\value{userid} = -1}%500{\TC@WarningUnknownEditor{#1}}%501{}%502\renewcommand{\thefootnote}{\usertextfoot{c\arabic{changenumber}}}%503\setulcolor{UserColor}%504\renewcommand{\UserLabel}{\GetUserLabel{#1}}%505}506507508%%509%% --------------- This need to be called at the end of every command.510\newcommand{\trackingend}{%511\setcounter{footnote}{\value{storefootnote}}%512% Reset the ignores if the 'ignore' option was set.513\if@TCignoremode%514\TC@ResetIgnores%515\fi%516}517518519%%520%% --------------- Define the frontend command: \add521%% usage: \add[Editor]{new text}522\newcommand{\add}[2][]{%523\if@trackchanges%524\trackingstart{#1}%525\if@trackinmargins%526\textsuperscript{\thefootnote}%527\marginText{#1}{\userco{\textit{Text added.}}}%528\else%529\if@trackinline%530{\footnotesize\textsuperscript{\UserLabel}}%531\else%532\footnote{\UserLabel~\userco{\textit{Text added.}}}%533\fi%534\fi%535\usertext{\ul{#2}}%536\trackingend%537\else%538%% if trackchanges is false ...539\if@keepnew%540%% Keep the new text.541#2%542\fi%543%% if keepnew is false do nothing.544\fi%545}546547548%%549%% --------------- Define the frontend command: \remove550%% usage: \remove[Editor]{original text}551\newcommand{\remove}[2][]{%552\if@trackchanges%553\trackingstart{#1}%554\if@trackinmargins%555\textsuperscript{\thefootnote}%556\marginText{#1}{\userst{#2}}%557\else%558\if@trackinline%559{\footnotesize\textsuperscript{\UserLabel}\usertext{\st{#2}}}%560\else%561\footnote{\UserLabel~\userst{#2}}%562\fi%563\fi%564\trackingend%565\else%566%% if trackchanges is false ...567\if@keepnew%568%% Remove the old text.569\else570%% Keep the old text.571#2%572\fi%573\fi%574}575576577%%578%% --------------- Define the frontend command: \change579%% usage: \change[Editor]{original text}{new text}580\newcommand{\change}[3][]{%581\if@trackchanges%582\trackingstart{#1}%583\if@trackinmargins%584\textsuperscript{\thefootnote}%585\marginText{#1}{\userst{#2}}%586\else%587\if@trackinline%588{\footnotesize\textsuperscript{\UserLabel}\usertext{\st{#2}}}%589\else%590\footnote{\UserLabel~\userst{#2}}%591\fi%592\fi%593\usertext{\ul{#3}}%594\trackingend%595\else%596%% if trackchanges is false ...597\if@keepnew%598%% Keep the new text.599#3%600\else601%% Keep the old text.602#2%603\fi%604\fi%605}606607608%%609%% --------------- Define frontend command: \annonte610%% usage: \annote[Editor]{highlighted text}{note text}611\newcommand{\annote}[3][]{%612% Make the underlining thicker and higher.613\setul{1pt}{0.3ex}%614\if@trackchanges%615\trackingstart{#1}%616\if@trackinmargins%617\textsuperscript{\thefootnote}%618\marginText{#1}{\userco{#3}}%619\ul{#2}%620\else%621\if@trackinline%622{\footnotesize\textsuperscript{\UserLabel}}%623\ul{#2}%624{\footnotesize\usertext{~[#3]}}%625\else%626\footnote{\UserLabel~\userco{#3}}%627\ul{#2}%628\fi%629\fi%630\trackingend%631\else%632%% if trackchanges is false ... just print text.633#2%634\fi%635% Reset the underlineing636\resetul%637}638639640%%641%% --------------- Define frontend command: \note642%% usage: \note[Editor]{note text}643\newcommand{\note}[2][]{%644\if@trackchanges%645\trackingstart{#1}%646\if@trackinmargins%647\textsuperscript{\thefootnote}%648\marginText{#1}{\userco{#2}}%649\else%650\if@trackinline%651{\footnotesize\textsuperscript{\UserLabel}}%652{\footnotesize\usertext{~[#2]}}%653\else%654\footnote{\UserLabel~\userco{#2}}%655\fi%656\fi%657\trackingend%658\else%659%% if trackchanges is false ... do not print notes660\fi%661}662663664%%665%% --------------- Define frontend command: \refneeded666%% usage: \refneeded[Editor]{note text}667\newcommand{\refneeded}[2][]{%668\if@trackchanges%669\trackingstart{#1}%670\if@trackinmargins%671\textsuperscript{\thefootnote}%672\marginText{#1}{\userco{REFERENCE NEEDED #2}}%673\else%674\if@trackinline%675{\footnotesize\textsuperscript{\UserLabel}}%676\ifthenelse{\equal{#2}{}}%677{{\footnotesize\usertext{~[REFERENCE NEEDED]}}}%678{{\footnotesize\usertext{~[REFERENCE NEEDED #2]}}}%679\else%680\footnote{\UserLabel~\userco{REFERENCE NEEDED #2}}%681\fi%682\fi%683\trackingend%684\else%685%% if trackchanges is false ... do not print notes686\fi%687}688689690%%691%% -------------- Setup for margin notes.692\newcommand{\setupMarginpar}{693\setlength{\marginparwidth}{\paperwidth}694\addtolength{\marginparwidth}{-1in}695\addtolength{\marginparwidth}{-\oddsidemargin}696\addtolength{\marginparwidth}{-\hoffset}697\addtolength{\marginparwidth}{-\textwidth}698\addtolength{\marginparwidth}{-\marginparsep}699\addtolength{\marginparwidth}{-5mm}700}701\newcommand{\setupMoveMargins}{702\setlength{\oddsidemargin}{-1in}703\addtolength{\oddsidemargin}{0.5in}704}705\newcommand{\setupAdjustMargins}{706\setlength{\textwidth}{0.5\paperwidth}707}708\newcommand{\setupMargins}{709\if@movemargins710\setupMoveMargins{}711\fi712\if@adjustmargins713\setupAdjustMargins{}714\fi715% The Margins are setup using \AtBeginDocument.716}717718%% --------------- Check that conflicting packages are not loaded.719\def\TC@checkCompatibility{720\ifx\uline\undefined721\else722\TC@WarningUlem723\fi724}725726%% ---------------- Setup for actions to be taken after the style file has been read.727\AtEndOfPackage{728\if@trackchanges729\if@trackinmargins730\setupMargins{}731\else732\fi733\fi734}735736%% ---------------- Setup for actions to be taken after the preamble.737\AtBeginDocument{738\TC@checkCompatibility739\TC@checkDepreciated740\if@trackchanges741\if@trackinmargins742\setupMarginpar743\else744\fi745\fi746}747748%%749%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%750%% --------------- Setup for backwards compatibility with v0.6751\newcommand{\initialsOne}{}752\newcommand{\initialsTwo}{}753\newcommand{\initialsThree}{}754\newcommand{\initialsFour}{}755\newcommand{\initialsFive}{}756757%% --------------- Check for depreciated options758\def\TC@checkDepreciated{759\ifthenelse{\equal{\initialsOne}{}}760{}{\TC@WarningDepreciatedInitials761\addeditor{\initialsOne}}762\ifthenelse{\equal{\initialsTwo}{}}763{}{\TC@WarningDepreciatedInitials764\addeditor{\initialsTwo}}765\ifthenelse{\equal{\initialsThree}{}}766{}{\TC@WarningDepreciatedInitials767\addeditor{\initialsThree}}768\ifthenelse{\equal{\initialsFour}{}}769{}{\TC@WarningDepreciatedInitials770\addeditor{\initialsFour}}771\ifthenelse{\equal{\initialsFive}{}}772{}{\TC@WarningDepreciatedInitials773\addeditor{\initialsFive}}774}775776%%777%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%778%% --------------- Setup warnings.779\newcommand{\TC@WarningTooManyEditors}{%780\PackageWarningNoLine{trackchanges}{%781A maximum of \arabic{maxeditors} editors are supported.\MessageBreak%782Changes made by additional editors will all have\MessageBreak%783the same color coding%784}%785}786\newcommand{\TC@WarningUnknownEditor}[1]{%787\PackageWarning{trackchanges}{%788Editor '#1' unknown.\MessageBreak%789}%790}791\newcommand{\TC@WarningUlem}{%792\PackageWarningNoLine{trackchanges}{%793TrackChanges is not compatable with the \MessageBreak%794'ulem' package.\MessageBreak%795Use the 'soul' package instead%796}%797}798\newcommand{\TC@WarningDepreciatedInitials}{%799\PackageWarningNoLine{trackchanges}{%800The '\noexpand\renewcommand{\noexpand\initialsNum}{name}' commands\MessageBreak%801are depreciated.\MessageBreak%802Use '\noexpand\addeditor{name}' instead.'%803}%804}805806807%%808%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%809%% Below are a set of definitions to add an ignore list to the soul810%% package.811%%812%% This is not a default as it reimplements some of the internals of813%% the soul package. If a new version of soul were to come out814%% this stuff might break.815\if@TCignoremode816817818%% These two function allow us to turn on and off the ignore list.819%% This is so we don't mess up soul for anyone else.820\def\TC@SetIgnores{%821\let\SOUL@ignores\TC@ignores%822}823\def\TC@ResetIgnores{%824\let\SOUL@ignores\TC@emptyignores%825}826827\newtoks\TC@ignores828\newtoks\TC@emptyignores829830%% The commands are separated by \\. The first number is the831%% number of inputs for the command. The command name832%% is given next. The last number specifies which input to833%% pass through. If the last number is zero nothing will be834%% passed.835836\TC@ignores={%837\\2\textcolor{2}%838\\1\color{0}%839\\1\ul{1}%840\\1\st{1}%841\\1\hl{1}%842\\1\caps{1}%843\\1\so{1}%844}845\TC@emptyignores={}846847%% Initialize soul not to use the ignore list.848\let\SOUL@ignores\TC@emptyignores849850%% This is a way to register new ignores.851\def\tcignore#1#2#3{{%852\edef\x{\global\TC@ignores={\the\TC@ignores853\noexpand\\#2\noexpand#1#3}}\x854}}855856857%% Here I redefine \SOUL@dotoken.858%% The new version also checks for ignores.859\def\SOUL@dotoken#1{%860\def\SOUL@@{\SOUL@addtoken{#1}}%861\def\\##1##2{%862\edef\SOUL@x{\string#1}%863\edef\SOUL@n{\string##2}%864\ifx\SOUL@x\SOUL@n865\def\SOUL@@{\SOUL@docmd{##1}{#1}}%866\else867\edef\SOUL@n{\string##2\space}%868\ifx\SOUL@x\SOUL@n869\def\SOUL@@{\SOUL@docmd{##1}{#1}}%870\fi871\fi872}%873\the\SOUL@cmds874\def\\##1##2##3{%875\edef\SOUL@x{\string#1}%876\edef\SOUL@n{\string##2}%877\ifx\SOUL@x\SOUL@n878\def\SOUL@@{\SOUL@doignore{##1}{#1}{##3}}%879\else880\edef\SOUL@n{\string##2\space}%881\ifx\SOUL@x\SOUL@n882\def\SOUL@@{\SOUL@doignore{##1}{#1}{##3}}%883\fi884\fi885}%886\the\SOUL@ignores%887\SOUL@@888}889890%% This is where the actual ignoring is done.891\def\SOUL@doignore#1#2#3{%892\ifx2#1%893\SOUL@doword%894\def\SOUL@@##1##2{%895\ifx1#3%896\SOUL@do{##1}%897\else\ifx2#3%898\SOUL@do{##2}%899\fi\fi%900\SOUL@scan%901}%902\else\ifx1#1%903\SOUL@doword%904\def\SOUL@@##1{%905\ifx1#3%906\SOUL@do{##1}%907\fi%908\SOUL@scan%909}%910\else911\SOUL@doword912\let\SOUL@@\SOUL@scan913\fi\fi914\SOUL@@915}916917\fi918919%%920%%921%% End of file trackchanges.sty922923924