-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxxxnotes.sty
More file actions
46 lines (39 loc) · 1.25 KB
/
xxxnotes.sty
File metadata and controls
46 lines (39 loc) · 1.25 KB
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
\ProvidesPackage{xxxnotes}[2013/12/19 v0.1 XXX macro]
\NeedsTeXFormat{LaTeX2e}
\newif\ifxxxnotes\xxxnotestrue
\newif\ifxxxwarn\xxxwarnfalse
\DeclareOption{draft}{\xxxnotestrue}
\DeclareOption{final}{\xxxnotesfalse\xxxwarntrue}
\ProcessOptions
\RequirePackage{xcolor}
\definecolor{xxxhigh}{rgb}{0.8,0,0}
\definecolor{xxxlow}{rgb}{0,0,0.8}
% There are two levels of XXX notes:
%
% Low-priority notes are things that are useful to keep track of, but
% don't necessarily need to be fixed. These are things that can
% remain in a final copy. This is a step above a TeX comment.
%
% High-priority notes are things that *must* be fixed, such as
% incomplete or incorrect text. These are things that must not remain
% in a final copy and will produce warnings if they are.
\DeclareRobustCommand{\XXX}{\@ifnextchar!{\@@XXXhigh}{\@XXXlow}}
\def\@@XXXhigh!{\@XXXhigh}
\newcommand{\@XXXhigh}[2][]{%
\@XXXformat{xxxhigh}{#1}{#2}%
\ifxxxwarn%
\PackageWarning{xxxnotes}{High-priority XXX note in final copy.}%
\fi%
}
\newcommand{\@XXXlow}[2][]{\@XXXformat{xxxlow}{#1}{#2}}
\newcommand{\@XXXformat}[3]{%
\ifxxxnotes%
{\color{#1}XXX%
\def\@temp{#2}%
\ifx\@temp\@empty\else~(#2)\fi%
\def\@temp{#3}%
\ifx\@temp\@empty\else~#3\fi%
}%
\fi%
}
\endinput