summaryrefslogtreecommitdiff
path: root/macros/latex209/contrib/misc/unfinished.tex
blob: 3904365789903a01d42fc953924fbf9ffa491b4b (plain)
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
% -*- Mode: TeX -*-

\ifx\thisfileis\anUndefinedMacro\input maybeload \fi

\thisfileis{<eb.tex.texlocal>unfinished} % abort loading if already loaded

% This file defines a LaTex environment that's convenient for marking unfinished
% sections of a paper.
%
% \begin{unfinished}
% \* explain the hairy stuff
% \* give examples
% \end{unfinished}
%
% There are also the abbreviations \notfinished and \notwritten.
% 
% The \begin{unfinished}...\end{unfinished} environment is like an
% itemize environment, but it also types a warning if it occurs
% in a document that's not a draft (as determined heuristically by
% the setting of \overfullrule).
%
% To shut off the \unfinished sections entirely in a pinch, you
% can use the command \killunfinished.  Of course, normally
% you should repair them by finishing them.  There may be
% bugs in the \killunfinished mechanism.

\newcommand{\unfinished}{\ifdim\overfullrule > 0pt\else
   \typeout{WARNING:  Unfinished section not in a draft.}
   \fi\def\*{\item{}}\bgroup\itemize}

\newdef\endunfinished{\egroup\enditemize}

\newcommand{\unfinisheditem}[1]{\begin{unfinished}
\item #1
\end{unfinished}}

\newcommand{\notfinished}{\unfinisheditem{not finished yet}}
\newcommand{\notwritten}{\unfinisheditem{not written yet}}

\makeatletter
\newdef\killunfinished{\def\unfinished{\setbox9\vbox\bgroup\itemize}
\def\endunfinished{\egroup}}
\makeatother