% % anonymize.sty % %\NeedsTeXFormat{LaTeX2e} %\ProvidesPackage{anonymize}[2007/05/21] \usepackage{ifthen} \newboolean{@reviewcopy} \newboolean{@draftmode} \DeclareOption{draft}{\setboolean{@draftmode}{true}} \DeclareOption{submission}{\setboolean{@reviewcopy}{true}} \DeclareOption{final}{\setboolean{@reviewcopy}{false}} \ProcessOptions % % Draft % \newcommand{\tdd@padding}[1]{% \ifnum #1<10{0}\fi% #1% } \newcount\tdd@hour \newcount\tdd@minute \newcommand{\timestamp}{% % adapted from http://www.tug.org/pipermail/texhax/2002-April/000063.html \tdd@hour=\time% \tdd@minute=\time% \divide \tdd@hour by 60% \divide \tdd@minute by 60% \multiply \tdd@minute by 60% \tdd@minute=-\tdd@minute% \advance \tdd@minute by \time% \tdd@padding{\the\tdd@hour}:\tdd@padding{\the\tdd@minute}% } \ifthenelse{\boolean{@draftmode}} { \renewcommand{\@oddhead}{% \hskip1cm{\today{} \timestamp}\hfil% {\Large\textbf{DRAFT}}\hfil% {Do not cite or distribute}\hskip1cm} \renewcommand{\@evenhead}{\@oddhead} }{} % % Anonymization % \anoncite % \anonfootnote % \anon % % You can also use the following construct for more complex changes, like this: % \ifthenelse{\boolean{@reviewcopy}} % {Acknowledgments section omitted for review copy.} % {We acknowledge Dr. A, Dr. B and Dr. C for helpful support with the % WizWoz system.} % \ifthenelse{\boolean{@reviewcopy}}{ \newcommand{\anoncite}[1]{\cite{anonymous}} } { \newcommand{\anoncite}[1]{\cite{#1}} } \ifthenelse{\boolean{@reviewcopy}}{ \newcommand{\anonfootnote}[1]{\footnote{Footnote removed for review copy.}} } { \newcommand{\anonfootnote}[1]{\footnote{#1}} } \ifthenelse{\boolean{@reviewcopy}}{ \newcommand{\anon}[1]{[anonymized]} } { \newcommand{\anon}[1]{#1}}