3

The journal PLoS ONE, says in the FAQ

When submitting your revision, you will need to include the following new files:
[...] A ‘clean’ copy of your revised manuscript.
A revised manuscript with tracked changes. [...]

I'm using soul's \hl to highlight changes. So, I also need a version that doesn't highlight changes. To accomplish this, I added the following code. The \renewcommand{\hl}[1]{#1} is intended as a no-op. So the "clean" version would use \highlightfalse and the version with tracked changes would use \highlighttrue.

This appears to work, but I'm wondering if there are any problems with this approach, or better ways to do it.

\newif\ifhighlight
% COMMENT OUT \highlighttrue or \highlightfalse
\highlighttrue % or
%\highlightfalse
\ifhighlight
\else
\renewcommand{\hl}[1]{#1}
\fi
9
  • 2
    Have you seen this: TrackChanges - Collaborative editing of LaTeX documents?
    – Werner
    Aug 11, 2011 at 23:46
  • @Werner: I haven't, no. So this is a substitute for soul? Aug 11, 2011 at 23:53
  • Searching on trackchanges on this site also brings up changes. Can anyone comment on either of these? changes doesn't use soul, which might be a plus, since it is unmaintained and buggy. And the most recent update of changes is in 2011. Aug 12, 2011 at 0:00
  • 1
    If you do want to use highlighting with soul, then this approach seems fine to me (except that you example is missing the \newif\ifhighlight). Depending on how you compile your file, Passing parameters to a document (or any of its near-duplicates) could be of interest.
    – Caramdir
    Aug 12, 2011 at 2:36
  • 1
    I'm surprised no-one mentioned latexdiff yet.
    – mbork
    Aug 14, 2011 at 2:58

1 Answer 1

5

If you do want to use highlighting with soul, then this approach seems fine to me. Even better would be to create a sematic macro, like

\ifhighlight
    \let\change\hl
\else
    \newcommand{\change}[1]{#1}
\fi

Depending on how you compile your file, Passing parameters to a document (or any of its near-duplicates) could be of interest.

Since the trickery soul has to do can cause trouble, it might be worth to have a look packages that are explicitly designed for your application, like the changes package.

1
  • As mentioned in the comments above, I wound up using the changes package, and would not recommend the soul package, as it is unmaintained and I've had problems with it. Dec 22, 2011 at 20:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .