-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathdraft.tex
54 lines (43 loc) · 1.29 KB
/
draft.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
%%%%%%%%%%%%%%%%%%%%%
%% Draft versions %%
%%%%%%%%%%%%%%%%%%%%%
% A set of macros for adding "todo" and rough notes to
% documents. Usage: \todo{Todo note}.
% Pretty colours plz.
\usepackage{color}
% \ifdraft{} and \ifndef{} commands.
\newcommand{\ifdraft}[1]{\ifdef{\draft}{#1}{}}
\newcommand{\ifndraft}[1]{\ifdef{\draft}{}{#1}}
% \todo{} command.
\newcommand{\todo}[1]{\ifdraft{\noindent\textcolor{red}{\em\footnotesize#1}}}
% \TODO{} command.
\newcommand{\TODO}[1]{\ifdraft{\todo{\textbf{TODO:} #1}}}
% \note{} command.
\newcommand{\note}[1]{%
\ifdraft{\noindent\textcolor{blue}{\em\footnotesize note: #1}}%
}
% \checkme{} command.
\newcommand{\checkme}[1]{%
\ifdraft{\textcolor{blue}{#1}}%
\ifndraft{#1}%
}
% \fixme{} command.
\newcommand{\fixme}[1]{%
\noindent\textcolor{red}{\em\footnotesize#1}%
\ifndraft{\PackageWarning{draft}{fixme: #1}}%
}
% \FIXME{} command.
\newcommand{\FIXME}[1]{%
\todo{\textbf{FIXME:} #1}%
\ifndraft{\PackageWarning{draft}{FIXME: #1}}%
}
% \xref{} command.
\newcommand{\xref}[1]{%
\ifdraft{\textcolor{red}{\em (xref: #1)}}%
\ifndraft{\PackageWarning{draft}{Missing xref: #1}\textbf{???}}%
}
% \CitationNeeded{} placeholder.
\newcommand{\CitationNeeded}{%
\ifdraft{\textsuperscript{\textcolor{red}{\em (Citation needed)}}}%
\ifndraft{\PackageWarning{draft}{Citation needed}}%
}