| 1 |
%% |
| 2 |
%% This is file `lwarp-changes.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% lwarp.dtx (with options: `changes') |
| 8 |
%% This is a generated file. |
| 9 |
%% Copyright 2016-2026 Brian Dunn |
| 10 |
%% |
| 11 |
%% This work may be distributed and/or modified under the |
| 12 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 13 |
%% of this license or (at your option) any later version. |
| 14 |
%% The latest version of this license is in |
| 15 |
%% http://www.latex-project.org/lppl.txt |
| 16 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 17 |
%% version 2005/12/01 or later. |
| 18 |
\LWR@ProvidesPackagePass{changes}[2021/07/15] |
| 19 |
\renewcommand{\ChangesListline}[4]{% |
| 20 |
\IfIsInList{#1}{\Changes@loc@show}{% |
| 21 |
\LWR@startpars% |
| 22 |
#2: #3 \qquad |
| 23 |
\nameref{\BaseJobname-autopage-#4}% |
| 24 |
\LWR@stoppars% |
| 25 |
}{}% |
| 26 |
} |
| 27 |
|
| 28 |
\VerifyCommand[lwarp][changes]{\listofchanges}{CDE77F21854A8C807FDF2CF756286B55} |
| 29 |
|
| 30 |
\renewcommand{\listofchanges}[1][\@empty]{% |
| 31 |
\setkeys{Changes@loc}{#1}% |
| 32 |
\ifbool{Changes@optiondraft}% |
| 33 |
{% |
| 34 |
\IfIsInList{\Changes@loc@style}{list|summary|compactsummary}% |
| 35 |
{}% |
| 36 |
{% |
| 37 |
\PackageWarning{changes}{Wrong style for list of changes:% |
| 38 |
'\Changes@loc@style', using 'list' instead.}% |
| 39 |
\def\Changes@loc@style{}% |
| 40 |
}% |
| 41 |
\IfIsEmpty{\Changes@loc@style}% |
| 42 |
{\def\Changes@loc@style{list}}% |
| 43 |
{}% |
| 44 |
\IfStrEq{\Changes@loc@show}{all}% |
| 45 |
{\def\Changes@loc@show{added|deleted|replaced|highlight|comment}}% |
| 46 |
{}% |
| 47 |
\IfIsInList{\Changes@loc@show}{added|deleted|replaced|highlight|comment}% |
| 48 |
{}% |
| 49 |
{% |
| 50 |
\PackageWarning{changes}{Wrong show-value for list of changes: '\Changes@loc@show', using 'all' instead.}% |
| 51 |
\def\Changes@loc@show{}% |
| 52 |
}% |
| 53 |
\IfIsEmpty{\Changes@loc@show}% |
| 54 |
{\def\Changes@loc@show{added|deleted|replaced|highlight|comment}}% |
| 55 |
{}% |
| 56 |
\IfIsEmpty{\Changes@loc@title}% |
| 57 |
{% |
| 58 |
\IfStrEq{\Changes@loc@style}{list}% |
| 59 |
{\def\Changes@heading{\listofchangesname}}{}% |
| 60 |
\IfStrEq{\Changes@loc@style}{summary}% |
| 61 |
{\def\Changes@heading{\summaryofchangesname}}{}% |
| 62 |
\IfStrEq{\Changes@loc@style}{compactsummary}% |
| 63 |
{\def\Changes@heading{\compactsummaryofchangesname}}{}% |
| 64 |
}% |
| 65 |
{\def\Changes@heading{\Changes@loc@title}}% |
| 66 |
\section*{\Changes@heading} |
| 67 |
\IfIsInList{\Changes@loc@style}{list}% |
| 68 |
{% |
| 69 |
\IfFileExists{\jobname.\Changes@locextension}% |
| 70 |
{% |
| 71 |
\newread\Changes@InFile% |
| 72 |
\openin\Changes@InFile=\jobname.\Changes@locextension% |
| 73 |
\loop\unless\ifeof\Changes@InFile% |
| 74 |
\read\Changes@InFile to \Changes@Line% |
| 75 |
\ifeof\Changes@InFile\else% |
| 76 |
\Changes@Line% |
| 77 |
\fi |
| 78 |
\repeat |
| 79 |
\closein\Changes@InFile% |
| 80 |
}{% |
| 81 |
\emph{\changesnoloc}% |
| 82 |
\PackageWarning{changes}{LaTeX rerun needed for list of changes}% |
| 83 |
}% |
| 84 |
}{}% |
| 85 |
\IfIsInList{\Changes@loc@style}{summary|compactsummary}% |
| 86 |
{% |
| 87 |
\IfFileExists{\jobname.\Changes@socextension}% |
| 88 |
{% |
| 89 |
\newread\Changes@InFile% |
| 90 |
\openin\Changes@InFile = \jobname.\Changes@socextension% |
| 91 |
\loop\unless\ifeof\Changes@InFile% |
| 92 |
\read\Changes@InFile to \Changes@Line% |
| 93 |
\ifeof\Changes@InFile\else% |
| 94 |
\expandafter\changes@chopline\Changes@Line\\% |
| 95 |
\textbf{% |
| 96 |
\IfIsColored% |
| 97 |
{\color{\Changes@Incolor}}% |
| 98 |
{}% |
| 99 |
\IfIsAnonymous{\Changes@Inid}% |
| 100 |
{% |
| 101 |
\LWR@textcurrentcolor{% lwarp |
| 102 |
\changesauthorname: \changesanonymousname% |
| 103 |
}% lwarp |
| 104 |
}% |
| 105 |
{% |
| 106 |
\LWR@textcurrentcolor{% lwarp |
| 107 |
\changesauthorname: \Changes@Inid% |
| 108 |
}% lwarp |
| 109 |
\IfIsEmpty{\Changes@Inname}% |
| 110 |
{}% |
| 111 |
{ % |
| 112 |
\LWR@textcurrentcolor{% lwarp |
| 113 |
(\Changes@Inname)% |
| 114 |
}% lwarp |
| 115 |
}% |
| 116 |
}% |
| 117 |
}\\% |
| 118 |
\numdef{\Changes@InSum}{0}% |
| 119 |
\renewcommand*{\do}[1]{% |
| 120 |
\numdef{\Changes@InSum}{\Changes@InSum + \csuse{Changes@In########1}}% |
| 121 |
}% |
| 122 |
\expandafter\dopsvlist\expandafter{\Changes@loc@show}% |
| 123 |
\ifnumcomp{\Changes@InSum}{=}{0}% |
| 124 |
{% |
| 125 |
\changesnochanges% |
| 126 |
\par% \lwarp |
| 127 |
}% |
| 128 |
{% |
| 129 |
\numdef{\Changes@InCount}{0}% |
| 130 |
\renewcommand*{\do}[1]{% |
| 131 |
\numdef{\Changes@InCount}{\Changes@InCount + \csuse{Changes@In########1}}% |
| 132 |
\ifboolexpr{% |
| 133 |
not test {\IfStrEq{\Changes@loc@style}{compactsummary}} or% |
| 134 |
test {\ifnumgreater{\csuse{Changes@In########1}}{0}}% |
| 135 |
}% |
| 136 |
{% |
| 137 |
\csuse{changes########1name}~% |
| 138 |
\dotfill~% \lwarp |
| 139 |
\csuse{Changes@In########1}% |
| 140 |
{\\}% |
| 141 |
}% |
| 142 |
{}% |
| 143 |
}% |
| 144 |
\expandafter\dopsvlist\expandafter{\Changes@loc@show}% |
| 145 |
\par% lwarp |
| 146 |
}% |
| 147 |
\fi% |
| 148 |
\repeat |
| 149 |
\closein\Changes@InFile% |
| 150 |
}{% |
| 151 |
\emph{\changesnosoc}% |
| 152 |
\PackageWarning{changes}{LaTeX rerun needed for summary of changes}% |
| 153 |
}% |
| 154 |
}{}% |
| 155 |
}{}% |
| 156 |
} |
| 157 |
|
| 158 |
\VerifyCommand[lwarp][changes]{\Changes@Markup@comment}{23057A40141C9D1A0A173DCF1BD5DE55} |
| 159 |
|
| 160 |
\renewcommand{\Changes@Markup@comment}[3]{% |
| 161 |
\IfStrEq{\Changes@optioncommentmarkup}{todo}% |
| 162 |
{% |
| 163 |
\IfIsColored% |
| 164 |
{\colorlet{Changes@todocolor}{authorcolor}}% |
| 165 |
{\colorlet{Changes@todocolor}{black}}% |
| 166 |
\todo[color=Changes@todocolor!10, bordercolor=Changes@todocolor, linecolor=Changes@todocolor!70, nolist]{\textbf{[\IfIsAnonymous{#2}{}{#3~}\arabic{authorcommentcount}]} #1}% |
| 167 |
}{}% |
| 168 |
\IfStrEq{\Changes@optioncommentmarkup}{margin}% |
| 169 |
{% |
| 170 |
\marginpar{% |
| 171 |
\IfIsColored% |
| 172 |
{\leavevmode\color{authorcolor}}% |
| 173 |
{}% |
| 174 |
\LWR@textcurrentcolor{% lwarp |
| 175 |
\textbf{[\IfIsAnonymous{#2}{}{#3~}\arabic{Changes@commentCount#2}]:} #1% |
| 176 |
}% lwarp |
| 177 |
}% |
| 178 |
}{}% |
| 179 |
\IfStrEq{\Changes@optioncommentmarkup}{footnote}% |
| 180 |
{% |
| 181 |
\footnote{% |
| 182 |
\LWR@textcurrentcolor{% lwarp |
| 183 |
\textbf{[\IfIsAnonymous{#2}{}{#3~}\arabic{Changes@commentCount#2}]:} #1% |
| 184 |
}% lwarp |
| 185 |
}% |
| 186 |
}{}% |
| 187 |
\IfStrEq{\Changes@optioncommentmarkup}{uwave}% |
| 188 |
{% |
| 189 |
{% |
| 190 |
\IfIsColored% |
| 191 |
{\color{authorcolor}}% |
| 192 |
{}% |
| 193 |
\allowbreak% |
| 194 |
\uwave{% |
| 195 |
\textbf{[\IfIsAnonymous{#2}{}{#3~}\arabic{Changes@commentCount#2}]:} #1% |
| 196 |
}% |
| 197 |
}% |
| 198 |
}{}% |
| 199 |
} |
| 200 |
|
| 201 |
\VerifyCommand[lwarp][changes]{\Changes@output}{BD1ACDECB4BBA2D9181885F9EDC87F77} |
| 202 |
|
| 203 |
\renewrobustcmd{\Changes@output}[7]{% |
| 204 |
\ifbool{Changes@optiondraft}% |
| 205 |
{% |
| 206 |
\Changes@check@author{#2}% |
| 207 |
\Changes@set@color{#2}% |
| 208 |
{% |
| 209 |
\IfIsInList{#1}{added|deleted|replaced|highlight}% |
| 210 |
{% |
| 211 |
\IfIsEmpty{#5}% |
| 212 |
{% |
| 213 |
\IfIsAuthorEmptyAtPosition{#2}{left}% |
| 214 |
{}% |
| 215 |
{{% |
| 216 |
\IfIsColored% |
| 217 |
{\color{authorcolor}}% |
| 218 |
{}% |
| 219 |
\LWR@textcurrentcolor{% lwarp |
| 220 |
\Changes@Markup@author{\Changes@output@author@position{#2}{left}}% |
| 221 |
}% lwarp |
| 222 |
}}% |
| 223 |
}{}% |
| 224 |
{% |
| 225 |
\IfStrEq{#1}{highlight}% |
| 226 |
{}{% |
| 227 |
\IfIsColored% |
| 228 |
{\color{authorcolor}}% |
| 229 |
{}% |
| 230 |
}% |
| 231 |
\LWR@textcurrentcolor{% lwarp |
| 232 |
\IfStrEq{#1}{added}{\Changes@Markup@added{#3}}{}% |
| 233 |
\IfStrEq{#1}{deleted}{\Changes@Markup@deleted{#4}}{}% |
| 234 |
\IfStrEq{#1}{replaced}{{\Changes@Markup@added{#3}}\allowbreak\Changes@Markup@deleted{#4}}{}% |
| 235 |
\IfStrEq{#1}{highlight}{\Changes@Markup@highlight{#3}}{}% |
| 236 |
}% lwarp |
| 237 |
}% |
| 238 |
\IfIsEmpty{#5}% |
| 239 |
{% |
| 240 |
\IfIsAuthorEmptyAtPosition{#2}{right}% |
| 241 |
{}% |
| 242 |
{{% |
| 243 |
\IfIsColored% |
| 244 |
{\color{authorcolor}}% |
| 245 |
{}% |
| 246 |
\LWR@textcurrentcolor{% lwarp |
| 247 |
\Changes@Markup@author{\Changes@output@author@position{#2}{right}}% |
| 248 |
}% lwarp |
| 249 |
}}% |
| 250 |
}{}% |
| 251 |
\stepcounter{Changes@#1Count#2}% |
| 252 |
}{}% |
| 253 |
\IfIsEmpty{#5}% |
| 254 |
{}% |
| 255 |
{% |
| 256 |
\stepcounter{Changes@commentCount#2}% |
| 257 |
\Changes@set@commentcount{#2}% |
| 258 |
\Changes@Markup@comment% |
| 259 |
{#5}% |
| 260 |
{#2}% |
| 261 |
{\Changes@output@author{#2}}% |
| 262 |
}% |
| 263 |
}% |
| 264 |
\IfIsEmpty{#2}% |
| 265 |
{\def\Changes@locid{}}% |
| 266 |
{\def\Changes@locid{~(#2)}}% |
| 267 |
\addtocontents{\Changes@locextension}{\protect\ChangesListline{#1}{#6\Changes@locid}{#7}{\thepage}}% |
| 268 |
}% |
| 269 |
{% |
| 270 |
\IfIsEmpty{#3}% |
| 271 |
{\@bsphack\@esphack}% |
| 272 |
{#3}% |
| 273 |
}% |
| 274 |
} |
| 275 |
|
| 276 |
\endinput |
| 277 |
%% |
| 278 |
%% End of file `lwarp-changes.sty'. |