Debian Codegraph @

texmf-dist/doc/latex/changes/userdoc/changes.en.tex

raw
1 %^^A ---- introduction
2 \section{Introduction}
3
4 This package provides means for manual change markup.
5
6 Any comments, thoughts or improvements are welcome.
7 The package is maintained at \emph{gitlab}, please see
8
9 \url{https://edgesoft.de/projects/changes/}
10
11 for links to source code access, bug and feature tracker, etc.
12 If you want to contact me directly, please send an email to \href{mailto:[email protected]}{[email protected]}.
13 Please start your email subject with \texttt{[changes]}.
14
15 \begin{quote}
16 The changes-package allows the user to manually markup changes of text, such as additions, deletions, or replacements.
17 Changed text is shown in a different color; deleted text is striked out.
18 Additionally, text can be highlighted and/or commented.
19 The package allows free definition of additional authors and their associated color.
20 It also allows you to change the markup of changes, authors, highlights or comments.
21 \end{quote}
22
23 Here is a short example of change markup:
24
25 \begin{quote}
26 This is \added[id=EK, comment={missing word}]{new} text.
27 In this sentence, I replace a \replaced[id=EK]{good}{bad} word.
28 And, to sum up the text changes, there is another \deleted[id=EK]{obsolete} word to delete.
29 Furthermore, text can be \highlight[id=EK]{highlighted} or just \comment[id=EK]{For the fun of it.}commented.
30 \end{quote}
31
32 Parallel to this manual is a folder ``examples'' which contains an extensive collection of example files, both \hologo{LaTeX} and PDF files.
33 Please refer to these examples for inspiration and first problem solving.
34
35
36 %^^A ---- usage
37 \cleardoublepage
38 \section{Using the \docpackage{changes}-package}
39 \label{sec:usage}
40
41 In this section a typical use case of the \docpackage{changes}-package is described.
42 You can find the detailed description of the package options and new commands in \autoref{sec:ui}.
43
44 We start with the text you want to change.
45 You want to markup the changes for each author individually.
46 Such a change markup is well-known in WYSIWYG text processors such as \emph{LibreOffice}, \emph{OpenOffice}, or \emph{Word}.
47
48 The \docpackage{changes}-package was developed in order to support such change markup.
49 The package provides commands for defining authors, and for marking text as added, deleted, or replaced.
50 Additionally, text can be highlighted or commented.
51 In order to use the package, you should follow these steps:
52
53 \begin{enumerate}
54 \item use \docpackage{changes}-package
55 \item define authors
56 \item markup text changes
57 \item highlight and comment text
58 \item typeset the document with \hologo{LaTeX}
59 \item output list of changes
60 \item remove markup
61 \end{enumerate}
62
63
64 \minisec{Use \docpackage{changes}-package}
65
66 In order to activate change management, use the \docpackage{changes}-package as follows:
67
68 \chinline{usepackage_changes}
69
70 respectively
71
72 \chinline{usepackage_options_changes}
73
74 You can use the options for defining the layout of the change markup.
75 You can change the layout after using the \docpackage{changes}-package as well.
76
77 For detailed information please refer to \autoref{sec:ui:options} and \autoref{sec:ui:customizingoutput}.
78
79
80 \minisec{Define authors}
81
82 The \docpackage{changes}-package provides a default anonymous author.
83 If you want to track your changes depending on the author, you have to define the needed authors as follows:
84
85 \chinline{definechangesauthor}
86
87 Every author is uniquely identified through his or her id.
88 You can give every author an optional name and/or color.
89
90 For detailed information please refer to \autoref{sec:ui:authormanagement}.
91
92
93 \minisec{Markup text changes}
94
95 Now everything is set to markup the changed text.
96 Please use the following commands according to your change:
97
98 for added text:
99
100 \chinline{added}
101
102 for deleted text:
103
104 \chinline{deleted}
105
106 for replaced text:
107
108 \chinline{replaced}
109
110 Stating the author's id and/or a comment is optional.
111
112 For detailed information please refer to \autoref{sec:ui:changemanagement}.
113
114
115 \minisec{Highlight and comment text}
116
117 Maybe you want to highlight orcomment some text?
118
119 highlight text:
120
121 \chinline{highlight}
122
123 comment text:
124
125 \chinline{comment}
126
127 Stating the author's id and/or a comment for highlights is optional.
128
129 For detailed information please refer to \autoref{sec:ui:comment}.
130
131
132 \minisec{Typeset the document with \hologo{LaTeX}}
133
134 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}.
135 By processing your document the changed text is layouted as you stated by the corresponding options and/or special commands.
136
137 \minisec{Output list of changes}
138
139 You can print a list of changes using:
140
141 \chinline{listofchanges}
142
143 The list is meant to be the analogon to the list of tables, or the list of figures.
144
145 Stating the style is optional, default is \docoption{style=list}.
146 In order to print a quick overview of the number and kind of changes of every author, use the option \docoption{style=summary} or \docoption{style=compactsummary}.
147 Show only specific changes by using the \docoption{show} option.
148
149 By running \hologo{LaTeX} the data of the list is written into an auxiliary file.
150 This data is used in the next \hologo{LaTeX} run for typesetting the list of changes.
151 Therefore, two \hologo{LaTeX} runs are needed after every change in order to typeset an up-to-date list of changes.
152
153 For detailed information please refer to \autoref{sec:ui:overview}.
154
155
156 \minisec{Remove markup}
157
158 Often you want to remove the change markup after acknowledging or rejecting the changes.
159 You can suppress the output of changes with:
160
161 \chinline{usepackage_final_changes}
162
163 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.
164 You find the script \texttt{pyMergeChanges.py} in the directory:
165
166 \chinline[, language=bash]{path_script}
167
168 The script removes all markups either keeping or rejecting the change.
169 You can select or deselect markup from removal using the interactive mode by starting the script without options.
170
171 For detailed information please refer to \autoref{sec:remove-markup}.
172
173
174
175
176 %^^A ---- limitations
177 \cleardoublepage
178 \section{Limitations and possible enhancements}
179 \label{sec:limitations}
180
181 The \docpackage{changes}-package was carefully programmed and tested.
182 Yet the possibility of errors in the package exists, you might encounter problem during use, or you might miss functionality.
183
184 You can find a list of th emost important known problems and possible solutions in \autoref{sec:known-problems}.
185 Please refer to the section first if your problem is known and is a solution exists.
186 More errors, problems, and solutions are provided at:
187
188 \url{https://edgesoft.de/projects/changes/}
189
190 or
191
192 \url{https://gitlab.com/ekleinod/changes/-/issues}
193
194 You can write me an email too, please send it to \href{mailto:[email protected]}{[email protected]}.
195 In that case, please start your email subject with \texttt{[changes]}.
196
197 Change markup of texts works well, it is possible to markup whole paragraphs.
198 You cannot markup:
199
200 \begin{itemize}
201 \item figures
202 \item tables
203 \item headings
204 \item some commands
205 \item multiple paragraphs (sometimes)
206 \end{itemize}
207
208 You can try putting such text in an extra file and include in with \texttt{input}.
209 This works sometimes, give it a try.
210 Kudos to Charly Arenz for this tip.
211
212 If you experience errors about already defined macros, please see option \docoption{commandnameprefix}, \autoref{sec:ui:options:commandnameprefix}.
213
214 %^^A ---- user interface
215 \cleardoublepage
216 \section{User interface of the \docpackage{changes}-package}
217 \label{sec:ui}
218
219 This section describes the user interface of the \docpackage{changes}-package, i.e.\ all options and commands of the package.
220 Every option and new command is described.
221 If you want to see the options and commands in action, please refer to the examples in
222
223 \chinline[, language=bash]{path_doc_examples}
224
225 The example files are named with the used option respectively command.
226
227 %^^A -- options
228 \subsection{Package Options}
229 \label{sec:ui:options}
230
231 \chinline{usepackage_options_changes}
232
233 The package options control the behavior of the overall package, i.\,e.\ all markup commands.
234
235 The following options are defined:
236
237 \localtableofcontents
238
239
240
241 \subsubsection{draft}
242
243 \chinline{usepackage_draft_changes}
244
245 The \docoption{draft}-option enables markup of changes.
246 The list of changes is available via \doccommand{listofchanges}.
247 This option is the default option, if no other option is selected.
248
249 The \docpackage{changes} package reuses the declaration of \docoption{draft} in \doccommand{documentclass}.
250 The local declaration of \docoption{final} overrules the declaration of \docoption{draft} in \doccommand{documentclass}.
251
252 \subsubsection{final}
253
254 \chinline{usepackage_final_changes}
255
256 The \docoption{final}-option disables markup of changes, only the correct text will be shown.
257 The list of changes is disabled, too.
258
259 The \docpackage{changes} package reuses the declaration of \docoption{final} in \doccommand{documentclass}.
260 The local declaration of \docoption{draft} overrules the declaration of \docoption{final} in \doccommand{documentclass}.
261
262
263 \subsubsection{commandnameprefix}
264 \label{sec:ui:options:commandnameprefix}
265
266 \chinline{usepackage_commandnameprefix_changes}
267
268 The \docoption{commandnameprefix} option sets the prefixing strategy for the markup commands.
269 This is useful if another package already defined commands, e.g. \doccommand{comment} or \doccommand{highlight}.
270
271 Per default an error is raised if a command is already defined and no prefixing takes place (option not given or set to \docoption{none}).
272
273 If a prefix strategy is set, the command in question is prefixed with "ch".
274 The strategy determines which commands are prefixed.
275
276 This option only provides prefixed names for the markup commands:
277
278 \begin{itemize}
279 \item \doccommand{added} \ensuremath{\to} \doccommand{chadded}
280 \item \doccommand{deleted} \ensuremath{\to} \doccommand{chdeleted}
281 \item \doccommand{replaced} \ensuremath{\to} \doccommand{chreplaced}
282 \item \doccommand{highlight} \ensuremath{\to} \doccommand{chhighlight}
283 \item \doccommand{comment} \ensuremath{\to} \doccommand{chcomment}
284 \end{itemize}
285
286 The following strategies for \emph{commandnameprefix} are provided:
287
288 \begin{description}
289 \item [\docoption{none}] no prefix, a command already defined raises an error (default strategy)
290 \item [\docoption{ifneeded}] if a command is already defined, \docpackage{changes} prefixes this command and raises a warning.
291 Depending on the commands already defined, the document will contain a mix of prefixed and not prefixed markup commands.
292 This is mostly used if only \doccommand{comment} or \doccommand{highlight} are already defined and you mainly want to use the change commands \doccommand{added}, \doccommand{deleted}, and \doccommand{replaced}.
293 \item [\docoption{always}] all commands are prefixed, an according message is written to the log
294 \end{description}
295
296 \chexample{usepackage_commandnameprefix_changes}
297
298
299 \subsubsection{markup}
300
301 \chinline{usepackage_markup_changes}
302
303 The \docoption{markup} option chooses a predefined visual markup of changed text.
304 The default markup is chosen if no explicit markup is given.
305 The markup chosen with \docoption{markup} can be overwritten with the more special markup options \docoption{addedmarkup}, \docoption{deletedmarkup}, \docoption{commentmarkup}, or \docoption{highlightmarkup}.
306
307 The following values for \emph{markup} are defined:
308
309 \begin{description}
310 \item [\docoption{default}] default markup for added and deleted text, comments and highlighted text (default markup)
311 \item [\docoption{underlined}] underlined for added text, wavy underlined for highlighted text, default for deleted text, and comments
312 \item [\docoption{bfit}] bold added text, italic deleted text, default for comments and highlighted text
313 \item [\docoption{nocolor}] no colored markup, underlined for added text, wavy underlined for highlighted text, default for deleted text and comments
314 \end{description}
315
316 \chexample{usepackage_markup_changes}
317
318 When changing from color markup to markup without color and vice versa, some errors occur if an auxiliary file exists.
319 Please ignore the errors, they vanish in the second run.
320
321 \subsubsection{addedmarkup}
322
323 \chinline{usepackage_addedmarkup_changes}
324
325 The \docoption{addedmarkup} option chooses a predefined visual markup of added text.
326 The default markup is chosen if no explicit markup is given.
327 The option \docoption{addedmarkup} overwrites the markup chosen with \docoption{markup}.
328
329 The following values for \emph{addedmarkup} are defined:
330
331 \begin{description}
332 \item [\docoption{colored}] no text markup, just coloring -- {\color{orange} example} (default)
333 \item [\docoption{uline}] underlined text -- \uline{example}
334 \item [\docoption{uuline}] double underlined text -- \uuline{example}
335 \item [\docoption{uwave}] wavy underlined text -- \uwave{example}
336 \item [\docoption{dashuline}] dashed underlined text -- \dashuline{example}
337 \item [\docoption{dotuline}] dotted underlined text -- \dotuline{example}
338 \item [\docoption{bf}] bold text -- \textbf{example}
339 \item [\docoption{it}] italic text -- \textit{example}
340 \item [\docoption{sl}] slanted text -- \textsl{example}
341 \item [\docoption{em}] emphasized text -- \emph{example}
342 \end{description}
343
344 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.
345
346 \chexample{usepackage_addedmarkup_changes}
347
348
349 \subsubsection{deletedmarkup}
350 \label{sec:ui:options:deletedmarkup}
351
352 \chinline{usepackage_deletedmarkup_changes}
353
354 The \docoption{deletedmarkup} option chooses a predefined visual markup of deleted texty.
355 The default markup is chosen if no explicit markup is given.
356 The option \docoption{deletedmarkup} overwrites the markup chosen with \docoption{markup}.
357
358 The following values for \emph{deletedmarkup} are defined:
359
360 \begin{description}
361 \item [\docoption{sout}] striked out text -- \sout{example} (default)
362 \item [\docoption{xout}] crossed out text -- \xout{example}
363 \item [\docoption{colored}] no text markup, just coloring -- {\color{orange} example}
364 \item [\docoption{uline}] underlined text -- \uline{example}
365 \item [\docoption{uuline}] double underlined text -- \uuline{example}
366 \item [\docoption{uwave}] wavy underlined text -- \uwave{example}
367 \item [\docoption{dashuline}] dashed underlined text -- \dashuline{example}
368 \item [\docoption{dotuline}] dotted underlined text -- \dotuline{example}
369 \item [\docoption{bf}] bold text -- \textbf{example}
370 \item [\docoption{it}] italic text -- \textit{example}
371 \item [\docoption{sl}] slanted text -- \textsl{example}
372 \item [\docoption{em}] emphasized text -- \emph{example}
373 \end{description}
374
375 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.
376
377 \chexample{usepackage_deletedmarkup_changes}
378
379
380 \subsubsection{highlightmarkup}
381
382 \chinline{usepackage_highlightmarkup_changes}
383
384 The \docoption{highlightmarkup} option chooses a predefined visual markup for highlighted text.
385 The default markup is chosen if no explicit markup is given.
386 The option \docoption{highlightmarkup} overwrites the markup chosen with \docoption{markup}.
387
388 The following values for \emph{highlightmarkup} are defined:
389
390 \begin{description}
391 \item [\docoption{background}] markup by background color -- \colorbox{orange!30}{example} (default)
392 \item [\docoption{uuline}] double underlined text -- \uuline{example}
393 \item [\docoption{uwave}] wavy underlined text -- \uwave{example}
394 \end{description}
395
396 \chexample{usepackage_highlightmarkup_changes}
397
398
399
400 \subsubsection{commentmarkup}
401
402 \chinline{usepackage_commentmarkup_changes}
403
404 The \docoption{commentmarkup} option chooses a predefined visual markup for comments.
405 The default markup is chosen if no explicit markup is given.
406 The option \docoption{commentmarkup} overwrites the markup chosen with \docoption{markup}.
407
408 The following values for \emph{commentmarkup} are defined:
409
410 \begin{description}
411 \item [\docoption{todo}] comment as todo note, which is not added to list of todos \todo{example comment}(default)
412 \item [\docoption{margin}] comment in margin\marginpar{example comment}
413 \item [\docoption{footnote}] comment as footnote\footnote{example comment}
414 \item [\docoption{uwave}] wavy underlined text -- \uwave{example comment}
415 \end{description}
416
417 \chexample{usepackage_commentmarkup_changes}
418
419
420 \subsubsection{authormarkup}
421
422 \chinline{usepackage_authormarkup_changes}
423
424 The \docoption{authormarkup} option chooses a predefined visual markup of the author's identification.
425 The default markup is chosen if no explicit markup is given.
426
427 The following values for \emph{authormarkup} are defined:
428
429 \begin{description}
430 \item [\docoption{superscript}] superscripted text -- text\textsuperscript{author} (default)
431 \item [\docoption{subscript}] subscripted text -- text\textsubscript{author}
432 \item [\docoption{brackets}] text in brackets -- text(author)
433 \item [\docoption{footnote}] text in footnote -- text\footnote{author}
434 \item [\docoption{none}] no author identification
435 \end{description}
436
437 \chexample{usepackage_authormarkup_changes}
438
439
440 \subsubsection{authormarkupposition}
441
442 \chinline{usepackage_authormarkupposition_changes}
443
444 The \docoption{authormarkupposition} option chooses the position of the author's identification.
445 The default value is chosen if no explicit markup is given.
446
447 The following values for \emph{authormarkupposition} are defined:
448
449 \begin{description}
450 \item [\docoption{right}] right of the text -- text\textsuperscript{author} (default)
451 \item [\docoption{left}] left of the text -- \textsuperscript{author}text
452 \end{description}
453
454 \chexample{usepackage_authormarkupposition_changes}
455
456
457
458 \subsubsection{authormarkuptext}
459
460 \chinline{usepackage_authormarkuptext_changes}
461
462 The \docoption{authormarkuptext} option chooses the text that is used for the author's identification.
463 The default value is chosen if no explicit markup is given.
464
465 The following values for \emph{authormarkuptext} are defined:
466
467 \begin{description}
468 \item [\docoption{id}] author's id -- text\textsuperscript{id} (default)
469 \item [\docoption{name}] author's name -- text\textsuperscript{authorname}
470 \end{description}
471
472 \chexample{usepackage_authormarkuptext_changes}
473
474
475
476 \subsubsection{defaultcolor}
477
478 \chinline{usepackage_defaultcolor_changes}
479
480 The \docoption{defaultcolor} option defines the default color for authors, including the color for the default (anonymous) author.
481 You can use colors of the \docpackage{xcolor} package.
482
483 The default color is \emph{blue}.
484
485 \chexample{usepackage_defaultcolor_changes}
486
487
488 \subsubsection{todonotes}
489
490 \chinline{usepackage_todonotes_changes}
491
492 Options for the \docpackage{todonotes} package can be specified as parameters of the \docoption{todonotes}-option.
493 Several options or options with special characters have to be put in curly brackets.
494
495 \chexample{usepackage_todonotes_changes}
496
497
498
499 \subsubsection{truncate}
500
501 \chinline{usepackage_truncate_changes}
502
503 Options for the \docpackage{truncate} package can be specified as parameters of the \docoption{truncate}-option.
504 Several options or options with special characters have to be put in curly brackets.
505
506 \chexample{usepackage_truncate_changes}
507
508
509 \subsubsection{ulem}
510
511 \chinline{usepackage_ulem_changes}
512
513 Options for the \docpackage{ulem} package can be specified as parameters of the \docoption{ulem}-option.
514 Several options or options with special characters have to be put in curly brackets.
515
516 \chexample{usepackage_ulem_changes}
517
518
519 \subsubsection{xcolor}
520
521 \chinline{usepackage_xcolor_changes}
522
523 Options for the \docpackage{xcolor} package can be specified as parameters of the \docoption{xcolor}-option.
524 Several options or options with special characters have to be put in curly brackets.
525
526 \chexample{usepackage_xcolor_changes}
527
528
529
530 %^^A -- Change management ----------------------------------------------------------
531 \subsection{Change management}
532 \label{sec:ui:changemanagement}
533
534 \localtableofcontents
535
536 \chnewcmd{added}
537
538 \chinline{added}
539
540 The command \doccommand{added} marks newly added text.
541 The new text is given in curly braces.
542
543 The optional argument contains key-value-pairs for author-id and comment.
544 The author-id has to be defined using \doccommand{definechangesauthor}.
545 If the comment contains special characters or spaces, use curly brackets to enclose the comment.
546
547 If a comment is given, the direct author markup at the changes text is omitted, because the author is printed in the comment.
548
549 \chexample{added}
550 \chresult{added}
551
552
553 \chnewcmd{deleted}
554
555 \chinline{deleted}
556
557 The command \doccommand{deleted} marks deleted text.
558 The deleted text is given in curly braces.
559
560 For the optional arguments see \doccommand{added} (\autoref{sec:ui:cmd:added}).
561
562 \chexample{deleted}
563 \chresult{deleted}
564
565
566
567 \chnewcmd{replaced}
568
569 \chinline{replaced}
570
571 The command \doccommand{replaced} marks replaced text.
572 The new and the replaced text are given in this order in curly braces.
573
574 For the optional arguments see \doccommand{added} (\autoref{sec:ui:cmd:added}).
575
576 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.
577
578 \chexample{replaced}
579 \chresult{replaced}
580
581
582
583 %^^A -- Highlighting and Comments ------------------------------------------------------
584 \subsection{Highlighting and Comments}
585 \label{sec:ui:comment}
586
587 \localtableofcontents
588
589 \chnewcmd{highlight}
590
591 \chinline{highlight}
592
593 The command \doccommand{highlight} highlights text.
594 The highlighted text is given in curly braces.
595
596 For the optional arguments see \doccommand{added} (\autoref{sec:ui:cmd:added}).
597
598 \chexample{highlight}
599 \chresult{highlight}
600
601
602 \chnewcmd{comment}
603
604 \chinline{comment}
605
606 The command \doccommand{comments} adds a comment to the document.
607 The comment is given in curly braces.
608
609 The command has only one optional argument: a key-value-pair for the author-id.
610 The author-id has to be defined using \doccommand{definechangesauthor}.
611
612 The comments are numbered automatically, the number is printed in the comment.
613
614 \chexample{comment}
615 \chresult{comment}
616
617
618
619
620 %^^A -- Overview of changes
621 \subsection{Overview of changes}
622 \label{sec:ui:overview}
623
624
625 \chnewcmd{listofchanges}
626
627 \chinline{listofchanges}
628
629 The command \doccommand{listofchanges} outputs a list or summary of changes.
630 The first \hologo{LaTeX}-run creates an auxiliary file, the second run uses the data of this file.
631 Therefore you need two \hologo{LaTeX}-runs for an up-to-date list of changes.
632
633 There are three optional arguments:
634
635 \begin{description}
636 \item[\docoption{style}] list style
637 \item[\docoption{title}] individual title
638 \item[\docoption{show}] markup types
639 \end{description}
640
641 \paragraph{style}
642 The \docoption{style} argument defines the layout of the list of changes.
643 Three styles are defined:
644
645 \begin{description}
646 \item[\docoption{list}] prints the list of changes like a list of figures (default)
647 \item[\docoption{summary}] prints the number of changes grouped by author
648 \item[\docoption{compactsummary}] same as \docoption{summary} but entries with count 0 are omitted
649 \end{description}
650
651 \paragraph{title}
652 The \docoption{title} argument is used to change the title for the list.
653 If you want to use special characters or spaces in the title, enclose it in curly braces.
654
655 \paragraph{show}
656 The \docoption{show} argument defines which types of change markup are shown in the list of changes.
657 You can combine the values using the \texttt{|} character.
658 For example if you want to show all additions and deletions, use \texttt{show=added|deleted}.
659
660 The following values are defined:
661
662 \begin{description}
663 \item[\docoption{all}] show all types (default)
664 \item[\docoption{added}] show only additions
665 \item[\docoption{deleted}] show only deletions
666 \item[\docoption{replaced}] show only replacements
667 \item[\docoption{highlight}] show only highlights
668 \item[\docoption{comment}] show only comments
669 \end{description}
670
671 \chexample{listofchanges}
672
673
674
675 %^^A -- Author management -----------------------------------------------------
676 \subsection{Author management}
677 \label{sec:ui:authormanagement}
678
679 \chnewcmd{definechangesauthor}
680
681 \chinline{definechangesauthor}
682
683 The command \doccommand{definechangesauthor} defines a new author for changes.
684 You have to define a unique author's id, special characters or spaces are not allowed within the author's id.
685
686 You may define a corresponding color and the author's name.
687 If you do not define a color, blue is used.
688
689 The author's name is used in the list of changes and in the markup if you set the corresponding option.
690
691 The package predefines one anonymous author without id.
692
693 \chexample{definechangesauthor}
694
695
696 %^^A -- Adaptation of the output -----------------------------------------------------
697 \subsection{Adaptation of the output}
698 \label{sec:ui:customizingoutput}
699
700 \localtableofcontents
701
702 \subsubsection{Values for markup command definitions}
703
704 If you want to adapt the markup output, you can use any \hologo{LaTeX}-commands and special values resp.\ macros of the \docpackage{changes} package.
705 Some values or macros are specific for each command, they are described in the corresponding sections.
706
707 The following values and macros can be used in each command:
708
709 \begin{itemize}
710 \item any \hologo{LaTeX}-commands
711 \item author's color can be used with color ``authorcolor''
712 \item boolean test if colored change output is needed ``\doccommand{IfIsColored}''
713 \end{itemize}
714
715 I do not provide full access to all elements of the markup for every command in order to keep the macros simple.
716 For example, the author's id is only available for \doccommand{setcommentmarkup}.
717
718 The output of replaced text is a combination of added and deleted text.
719
720
721 \chnewcmd{setaddedmarkup}
722
723 \chinline{setaddedmarkup}
724
725 The command \doccommand{setaddedmarkup} defines the layout of added text.
726 The default markup is colored text, or the markup set with the option \docoption{markup} respectively \docoption{addedmarkup}.
727
728 Values for definition:
729
730 \begin{itemize}
731 \item added text can be used with ``\#1''
732 \end{itemize}
733
734 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.
735
736 \chexample{setaddedmarkup}
737
738
739 \chnewcmd{setdeletedmarkup}
740
741 \chinline{setdeletedmarkup}
742
743 The command \doccommand{setdeletedmarkup} defines the layout of deleted text.
744 The default markup is striked-out, or the markup set with the option \docoption{markup} respectively \docoption{deletedmarkup}.
745
746 Values for definition:
747
748 \begin{itemize}
749 \item deleted text can be used with ``\#1''
750 \end{itemize}
751
752 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.
753
754 \chexample{setdeletedmarkup}
755
756
757 \chnewcmd{sethighlightmarkup}
758
759 \chinline{sethighlightmarkup}
760
761 The command \doccommand{sethighlightmarkup} defines the layout of highlighted text.
762 The default markup is via a background color, or the markup set with the option \docoption{markup} respectively \docoption{highlightmarkup}.
763
764 Values for definition:
765
766 \begin{itemize}
767 \item highlighted text can be used with ``\#1''
768 \end{itemize}
769
770 \chexample{sethighlightmarkup}
771
772
773 \chnewcmd{setcommentmarkup}
774
775 \chinline{setcommentmarkup}
776
777 The command \doccommand{setcommentmarkup} defines the layout of comments.
778 The default markup is a margin note, or the markup set with the option \docoption{markup} respectively \docoption{commentmarkup}.
779
780 Values for definition:
781
782 \begin{itemize}
783 \item comment can be used with ``\#1''
784 \item author's id can be used with ``\#2''
785 \item author output (id or name) can be used with ``\#3''
786 \item comment count of the autor can be used with counter ``authorcommentcount''
787 \item boolean test if author is anonymous ``\doccommand{IfIsAnonymous}''
788 \end{itemize}
789
790 \chexample{setcommentmarkup}
791
792
793 \chnewcmd{setauthormarkup}
794
795 \chinline{setauthormarkup}
796
797 The command \doccommand{setauthormarkup} defines the layout of the author's markup in the text.
798 The default markup is a superscripted author's text.
799
800 Values for definition:
801
802 \begin{itemize}
803 \item author output (id or name) can be used with ``\#1''
804 \end{itemize}
805
806 \chexample{setauthormarkup}
807
808
809 \chnewcmd{setauthormarkupposition}
810
811 \chinline{setauthormarkupposition}
812
813 The command \doccommand{setauthormarkupposition} defines the position of the author's markup relative to the changed text.
814 The default position is right of the changed text.
815
816 The following values for \emph{authormarkupposition} are defined:
817
818 \begin{description}
819 \item [\docoption{right}] right of the text -- text\textsuperscript{author} (default)
820 \item [\docoption{left}] left of the text -- \textsuperscript{author}text
821 \end{description}
822
823 \chexample{setauthormarkupposition}
824
825
826 \chnewcmd{setauthormarkuptext}
827
828 \chinline{setauthormarkuptext}
829
830 The command \doccommand{setauthormarkuptext} defines the text for the author's markup.
831 The default markup is the author's id.
832
833 The following values for \emph{authormarkuptext} are defined:
834
835 \begin{description}
836 \item [\docoption{id}] author's id -- text\textsuperscript{id} (default)
837 \item [\docoption{name}] author's name -- text\textsuperscript{authorname}
838 \end{description}
839
840 \chexample{setauthormarkuptext}
841
842
843 \chnewcmd{setanonymousname}
844
845 \chinline{setanonymousname}
846
847 The command \doccommand{setanonymousname} sets the anonymous author's name.
848 The default name is the language dependent equivalent of ``anonymous''.
849
850 This option is helpful if you are the only author and you want your name to be displayed at the changes.
851
852 \chexample{setanonymousname}
853
854
855 \chnewcmd{settruncatewidth}
856
857 \chinline{settruncatewidth}
858
859 The command \doccommand{settruncatewidth} sets the width of the truncation in the list of changes to the given width.
860 The default width is \texttt{0.6}\doccommand{textwidth}.
861
862 \chexample{settruncatewidth}
863
864
865
866 \chnewcmd{setsummarywidth}
867
868 \chinline{setsummarywidth}
869
870 The command \doccommand{setsummarywidth} sets the width of the list of changes in summary style to the given width.
871 The default width is \texttt{0.3}\doccommand{textwidth}.
872
873 \chexample{setsummarywidth}
874
875
876
877 \chnewcmd{setsummarytowidth}
878
879 \chinline{setsummarytowidth}
880
881 The command \doccommand{setsummarytowidth} sets the width of the list of changes in summary style to the width of the given text.
882
883 \chexample{setsummarytowidth}
884
885
886
887 \chnewcmd{setlocextension}
888
889 \chinline{setlocextension}
890
891 The command \doccommand{setlocextension} sets the extension of the auxiliary file for the list of changes (loc-file\footnote{%
892 ``loc'' stands for ``list of changes''.
893 }).
894 The default extension is ``\texttt{loc}''.
895
896 In the example, the loc-file for ``\texttt{foo.tex}'' would be named ``\texttt{foo.listofchanges}'' resp.\ ``\texttt{foo.lochg}'' instead of the default name ``\texttt{foo.loc}''.
897
898 \chexample{setlocextension}
899
900 \chimportant{Do not use a \hologo{LaTeX} standard file extension, such as ``toc'' or ``lof'', as this would collide with the normal \hologo{LaTeX} run.}
901
902
903
904 \chnewcmd{setsocextension}
905
906 \chinline{setsocextension}
907
908 The command \doccommand{setsocextension} sets the extension of the auxiliary file for the summary of changes (soc-file\footnote{%
909 ``soc'' stands for ``summary of changes''.
910 }).
911 The default extension is ``\texttt{soc}''.
912
913 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}''.
914
915 \chexample{setsocextension}
916
917 \chimportant{Do not use a \hologo{LaTeX} standard file extension, such as ``toc'' or ``lof'', as this would collide with the normal \hologo{LaTeX} run.}
918
919
920
921 %^^A -- packages
922 \subsection{Used packages}
923 \label{sec:ui:packages}
924
925 The \docpackage{changes}-package uses already existing packages for it's functions.
926 You will find detailed description of the packages in their distributions.
927
928 The following packages are always required and have to be installed for the \docpackage{changes}-package:
929 \begin{description}
930 \item [etoolbox] provides an enhanced \doccommand{if}-commands, \emph{bools}, or list operations
931 \item [truncate] truncation of texts (used for list of changes)
932 \item [xkeyval] provides key-value-lists for parameters
933 \item [xstring] improves string operations
934 \end{description}
935
936 The following packages are sometimes required and have to be installed if used by the corresponding option:
937 \begin{description}
938 \item [todonotes] loaded if comments are layouted as todo notes (default markup)
939 \item [ulem] loaded if text has to be striked, wavylined or exed out (default markup)
940 \item [xcolor] loaded if colored text is used for markup (default markup)
941 \end{description}
942
943
944 %^^A ---- Remove markup from file
945 \cleardoublepage
946 \section{Remove markup from file}
947 \label{sec:remove-markup}
948
949 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.
950 You find the script in the directory:
951
952 \chinline[, language=bash]{path_script}
953
954 The script removes all markups either keeping or rejecting the change.
955 You can select or deselect markup from removal using the interactive mode by starting the script without options.
956
957 The script requires \emph{python3}.
958
959 Use the script as follows:
960
961 \chinputlisting{, language=bash}{userdoc/script_pymergechanges}
962
963 Run the script with no options and files for a short help text:
964
965 \chinputlisting{, language=bash}{userdoc/script_pymergechanges_empty}
966
967 Known issues:
968
969 \begin{itemize}
970 \item removes only markup that is used in one line, not markup that spans multiple lines
971 \end{itemize}
972
973
974 %^^A ---- Known problems and solutions
975 \cleardoublepage
976 \section{Known problems and solutions}
977 \label{sec:known-problems}
978
979 This section contains known problems and their solutions as far as I know some.
980 If your problem is not listed here, please see the issue tracker on gitlab if it contains your problem (a search exists):
981
982 \url{https://gitlab.com/ekleinod/changes/issues}
983
984 If your problem is not listed, please open a new issue for your problem.
985 Describe your problem as specific as possible, if possible, include a small example file with the problematic behavior.
986
987 \subsection{Special content}
988
989 Change markup of texts works well, it is possible to markup whole paragraphs.
990 You cannot markup:
991
992 \begin{itemize}
993 \item figures
994 \item tables
995 \item headings
996 \item some commands
997 \item several paragraphs (sometimes)
998 \end{itemize}
999
1000 You can try putting such text in an extra file and include in with \texttt{input}.
1001 This works sometimes, give it a try.
1002 Kudos to Charly Arenz for this tip.
1003
1004 \subsection{Footnotes and margin notes}
1005
1006 There is a problem of typesetting footnotes or margin notes in special environments, such as tables or the \emph{tabbing} environment.
1007 Avoid this type of markup when using these environments.
1008
1009
1010 \subsection{The \docpackage{ulem} package}
1011
1012 I am using the \docpackage{ulem} package for striking out text as default.
1013 This causes problems with some commands and environments, e.g.
1014
1015 \begin{itemize}
1016 \item in math mode
1017 \item when using the \docpackage{siunitx} package
1018 \item when using the \doccommand{citet} or \doccommand{citep} command
1019 \end{itemize}
1020
1021 In that case there are few good options, the best is to define the markup for deletions yourself and avoid the ulem package.
1022 See
1023
1024 \begin{itemize}
1025 \item \autoref{sec:ui:options:deletedmarkup}
1026 \item \autoref{sec:ui:cmd:setdeletedmarkup}
1027 \end{itemize}
1028
1029
1030 \subsection{Command already defined}
1031
1032 Some packages use the same names for their commands as the \docpackage{changes} package, in particular \doccommand{comment} and \doccommand{highlight} are not originally named commands.
1033
1034 In this case, \docpackage{changes} may prefix its commands to avoid naming collisions.
1035 This is controlled by the \docoption{commandnameprefix} option, see \autoref{sec:ui:options:commandnameprefix} for the documentation.
1036
1037 In order for this to work, the \docpackage{changes} package has to be loaded after the other packages or \docoption{commandnameprefix=always} must be selected.
1038
1039
1040 %^^A -- Authors -------------------------------------------------------------
1041 \cleardoublepage
1042 \section{Authors}
1043 \label{sec:authors}
1044
1045 Several authors contributed to the \docpackage{changes}-package.
1046 Many bugs and problems were solved or their solution inspired via de.comp.text.tex.
1047 Thanks.
1048
1049 The authors are (in alphabetical order):
1050 \begin{itemize}
1051 \item Chiaradonna, Silvano
1052 \item Cui, Yvon
1053 \item Fischer, Ulrike
1054 \item Giovannini, Daniele
1055 \item Kleinod, Ekkart
1056 \item Le Garrec, Vincent
1057 \item Mittelbach, Frank
1058 \item Richardson, Alexander
1059 \item Voss, Herbert
1060 \item Wölfel, Philipp
1061 \item Wolter, Steve
1062 \end{itemize}
1063
1064
1065
1066 %^^A -- Versions -------------------------------------------------------------
1067 \cleardoublepage
1068 \section{Versions}
1069 \label{sec:versions}
1070
1071 For a list of versions and the changes within these version, please refer to
1072
1073 \url{https://gitlab.com/ekleinod/changes/blob/master/changelog.md}
1074
1075 Here you too find the implemented but not released changes for the new version.
1076
1077 If you are interested in planned new features, please see
1078
1079 \url{https://gitlab.com/ekleinod/changes/milestones}
1080
1081
1082 %^^A ---- copyright, license
1083 \cleardoublepage
1084 \section{Distribution, Copyright, License}
1085
1086 Copyright 2007-2021 Ekkart Kleinod (\href{mailto:[email protected]}{[email protected]})
1087
1088 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.
1089 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.
1090
1091 This work has the LPPL maintenance status ``maintained''.
1092 The current maintainer of this work is Ekkart Kleinod.
1093
1094 This work consists of the files
1095
1096 \begin{tabbing}
1097 mm\=\kill
1098 \>\texttt{source/latex/changes/changes.drv}\\
1099 \>\texttt{source/latex/changes/changes.dtx}\\
1100 \>\texttt{source/latex/changes/changes.ins}\\
1101 \>\texttt{source/latex/changes/examples.dtx}\\
1102 \>\texttt{source/latex/changes/regression.dtx}\\
1103 \>\texttt{source/latex/changes/README}\\
1104 \>\texttt{source/latex/changes/userdoc/*.tex}\\
1105
1106 \>\texttt{scripts/changes/pyMergeChanges.py}
1107 \end{tabbing}
1108
1109
1110 and the derived files
1111
1112 \begin{tabbing}
1113 mm\=\kill
1114 \>\texttt{doc/latex/changes/changes.english.pdf}\\
1115 \>\texttt{doc/latex/changes/changes.english.withcode.pdf}\\
1116 \>\texttt{doc/latex/changes/changes.ngerman.pdf}\\
1117
1118 \>\texttt{doc/latex/changes/examples/changes.example.*.tex}\\
1119 \>\texttt{doc/latex/changes/examples/changes.example.*.pdf}\\
1120
1121 \>\texttt{doc/latex/changes/regression/changes.regression.*.tex}\\
1122 \>\texttt{doc/latex/changes/regression/changes.regression.*.pdf}\\
1123
1124 \>\texttt{tex/latex/changes/changes.sty}
1125 \end{tabbing}
1126
1127
1128 %^^A end of user documentation