| 1 |
\documentclass{ltxdoc} |
| 2 |
\usepackage{minorrevision} |
| 3 |
\usepackage{url} |
| 4 |
\usepackage{framed} |
| 5 |
|
| 6 |
\begin{document} |
| 7 |
|
| 8 |
\title{The \textsf{minorrevision} package\thanks{This document corresponds to \textsf{minorrevision}~v1.1, dated~2013/11/15.}} |
| 9 |
\author{Matthieu Guillaumin\\ \texttt{[email protected]}} |
| 10 |
|
| 11 |
\maketitle |
| 12 |
|
| 13 |
\tableofcontents |
| 14 |
|
| 15 |
\section{Description and usage} |
| 16 |
|
| 17 |
\verb|minorrevision| is intended for researchers who publish articles in peer-reviewed |
| 18 |
journals. In the final stages of the review process, the authors typically have |
| 19 |
to provide an additional document (such as a letter to the editors) where they |
| 20 |
want to provide a list of modifications that they made to the manuscript. It |
| 21 |
is convenient for the editors to have line numbers and quotations from the |
| 22 |
manuscript in this letter. This package helps automatizing this task for the |
| 23 |
authors. |
| 24 |
|
| 25 |
This is a two-step process. |
| 26 |
|
| 27 |
\subsection{Step 1: Editing the reference document} |
| 28 |
In the manuscript (say \verb|manuscript.tex|), you need to declare the use |
| 29 |
of the package, by putting the following line in the preamble of your LaTeX |
| 30 |
source: |
| 31 |
\begin{verbatim} |
| 32 |
\usepackage{minorrevision} |
| 33 |
\end{verbatim} |
| 34 |
|
| 35 |
You should also add line numbers to your manuscript, also in the preamble: |
| 36 |
\begin{verbatim} |
| 37 |
\linenumbers |
| 38 |
\end{verbatim} |
| 39 |
|
| 40 |
Then, in the body of you manuscript, when you make a minor |
| 41 |
modification, you need to use the \verb|\revision| macro. For instance, if the |
| 42 |
following sentence was in your manuscript: |
| 43 |
\begin{verbatim} |
| 44 |
In this paper, we show that $1+1=2$. |
| 45 |
\end{verbatim} |
| 46 |
|
| 47 |
And, following reviews, you want to modify it to: |
| 48 |
\begin{verbatim} |
| 49 |
In this paper, we hypothetize that $1+1=2$. |
| 50 |
\end{verbatim} |
| 51 |
|
| 52 |
Then, instead of replacing the text directly, you should use the \verb|\revision| macro: |
| 53 |
\begin{quote} |
| 54 |
\verb|\revision| \marg{label} \marg{new text} \marg{old text} |
| 55 |
\end{quote} |
| 56 |
|
| 57 |
In your document, this looks like: |
| 58 |
\begin{verbatim} |
| 59 |
In this paper, we \revision{mymod}{hypothetize}{show} that $1+1=2$. |
| 60 |
\end{verbatim} |
| 61 |
|
| 62 |
Here, we have used the label \verb|mymod| for later reference. When compiling |
| 63 |
\verb|manuscript.tex| with LaTeX, only the new version of the text will appear. |
| 64 |
|
| 65 |
For text that is simply removed, you can use: |
| 66 |
\begin{quote} |
| 67 |
\verb|\revisionrm| \marg{label} \marg{old text} |
| 68 |
\end{quote} |
| 69 |
|
| 70 |
For text that is simply added: |
| 71 |
\begin{quote} |
| 72 |
\verb|\revisionadd| \marg{label} \marg{new text} |
| 73 |
\end{quote} |
| 74 |
|
| 75 |
A call to \verb|\revision{label}{text1}{text2}| is similar to |
| 76 |
\begin{verbatim} |
| 77 |
\revisionrm{label}{text2}\revisionadd{label}{text1} |
| 78 |
\end{verbatim} |
| 79 |
but the latter wouldn't work because the label would be defined twice. |
| 80 |
|
| 81 |
\subsection{Step 2: Editing the referring document} |
| 82 |
|
| 83 |
In the document where you want make reference to the manuscript, also add the \verb|minorrevision| package, and specify that \verb|manuscript.tex| is the reference: |
| 84 |
|
| 85 |
\begin{verbatim} |
| 86 |
\usepackage{minorrevision} |
| 87 |
\mrvdocument{manuscript} |
| 88 |
\end{verbatim} |
| 89 |
|
| 90 |
Note how \verb|.tex| should \textbf{not} be included in the \verb|\mrvdocument| macro. |
| 91 |
As of v1.1, you can have multiple references: |
| 92 |
|
| 93 |
\begin{verbatim} |
| 94 |
\mrvdocument{manuscript} |
| 95 |
\mrvdocument{manuscript2} |
| 96 |
\end{verbatim} |
| 97 |
|
| 98 |
You can now refer to the line numbers of modifications in the reference documents via their label names, by using: |
| 99 |
\begin{quote} |
| 100 |
\verb|\mrvref| \marg{reference} \marg{label} \\ |
| 101 |
\verb|\mrvold| \marg{reference} \marg{label} \\ |
| 102 |
\verb|\mrvnew| \marg{reference} \marg{label} |
| 103 |
\end{quote} |
| 104 |
|
| 105 |
\verb|reference| should correspond to the argument of \verb|\mrvdocument|. |
| 106 |
|
| 107 |
\begin{verbatim} |
| 108 |
On line~\mrvref{manuscript}{mymod}, we have replaced |
| 109 |
``\mrvold{manuscript}{mymod}'' with ``\mrvnew{manuscript}{mymod}''. |
| 110 |
\end{verbatim} |
| 111 |
|
| 112 |
It's up to you to format that as you prefer. |
| 113 |
The \verb|quote| or \verb|quotation| environments are probably better for larger modifications. |
| 114 |
|
| 115 |
For the latest declared reference document, the following simpler macros are available: |
| 116 |
\begin{quote} |
| 117 |
\verb|\revref| \marg{label}\\ |
| 118 |
\verb|\revold| \marg{label}\\ |
| 119 |
\verb|\revnew| \marg{label} |
| 120 |
\end{quote} |
| 121 |
|
| 122 |
This is particularly useful when there is no possible ambiguity, i.e when there is only one reference. |
| 123 |
|
| 124 |
\begin{verbatim} |
| 125 |
On line~\revref{mymod}, we have replaced ``\revold{mymod}'' |
| 126 |
with ``\revnew{mymod}''. |
| 127 |
\end{verbatim} |
| 128 |
|
| 129 |
\section{Implementation details} |
| 130 |
|
| 131 |
This package automatically adds the following packages: |
| 132 |
\begin{itemize} |
| 133 |
\item \textsf{xkeyval}: for passing options to the packages below |
| 134 |
\item \textsf{lineno}: to get line numbers of labels |
| 135 |
\item \textsf{xr}: to perform cross-reference between documents |
| 136 |
\end{itemize} |
| 137 |
|
| 138 |
When using the package, a new auxiliary file is created, with extention \verb|.mrv|. |
| 139 |
In the case of \verb|manuscript.tex|, the file will be \verb|manuscript.mrv|. |
| 140 |
The \verb|\revision| macro not only declares the label for \verb|lineno| and prints the new text to the document, but also writes two macro definitions in \verb|manuscript.mrv| with both the new and old text contents. |
| 141 |
The macro name depends on the name of the reference (here, \verb|manuscript|), and the label name (here, \verb|mymod|). |
| 142 |
|
| 143 |
When making the call to \verb|\mrvdocument|, those macro definitions are read (simply by inputting the file), and calls to \verb|\revref{mymod}|, \verb|\revold{mymod}| and \verb|\revnew{mymod}| (and \verb|\mrvref|, \verb|\mrvold| and \verb|\mrvnew|) become available. |
| 144 |
|
| 145 |
See \verb|minorrevision.sty| for the actual implementation with comments. |
| 146 |
|
| 147 |
\section{Bug reports} |
| 148 |
|
| 149 |
Please use the official bitbucket repository for bug reports, patch proposals and other questions: |
| 150 |
|
| 151 |
\begin{quote} |
| 152 |
\url{https://bitbucket.org/mguillau/latex-minorrevision} |
| 153 |
\end{quote} |
| 154 |
|
| 155 |
\end{document} |