%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% OU Draft Style %% Mark Allman (mallman@cs.ohiou.edu) %% Ohio University Computer Science %% %% Last Updated: Fri Oct 1, 1999 %% %% 1.1: - Fri Oct 1, 1999 %% Added Mark's dstyle ``internal'' %% Added Mark's SDONOTE/FIXME/REMIND macros %% %% %% Usage: %% ------ %% In LaTeX you can include this style using the following: %% %% \usepackage{oudraft} %% %% The default behavior is to put a large ``DRAFT'' in the %% upper-left corner of every page. The position, size, text, %% etc. can be changed in your LaTeX by defining the variables below %% before including this package. An example: %% %% \def\dtext{SECRET} %% \usepackage{oudraft} %% %% This will use the word ``SECRET'' rather than draft. Any of the %% variable listed below can be tweaked in this way. Also, the %% position of the text can be changed by setting the ``dxlox'' and %% ``dyloc'' variable. You can set ``dxloc'' to ``left'', %% ``right'', or ``center''. Meanwhile, ``dyloc'' can be set to %% ``top'', ``bottom'', and ``center''. Finally, there are %% predefined styles. If you set the ``dstyle'' variable to %% ``big'', the word draft will be displayed diaganolly across each %% page in larger letters. If you set ``dstyle'' to ``slide'', the %% word ``DRAFT'' will be centered, but slightly larger than normal. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \message{OU Draft Style -- Mark Allman -- v1.1} \usepackage{ifthen} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Define the variables, unless they are previously defined (by the user). %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifx\undefined\dtext % text to be displayed \def\dtext{DRAFT} \fi \ifx\undefined\dtranslate % translation \def\dtranslate{ 200 30 } \fi \ifx\undefined\dgraylevel % darkness (0 = black; 1 = white) \def\dgraylevel{ 0.8 } \fi \ifx\undefined\dfont % font \def\dfont{ /Times-Bold } \fi \ifx\undefined\dscalefont % size of text \def\dscalefont{ 64 } \fi \ifx\undefined\drotate % rotation \def\drotate{ 0 } \fi \ifx\undefined\dxloc % x-axis location (left,right,center) \def\dxloc{left} \fi \ifx\undefined\dyloc % y-axis location (top,bottom,center) \def\dyloc{left} \fi \ifx\undefined\dstyle \def\dstyle{normal} % style (normal,big,slide) \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Define the "big" style. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifthenelse{\equal{\dstyle}{big}} {\def\dxco{ 0 } \def\dyco{ 0 } \def\drotate{ 65 } \def\dscalefont{ 220 } \def\dstyle{normal}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Define the "slide" style. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifthenelse{\equal{\dstyle}{slide}} {\def\dxco{ -100 } \def\dyco{ 320 } \def\dscalefont{ 120 } \def\dstyle{normal}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Define the "internal" style. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifthenelse{\equal{\dstyle}{internal}} {\def\dxco{ 0 } \def\dyco{ 40 } \def\drotate{ 65 } \def\dscalefont{ 100 } \def\dtext{INTERNAL USE} \def\dstyle{normal}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifthenelse{\not\(\equal{\dstyle}{normal}\)} {\message{OUDRAFT ERROR: Unknown substyle... Using normal...}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% If not yet defined, set the X and Y coordinates. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifx\undefined\dxco \ifthenelse{\equal{\dxloc}{left}} {\def\dxco{ -175 }} {\ifthenelse{\equal{\dxloc}{right}} {\def\dxco{ 175 }} {\ifthenelse{\equal{\dxloc}{center}} {\def\dxco{ 0 }} {\def\dxco{ -175 }}}} \fi \ifx\undefined\dyco \ifthenelse{\equal{\dyloc}{top}} {\def\dyco{ 675 }} {\ifthenelse{\equal{\dyloc}{bottom}} {\def\dyco{ 0 }} {\ifthenelse{\equal{\dyloc}{center}} {\def\dyco{ 360 }} {\def\dyco{ 675 }}}} \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Define the Postscript hook based on the variables set above. %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def\draftstamphook{/bop} \def\draftstamp{\special{! userdict begin \draftstamphook-hook{ gsave \dtranslate translate \drotate rotate \dfont findfont \dscalefont scalefont setfont \dxco \dyco moveto \dgraylevel setgray (\dtext) show grestore }def end}} \draftstamp %% For highlighting things that still need done %% (mostly stolen from Shawn) \newcommand{\SDONOTE}[2]{ { \noindent \medskip % \hspace{-1in} \setlength{\fboxrule}{2pt} \if@twocolumn \fbox{{\Large #1} \hspace{0.15in} \parbox[t]{1.75in}{\textit{#2}}} \else \fbox{{\Large #1} \hspace{0.15in} \parbox[t]{4.75in}{\textit{#2}}} \fi \medskip } } \newcommand{\FIXME}[1]{\SDONOTE{FIXME: }{#1}} \newcommand{\REMIND}[2]{\SDONOTE{\fbox{#1}}{#2}}