1. Packages
At CTAN, you will find several packages that offer some sort of ‘mark changes’. Mark up changes is in my opinion one of the few places where traditional text processor like LibreOffice Writer, AbiWord or MSWord have an advantage over Latex and a text editor. Marking changes in Latex source clutter the text and make it less readable (you have to compile to read the text). Also, when you are finished, you have to clean up the final source, removing all mark up, more or less by hand.
If you want to go the Latex way, one package you can try is changes, which seems pretty advances. You have the possibility to define different authors, so that each remark can be referred to a user. You can also load the package with the option nocolor
, so that deleted text are striked out and added text are underlined:
\usepackage[markup=nocolor]{changes}
One severe limitation is that you cannot mark up multiple paragraph within the same environment.
Since you are on Linux, you can run the included bash-script to remove all changes to clean up. Still, mark up changes in Latex is a lot of work.
Another package is changebar. It marks changes by bars in the margin, so it does not fulfil your requirements fully. On the other hand, you can mark up several paragraph in one environment, and changes may be nested.
Since you are running Linux, you may also try latexdiff. Since I am running Windows, which do not have a Perl installed, I have never used it, but according to its introduction on CTAN:
Latexdiff
is a Perl script for visual mark up and revision of significant differences between two latex files. Various options are available for visual markup using standard latex packages such as color
. Changes not directly affecting visible text, for example in formatting commands, are still marked in the latex source. A rudimentary revision facility is provided by another Perl script, latexrevise
, which accepts or rejects all changes. Manual editing of the difference file can be used to override this default behaviour and accept or reject selected changes only.
Program like WinMerge and similar utilities to compare text document, have also a lot to offer when comparing two source files. You have even utilities that can compare more than two files. The best effect you will have if you compare clean source files, and if you terminates each line with a hard line breaks. In WinMerge, you can copy lines from the left window to the right, and the changes show on a print out.
My favourite is DiffPDF, where I compile the (clean) original source file and the revised one (without marked changes) and compare the PDF-files. A limitation is of course that it is difficult to compare more than two files.
In my opinion, none of the existing solution for Latex will fully satisfy a work group’s requirements. If you are working mainly with text (not figures and tables), may be a better work flow will be to use one of the free text processors for the first, rough draft, and when the document is near finished, convert it to Latex for the final touch up.
UPDATE: In this question Werner is linking to the packages TrackChanges, which, according to the auhtor is:
... is a package for collaboratively editing LaTeX documents. It allows multiple editors to make changes and add annotations to a document. These changes and notes will be color coded by editor and added to the compiled document. The TrackChanges GUI allows the author to quickly find and accept, reject or modify the suggested edits.
It is licences under GPL 2.0. I have never used it, but maybe it is worth a try.
2. Direct use of soul
Based on Bristol’s last comment, I made a minimal example using the soul
directly (or more precisely, Heiko Oberdiek’s extended soulutf8
.
\documentclass{article}
\usepackage{fontspec}
\setmainfont[Ligatures = TeX]{TeX Gyre Pagella}
\usepackage{soulutf8}
\begin{document}
\section{Test}
\ul{This is new text to demonstrate the possibilities inside the soul package. \emph{Someone} told me that you cannot use the package to mark several paragraphs.
But multiple paragraph seems to work OK. You can even emphasize words to be underlined.}.\st{Here is som old old text that I have deleted. Is should not be read.
Also underlining seems to work even if we mark up several \emph{paragraphs}.You can even emphasize words to be striked out.}
\end{document}
The MWE compiled fine on my system (but not with the standalone
documentclass),. Maybe I have misunderstood what is Bristol’s problem with the soul
-package.
soul
markup cannot be nested (you cannot mark others markup for deletion using the command \st
. That limits its usefulness as a mark changes
-package.