-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake-edits.tex
117 lines (107 loc) · 2.24 KB
/
make-edits.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
%%
%% LaTeX source to reference manuscript changes in revision letters
%%
%% In the manuscript file:
%% 1. Include this file
%% \input{make-edits}
%% 2. Define manuscript modifications as
%% \myedit{UniqueLabel}{Text to appear in manuscript and revision letter}
%%
%% In the revision letter file:
%% 1. Include the automatically updated modifications file
%% \input{jobname.xtr}
%% 2. Include modified text with
%% \myeditUniqueLabel
%%
%% Marc A. Suchard
%% 24-Jul-2006
%%
\newwrite\XTR
\AtBeginDocument{\immediate\openout\XTR\jobname.xtr}
\AtEndDocument{\immediate\closeout\XTR}
\newcommand{\myedit}[2]{ % first options is a label, second options is the text
\parbox{0em}{
\shipout\box1{
\def\mynamea{myedit#1}
\def\mynameb{\csname \mynamea\endcsname}
\write\XTR{
\string\newcommand
{\csname myedit#1\endcsname}
}
\write\XTR{
{``\expandafter\string#2''
(pg.\string~\thepage)}
}
%\write\XTR{
% (pg.\string~\thepage)
%}
}
%\hspace*{-1in}
}
%
%\def\thistext{\noexpand#2}
% \immediate\write\XTR{
% % \begin{verbatim}
% \thistext
% % \end{verbatim}
% }
%\endgroup
%}
%\shipout\vbox{0}
% \label{\expand\mylabel}
% \thepage
% \mylabel
% \hspace*{-0em}
% {\bf#2}
#2
}
\newcommand{\myeditblank}[2]{ % first options is a label, second options is the text
\parbox{1em}{
\shipout\box1{
\def\mynamea{myedit#1}
\def\mynameb{\csname \mynamea\endcsname}
\write\XTR{
\string\newcommand
{\csname myedit#1\endcsname}
}
\write\XTR{
{\expandafter\string#2
(pg.\string~\thepage)}
}
%\write\XTR{
% (pg.\string~\thepage)
%}
}
%\hspace*{-1in}
}
%
%\def\thistext{\noexpand#2}
% \immediate\write\XTR{
% % \begin{verbatim}
% \thistext
% % \end{verbatim}
% }
%\endgroup
%}
%\shipout\vbox{0}
% \label{\expand\mylabel}
% \thepage
% \mylabel
% \hspace*{-1em}
% {\bf#2}
}
%\newlength{\strikewidth}
%\newlength{\strikelength}
%\setlength{\strikewidth}{1pt}
%\newcommand{\remove}[1]{
% \settowidth{\strikelength}{#1}
% #1\hspace{-\strikelength}
% \rule[0.5ex]{\strikelength}{\strikewidth}
%}
%\usepackage{ulem}
%\newcommand{\remove}[1]{\sout{#1}}
\newcommand{\remove}[1]{\hspace*{-1em}}
\newcommand{\add}[1]{
% {\bf #1}
#1%\hspace*{0em}
}