2

I have just found that the changes package is great for collaborative writing (I have MikTEX 2.9). The revised version of the paper should have modifications in a style or color different from the rest of the document. Could one force the \usepackage[final]{changes} to remove all markups as it usually does (very well), yet to keep a user-specified style/color for added/removed/replaced text?

\documentclass{article}
\usepackage[draft]{changes}
%\usepackage[final]{changes}
\definechangesauthor[name={John Doe}, color=red]{jd}
\setremarkmarkup{(#2)}

\begin{document}    
I would like it \replaced[id=jd]{in a different color}{in the same color} when the final mode in on.    
\end{document}
1
  • 1
    Welcome to TeX.SX! You can highlight code using back-ticks and insert links with [label](href). It is easier to help you if you add a minimal working example that takes the form \documentclass{...}\usepackage{....}\begin{document}...\end{document}. If possible, it should compile and have the minimum amount of code needed to illustrate your problem. This makes it much easier for people to troubleshoot your problem - and much more likely that they will!
    – user30471
    Jul 22, 2015 at 14:11

2 Answers 2

1

You could get the desired output (i.e. have the final markup, with a different color) using the following solution to my question:

\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}. \deleted {some deleted text.}


\end{document}
3

On a philosophical level, the final option should output a text as it would be without using the package.

Having said that, how about this solution? That way you do not change the default behaviour of the package and my using your own command you can switch on/off the coloring rather easily.

\documentclass{article}
% \usepackage[draft]{changes}
\usepackage[final]{changes}
\definechangesauthor[name={John Doe}, color=red]{jd}

\newcommand{\myreplaced}[3]{\replaced[id=#1]{\textcolor{red}{#2}}{#3}}

\begin{document}
I would like it \myreplaced{jd}{in a different color}{in the same color} when the final mode in on.
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.