-
Notifications
You must be signed in to change notification settings - Fork 2
/
edit-macros.tex
116 lines (116 loc) · 4.22 KB
/
edit-macros.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
% ============================================================
%:Markup macros for proof-reading
\usepackage{ifthen}
\usepackage[normalem]{ulem} % for \sout
\usepackage{xcolor}
\newcommand{\ra}{$\rightarrow$}
\newboolean{showedits}
\setboolean{showedits}{true} % toggle to show or hide edits
%\setboolean{showedits}{false} % toggle to show or hide edits
\ifthenelse{\boolean{showedits}}
{
\newcommand{\meh}[1]{\textcolor{red}{\uwave{#1}}} % please rephrase
\newcommand{\ins}[1]{\textcolor{blue}{\uline{#1}}} % please insert
\newcommand{\del}[1]{\textcolor{red}{\sout{#1}}} % please delete
\newcommand{\chg}[2]{\textcolor{red}{\sout{#1}}{\ra}\textcolor{blue}{\uline{#2}}} % please change
\newcommand{\nbe}[3]{
{\colorbox{#3}{\bfseries\sffamily\scriptsize\textcolor{white}{#1}}}
{\textcolor{#3}{\sf\small$\blacktriangleright$\textit{#2}$\blacktriangleleft$}}}
}{
\newcommand{\meh}[1]{#1} % please rephrase
\newcommand{\ins}[1]{#1} % please insert
\newcommand{\del}[1]{} % please delete
\newcommand{\chg}[2]{#2}
\newcommand{\nbe}[3]{}
}
%
\newcommand\rA[1]{\nbe{Reviewer A}{#1}{cyan}}
\newcommand\rB[1]{\nbe{Reviewer B}{#1}{olive}}
\newcommand\rC[1]{\nbe{Reviewer C}{#1}{magenta}}
\newcommand\ANS[1]{\nbe{Response}{#1}{teal}}
% ============================================================
%:Box comments/edits
\usepackage[most]{tcolorbox}
\ifthenelse{\boolean{showedits}}
{
\newtcolorbox{inserted}{%
title=Inserted text:,
colframe=blue,colback=blue!5!white,
breakable,
leftrule=0mm,
bottomrule=0mm,
rightrule=0mm,
toprule=0mm,
arc=0mm, outer arc=0mm,
oversize
}
\newtcolorbox{deleted}{%
title=Deleted text:,
colframe=red,colback=red!5!white,
breakable,
leftrule=0mm,
bottomrule=0mm,
rightrule=0mm,
toprule=0mm,
arc=0mm, outer arc=0mm,
oversize
}
\newtcolorbox{refactored}{%
% title=Heavily modifed/refactored text:,
title=Rewritten text:,
colframe=blue,colback=red!5!white,
breakable,
leftrule=0mm,
bottomrule=0mm,
rightrule=0mm,
toprule=0mm,
arc=0mm, outer arc=0mm,
oversize
}
}{
\newenvironment{inserted}{}{}
%\newenvironment{deleted}{ \begin{comment} }{ \end{comment} }
\let\deleted\comment
\newenvironment{refactored}{}{}
}
% ============================================================
%:Put edit comments in a really ugly standout display
%\usepackage{ifthen}
\usepackage{amssymb}
\newboolean{showcomments}
\setboolean{showcomments}{true}
%\setboolean{showcomments}{false}
\newcommand{\id}[1]{$-$Id: scgPaper.tex 32478 2010-04-29 09:11:32Z oscar $-$}
\newcommand{\yellowbox}[1]{\fcolorbox{gray}{yellow}{\bfseries\sffamily\scriptsize#1}}
\newcommand{\triangles}[1]{{\sf\small$\blacktriangleright$\textit{#1}$\blacktriangleleft$}}
\ifthenelse{\boolean{showcomments}}
%{\newcommand{\nb}[2]{{\yellowbox{#1}\triangles{#2}}}
{\newcommand{\nbc}[3]{
{\colorbox{#3}{\bfseries\sffamily\scriptsize\textcolor{white}{#1}}}
{\textcolor{#3}{\sf\small$\blacktriangleright$\textit{#2}$\blacktriangleleft$}}}
\newcommand{\version}{\emph{\scriptsize\id}}}
{\newcommand{\nbc}[3]{}
\newcommand{\version}{}}
\newcommand{\nb}[2]{\nbc{#1}{#2}{orange}}
\newcommand{\here}{\yellowbox{$\Rightarrow$ CONTINUE HERE $\Leftarrow$}}
\newcommand\rev[2]{\nb{TODO (rev #1)}{#2}} % reviewer comments
\newcommand\fix[1]{\nb{FIX}{#1}}
\newcommand\todo[1]{\nb{TO DO}{#1}}
\newcommand\on[1]{\nbc{Oscar}{#1}{olive}} % add more author macros here
\newcommand\jv[1]{\nbc{Jurgen}{#1}{red}}
\newcommand\cg[1]{\nbc{Carol}{#1}{blue}}
\newcommand\jh[1]{\nbc{James}{#1}{brown}}
\newcommand\ck[1]{\nbc{Claude}{#1}{cyan}}
\definecolor{darkgreen}{rgb}{0,0.6,0}
\newcommand\katznote[1]{\nbc{Dan}{#1}{darkgreen}} % add more author macros here
\definecolor{bluegreen}{rgb}{0,0.5,0.5}
\newcommand\kt[1]{\nbc{Kt}{#1}{bluegreen}}
\newcommand\bc[1]{\nbc{Benoit}{#1}{purple}}
%\newcommand\XXX[1]{\nbc{XXX}{#1}{gray}}
%\newcommand\XXX[1]{\nbc{XXX}{#1}{olive}}
%\newcommand\XXX[1]{\nbc{XXX}{#1}{orange}}
%\newcommand\XXX[1]{\nbc{XXX}{#1}{darkgray}}
%\newcommand\XXX[1]{\nbc{XXX}{#1}{red}}
%\newcommand\XXX[1]{\nbc{XXX}{#1}{teal}}
%\newcommand\XXX[1]{\nbc{XXX}{#1}{violet}}
% ============================================================