Remarks using Changes Package

1,436

Here is a solution, if anyone is interested:

\documentclass{article}

%Packages
\usepackage{ifdraft}
\usepackage{lipsum}
\usepackage{changes}    

%Define Track Changes Author, and Color
\definechangesauthor[name={Nick Hamilton}, color=red]{nh}

%New 'Remark' command
\makeatletter
\newcommand{\Changes@Markup@Remark}[1]{\textbf{NOTE TO ED.:} #1}
\newcommand{\remark}[2][\@empty]{%
    \ifoptionfinal{}{
        \setkeys{Changes@added}{#1}%
        \Changes@output%
            {\Changes@Markup@Remark{#2}}%
            {#2}%
            {\Changes@added@id}%
            {\Changes@added@remark}%
            {#2}%
            {\changesaddname}%
            {\Changes@added@dec}%
            {\Changes@added@decid}%
            {\Changes@added@decremark}%
        \stepcounter{Changes@AddCount\Changes@added@id}%
    }
}
\makeatother

\begin{document}

\lipsum[1]\added[id=nh]{This is some new content}%
\deleted[id=nh]{, Content to Remove}, and %
\replaced[id=nh]{replaced}{original} content. %
\remark{As requested in initial review}

\end{document}

In DRAFT mode, the following results:

Draft

In FINAL mode, the following results:

Final

Share:
1,436
Nicholas Hamilton
Author by

Nicholas Hamilton

Updated on August 01, 2022

Comments

  • Nicholas Hamilton
    Nicholas Hamilton over 1 year

    Using the changes package, how can I create a 'remark', which is displayed in the same markup colour formatting, and included in the list of changes when in draft or normal mode, but is removed completely when in final mode.

    I wish to decorate a working paper for submission to journal, addressing reviewers comments in such a way that the remarks are removed completely when the final version is compiled.

    In other words, I might want to annotate somewhere saying like:

    The above figure has been modified in accordance with reviewers recommendation number XYZ.

    This annotation is not relevant to the final document, and is only included in the draft so that the editor can see very clearly that the reviewers comments have been explicitly addressed.

    So If I put the following in the preamble:

    \usepackage{changes}
    \definechangesauthor[name={Nick Hamilton}, color=red]{nh}
    

    I can markup newly added content, deleted content, or replaced contend

    This is \added[id=nh,remark={has to be in it}]{new} text.
    This is \deleted[id=nh,remark=obsolete]{unnecessary}text.
    This is \replaced[id=nh]{nice}{bad} text.
    

    In the above, when the document is in draft mode, these changes will be rendered in 'red' according to the definechangesauthor definition above. The content will be markedup when in draft mode, and rendered as usual when in final mode.

    I am really after another macro which renders in markup (just like above) when in draft mode, and is omitted completely when in final mode.