% PaperMacros.tex of January 9, 1984 6:25 pm --- Stolfi
% TEX macros for single-column paper formats
% General comments
% To be used in conjunction with BasicMacros and a Font package.
% User also has to define a bunch of
% dimensional parameters (\textwidth, \itemindent, etc) required by
% those macros, as exemplified in TR10WideFormat, etc.
% Things to fix
% TITLES
% Begin new file
\def\begfile#1{\gdef\filestamp{#1}\gdef\newfile{T}}
% Paper title and related stuff (author, institution, abstract, keywords)
% Usage:
% \titlestuff{
% \title{P is equal to NP\cp (I think)}
% \shorttitle{P=NP(?)} % optional --- title for page headers
% \titlerule % A nice centered \hrule
% \author{I. Newton, {\rm Department of Cyberethics}}
% \author{A. Einstein, {\rm W. C. Fields Laboratory}}
% \institution{Sacred Well Divination School,
% Chichen Itza, Yucatan}
% \titlerule
% \abstract{In this paper we make some general remarks
% concerning an algorithm for solving a problem related to an
% important application of a well-known theoretical concept.}
% \keywords{the, that, of, and, in, is.}
% } % end of \titles
\def\titlestuff#1{
\def\title##1{\vskip0pt plus1ex
{\titlefont\baselineskip 2.0ex\lineskip0.1ex
\ctrpar\pagewidth pt{##1}}
\gdef\hdtitle{##1}
\vskip10pt}
\def\shorttitle##1{\gdef\hdtitle{##1}}
\def\titlerule{\ctrpar\pagewidth pt{
\vbox{\vskip0.5ex\hrule width 2.5truein\vskip0.5ex}} }
\def\author##1{\vbox
{\standardsize\ctrpar\pagewidth pt{\it ##1}}}
\def\institution##1{\vbox{\standardsize\ctrpar\pagewidth pt{\rm ##1}}}
\def\abstract##1{
\ctrpar \pagewidth pt{\standardsize
\lftpar \abstrwidth pt{##1}}}
\def\keywords##1{
\ctrpar \pagewidth pt{\standardsize
\lftpar \abstrwidth pt{{\:t KEYWORDS:} ##1}}}
\baselineskip -1pt \lineskip 1.2ex
\vskip3ex
#1
\vskip3ex}
% Support acknowledgement footnote
% Usage:
% \support{The author was partially supported by the kind
% collaboration of a starving army of slaves, by the
% plundering of half adozen neighboring villages,
% and by lavish gifts fromRamses III.}
%
\def\support#1{\botinsert{\small \hbox par \textwidth pt{#1}}}
% Section and subsection titles
% Usage:
% \section{1. Acid concepts}
% \subsection{1.1A. Annotation and Undefinitions}
% \subsection{Appendix A: The letters of the alphabet}
\def\section#1{
\vskip 3ex plus 2ex minus 0.5ex\penalty-800
\hbox{{\secfont #1}}
\penalty 1000\vskip 1ex}
\def\subsection#1{
\vskip 2ex plus 1.5ex minus 0.5ex\penalty-600
\hbox{{\subsecfont #1}}
\penalty 1000\vskip 1ex}
% MARGINAL FIGURES (by Aragones?)
% Usage: \mfig3cm <a paragraph at most 3cm high> \endmfig
\def\mfig#1cm{\keep#1cm \defmfigwidths \hsize\textwidth pt \par}
\def\endmfig{\par \defnormalwidths \hsize\textwidth pt \par}
% MISCELLANEOUS OPTIONS AND PARAMETERS
% (dimensions in points unless otherwise indicated)
% References
\def\refindent{4} % indentation of reference body (in em)
\def\refremindent{5} % indentation of reference remarks (in em)
\def\refvskip{2} % vskip between references (in ex)
% Algorithms
\def\algthickness{0.6} % thickness of block brackets
\def\alglevelindent{20} % extra indent. per level (incl. \algthickness)
\def\algstepindent{18} % indent. of \step text rel. to innermost bracket
\def\algcommindent{18} % indent. of \comm text rel. to innermost bracket
\def\algcontindent{8} % extra indentation of continuation lines
\def\algstepnoskip{3} % space between step number and step text
% Programs
\def\progthickness{0.6} % thickness of block brackets
\def\proglevelindent{12} % extra indent. per level (incl. \progthickness)
\def\progstepindent{4} % indent. of \step text rel. to innermost bracket
\def\progcommindent{4} % indent. of \comm text rel. to innermost bracket
\def\progcontindent{8} % extra indentation of continuation lines
% Proofs
\def\begproofmark{{\bf Proof: }}
\def\endproofmark{\penalty1000
\hbox{\hskip0.5em\vrule width 1.0ex height1.3ex depth0.3ex}} % black slug
% Figures
\def\figmark{} % change to, say, \hbox{>>==>} for PressEdit and such
% File stamp
\def\printfilestamp{T} % put \filestamp on 1st page
% OUTPUT ROUTINE
% Global flags and variables (internal)
\def\fpage{T} % T on first page of output.
\def\newfile{F} % T on first page of a new file.
\setcount0 1 % page number
% Page header and footer formats
\def\pageheaderbox{\vbox{
\vbox to 0pt{
\vskip0pt minus1000pt
\hbox to \pagewidth pt
{\headerfont \if T\fpage{} \else{\hdtitle\hfil\count0}}
\vskip 4 pt
\hrule
\vskip 3 pt
\hrule}
\vskip 20pt}}
\def\pagefooterbox{
\gdef\putfoot{T} % internal flag
\if T\printfilestamp {}\else{\gdef\putfoot{F}}
\if T\newfile {}\else{\gdef\putfoot{F}}
\vbox
{\if T\putfoot{
\vskip 15pt
\hbox to \pagewidth pt{\hfil \small\it \filestamp} }
\else {}} }
% Page format
\output{
\baselineskip -1pt \lineskip 0pt
\hbox{\hskip \leftskip pt
\vbox
{\pageheaderbox
\hbox to \pagewidth pt{\hss\vbox{\page}\hss}
\pagefooterbox}}
\advcount0
\gdef\newfile{F}
\gdef\fpage{F}
}
% INITIALIZATION
\defnormalwidths
\standardsize
\hsize\textwidth pt
\vsize\textheight pt