Debian Codegraph @

texmf-dist/source/latex/changes/regression.dtx

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 2007-2021
4 % Ekkart Kleinod ([email protected])
5 % --------------------------------------------------------------------------
6 %
7 % This work may be distributed and/or modified under the
8 % conditions of the \LaTeX\ Project Public License, either version~1.3
9 % of this license or any later version.
10 % The latest version of this license is in\\
11 % \url{http://www.latex-project.org/lppl.txt}\\
12 % and version~1.3 or later is part of all distributions of \LaTeX\
13 % version 2005/12/01 or later.
14 %
15 % This work has the LPPL maintenance status "maintained".
16 % The current maintainer of this work is Ekkart Kleinod.
17 % \fi
18 %
19 % \CharacterTable
20 % {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
21 % 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
22 % Digits \0\1\2\3\4\5\6\7\8\9
23 % Exclamation \! Double quote \" Hash (number) \#
24 % Dollar \$ Percent \% Ampersand \&
25 % Acute accent \' Left paren \( Right paren \)
26 % Asterisk \* Plus \+ Comma \,
27 % Minus \- Point \. Solidus \/
28 % Colon \: Semicolon \; Less than \<
29 % Equals \= Greater than \> Question mark \?
30 % Commercial at \@ Left bracket \[ Backslash \\
31 % Right bracket \] Circumflex \^ Underscore \_
32 % Grave accent \` Left brace \{ Vertical bar \|
33 % Right brace \} Tilde \~}
34 %
35 % \GetFileInfo{regression.dtx}
36 %
37 %^^A --------------------------------------------------------------------------
38 %
39 % Start the \LaTeX document the standard way.
40 %
41 % \begin{macrocode}
42 \documentclass[11pt, a4paper, notitlepage, english]{article}
43 %<*!regression:draft:nobabel&!regression:final:nobabel>
44 \usepackage{babel}
45 %</!regression:draft:nobabel&!regression:final:nobabel>
46 % \end{macrocode}
47 %
48 % \begin{macrocode}
49 %<*regression:draft:id|regression:draft:nobabel>
50 \usepackage[authormarkuptext=id]{changes}
51 %</regression:draft:id|regression:draft:nobabel>
52 %<*regression:draft:name>
53 \usepackage[authormarkuptext=name]{changes}
54 %</regression:draft:name>
55 %<*regression:final|regression:final:nobabel>
56 \usepackage[final]{changes}
57 %</regression:final|regression:final:nobabel>
58 %
59 % Define some authors.
60 %
61 % \begin{macrocode}
62 \definechangesauthor[color=green]{Green}
63 \definechangesauthor[name={Mister Orange}, color=orange]{OA}
64 \definechangesauthor{nochanges}
65 % \end{macrocode}
66 %
67 % \begin{macrocode}
68 \begin{document}
69
70
71
72 %<*regression:draft:id|regression:draft:name>
73 \section{Test empty string}
74
75 Anonymous author should have no space before the \added[comment=no space]{number} in the comment.
76
77 Author name should \added[id=OA]{appear here} but \added[id=Green]{id here}.
78
79 \listofchanges[title={List of changes should not contain empty author brackets}]
80
81 \listofchanges[style=compactsummary, title={Summary should not contain empty author brackets either}]
82 %</regression:draft:id|regression:draft:name>
83
84 %<*regression:final>
85 \section{Compile errors to avoid}
86
87 no compile error here (just a missing citation): --- \added{a cite inside added \cite{bibid}} ---
88
89 \section{Errors with empty replacement}
90
91 All corresponding lines should have the same width.
92
93 Text before deletion.
94 \deleted{Deleted text.}
95 Text after deletion.
96
97 Text before deletion. \deleted{Deleted text.} Text after deletion.
98
99 Text before deletion.
100 Text after deletion.
101
102
103 Text before replacement.
104 \replaced{}{Replaced text.}
105 Text after replacement.
106
107 Text before replacement. \replaced{}{Replaced text.} Text after replacement.
108
109 Text before replacement.
110 Text after replacement.
111
112
113 Text before replacement.
114 \replaced{}{}
115 Text after replacement.
116
117 Text before replacement. \replaced{}{} Text after replacement.
118
119 Text before replacement.
120 Text after replacement.
121
122
123 Text before addition.
124 \added{}
125 Text after addition.
126
127 Text before addition. \added{} Text after addition.
128
129 Text before addition.
130 Text after addition.
131
132 Text before comment.
133 \comment{Comment.}
134 Text after comment.
135
136 Text before comment. \comment{Comment.} Text after comment.
137
138 Text before comment.
139 Text after comment.
140
141 Text before empty comment.
142 \comment{}
143 Text after empty comment.
144
145 Text before empty comment. \comment{} Text after empty comment.
146
147 Text before empty comment.
148 Text after empty comment.
149
150 Text before highlight.
151 \highlight[comment={Highlight comment}]{Highlighted text.}
152 Text after highlight.
153
154 Text before highlight. \highlight[comment={Highlight comment}]{Highlighted text.} Text after highlight.
155
156 Text before highlight.
157 Highlighted text.
158 Text after highlight.
159
160 Text before empty highlight text.
161 \highlight[comment={Highlight comment}]{}
162 Text after empty highlight text.
163
164 Text before empty highlight text. \highlight[comment={Highlight comment}]{} Text after empty highlight text.
165
166 Text before empty highlight text.
167 Text after empty highlight text.
168
169 Text before empty highlight comment.
170 \highlight[comment={}]{Highlighted text.}
171 Text after empty highlight comment.
172
173 Text before empty highlight comment. \highlight[comment={}]{Highlighted text.} Text after empty highlight comment.
174
175 Text before empty highlight comment.
176 Highlighted text.
177 Text after empty highlight comment.
178
179 Text before empty highlight.
180 \highlight[comment={}]{}
181 Text after empty highlight.
182
183 Text before empty highlight. \highlight[comment={}]{} Text after empty highlight.
184
185 Text before empty highlight.
186 Text after empty highlight.
187
188 %</regression:final>
189
190 \section{No compile errors in any case}
191
192 \listofchanges
193 \listofchanges[style=summary]
194 \listofchanges[style=compactsummary]
195
196 \subsection*{Changes by default author}
197
198 You think water moves fast?
199 \added{You should see ice.}
200 It moves like it has a mind.
201 Like it knows it killed the world once and got a taste for murder.
202 \deleted[comment={No?}]{After the avalanche, it took us a week to climb out.}
203 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.
204 \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.}
205 Nature is lethal but it doesn't hold a candle to man.
206 However unreal\comment{speaking of unreal\dots} it may seem, we are connected, you and I.
207 We're on the same curve, just on opposite ends.
208 You don't get \highlight[comment={Yes, sick.}]{sick}, I do.
209 That's also \highlight{clear}.
210
211 \subsection*{Changes by green author}
212
213 The lysine contingency - it's intended to prevent the spread of the animals is case they ever got off the island.
214 Dr. Wu inserted a gene \replaced[id=Green]{taht}{that} makes a \deleted[id=Green]{single} faulty enzyme in protein metabolism.
215 The animals can't manufacture the amino acid lysine.
216 Unless \replaced[id=Green]{they're}{continually} supplied with lysine by us, they'll slip into a coma and die.
217 We're on the same curve, just on opposite ends.
218 However unreal\comment[id=Green]{speaking of unreal\dots} it may seem, we are connected, you and I.
219 You don't get \highlight[id=Green, comment={Yes, sick.}]{sick}, I do.
220 That's also \highlight[id=Green]{clear}.
221
222 \subsection*{Changes by orange author with some comments}
223
224 Now that we know who you are, I know who I am.
225 \added[id=OA, comment={Yeah, I like animals better than people sometimes\dots}]{I'm not a mistake!}
226 It all makes sense!
227 In a comic, you know how you can tell who the arch-villain's going to be?
228 \deleted[id=OA, comment={Especially dogs. Dogs are the best.}]{He's the exact opposite of the hero.}
229 \deleted[id=OA]{And most times they're friends, like you and me!}
230 I should've known way back when...
231 You know why, David?
232 They called me Mr Glass.
233 However unreal\comment[id=OA]{just nice} it may seem, we are connected, you and I.
234 We're on the same curve, just on opposite ends.
235 You don't get \highlight[id=OA, comment={Yes, sick.}]{sick}, I do.
236 That's also \highlight[id=OA]{clear}.
237
238 \subsection*{No changes}
239
240 Your bones don't break, mine do.
241 \textbf{That's clear.}
242 Your cells react to bacteria and viruses differently than mine.
243 \textsl{You don't get sick, I do.}
244 That's also clear.
245 \textit{But for some reason, you and I react the exact same way to water.}
246 We swallow it too fast, we choke.
247 \emph{We get some in our lungs, we drown.}
248 However unreal it may seem, we are connected, you and I.
249 We're on the same curve, just on opposite ends.
250 You don't get sick, I do.
251 That's also clear.
252
253 \end{document}
254 % \end{macrocode}
255 %
256 %\Finale
257 \endinput