1

I am using the changes package. The final document that I wish to produce is such that

  1. Highlight the changed text
  2. Has a change list, naming added, and REPLACED text.

This could be achieved by changing the \replaced command so that it would only show the new text, and not the old. I cannot use \added instead of replaced as that would show as Added in the changes list.

here's my MWE

\documentclass{article}

\usepackage{changes}


\begin{document}

Alas my love you do me wrong, to cast me off discourteously. For I have loved you well \added{and long}, delighted in your \replaced{company}{corporation}  .


\listofchanges

\end{document}

And the output I'd like to achieve is this (I got it by cheating, the MWE does not generate it:

Desired Output

2 Answers 2

5

Here is a version that produces the required result:

\documentclass{article}

\usepackage{changes}

\makeatletter
\let\Changes@Markup@Deleted\@gobble
\makeatother

\begin{document}

Alas my love you do me wrong, to cast me off discourteously.
For I have loved you well \added{and long}, delighted in your \replaced{company}{corporation}.

\listofchanges

\end{document}

Output:

enter image description here

The \Changes@Markup@Deleted macro is what produces the highlighted replaced text (based on whatever style is set). We just define it to ignore its argument such that the produced text is always empty.

0
7

@siracusa's solution no longer works in recent versions of changes. While I'm not quite sure when this new command was added, this can now (February 2020) be done with \setdeletedmarkup as follows:

\makeatletter
\setdeletedmarkup{\@gobble{#1}}
\makeatother
0

You must log in to answer this question.

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