% Format82.TeX --- Stolfi March 7, 1984 0:32:48 am PST

% Document format pieces of Plain.fmt
% PARAGRAPH MACROS
% Items and indented paragraphs.
\newglue\textindentglue
\def\indentpar{\hangindent\textindentglue\ignorespaces}
\newglue\itemindentglue
\def\begitems{\par\vskip1ex plus0.3ex\penalty800 }
\def\enditems{\par\vskip1.1ex plus0.4ex \def\hangit#1#2{\par\vskip-0.1ex\hangindent#1\itemindentglue
{\llap{#1\enspace}\ignorespaces}
\def\item{\par\hangit{1}}
\def\itemitem{\par\hangit{2}}
\def\narrower{\advance\leftglue\textindentglue
\advance\rightglue\textindentglue}
% Digressions: small print text, indented.
\def\digress#1{\vskip 0.2ex plus0.5ex
{\narrower\small #1\par}\vskip0.2ex plus0.5ex}

\outer\def\bye{\par\vfill\supereject\end}
% FIGURES
% figures with caption at bottom
% Use \fig 5cm{\flower}{Figure 1: A Boojum}
% for a figure 5 cm high containing {\flower}, followed by a
% centered caption with the given text.
\newdimen\figcapwidth % width of figure captions
\def\fig#1#{\vf@g{#1}} % figure with caption at bottom
\def\vf@g#1#2#3{
\setbox2\hbox to \figcapwidth{
\vbox{\hsize=\figcapwidth #3}}
$$\vbox{
\vbox to #1{#2}
\ifdim 1ht2>0pt
\vskip2ex plus0.5ex
\hbox to \hsize{\hss\box2\hss}
\vskip 0.5ex \fi}$$}
% figures with legend at left
% Use \rfig5cm{\flower}{Figure 1: A Boojum},
% Use \lfig5cm{\flower}{Figure 1: A Boojum}
% for a figure 5 cm high and \mfigwidth wide on the right/left margin,
% with the given legend typeset by its side
\newdimen\mfigwidth % width of marginal figures
\def\rfig#1#{\mf@g{R}{#1}}
\def\lfig#1#{\mf@g{L}{#1}}
\def\mf@g#1#2#3#4{\dimen@=\hsize
\advance\dimen@ by \if R#1 -\leftglue\else -\rightglue\fi
\advance\dimen@ by -\mfigwidth
\setbox0\vbox to #2{
\vbox{\hsize=\mfigwidth\leftglue=0\rightglue=0 #3}\vss}
\setbox2\vbox to #2{
\vbox{\hsize=\dimen@\leftglue=0\rightglue=0 #4}\vss}
$$\hbox to \hsize{
\if R#1 \hskip\leftglue \box2 \box0
\else \box0\box2\hskip\rightglue\fi}$$}
% FOOTNOTES
% Non-splitting, non-floating footnotes
\newinsert\footins
\glue\footins=\footextraglue % space added when footnote is present
\count\footins=1000 % footnote magnification factor (1 to 1)
\dimen\footins=\maxdimen % no limits for now
\long\def\footinsert#1{\insert\footins
{{\interlinepenalty\@MM#1\vskip\footinsertsep}}
\long\def\footit#1#2{\small\hangindent\footindentglue
\llap\hbox{\large$^{#1}$}\kern 0.3em}#2}
\def\s@vesf\edef\@sf{\spacefactor\the\spacefactor}}
\long\def\foot#1#2{\s@vesf$^{#1}$\@sf
\footinsert{\vbox{\footit{#1}{#2}}}}
\def\footfig#1#2#3{\s@vesf$^{#2}$\@sf
\footinsert{\hbox
{\vbox{\hsize=\footfigwidth\footit{#1}{#2}}
\vbox to #3{}}}}
% top/mid/page inserts
\newinsert\topins
\def\flo@tit{\penalty100\splittopglue\z@glue
\splitmaxdepth\maxdimen\floatingpenalty\z@}
\glue\topins=\z@glue % no space added when a topinsert is present
\count\topins=1000 % magnification factor (1 to 1)
\dimen\topins=\maxdimen % no limit per page
\def\topinsert#1{\par{\insert\topins{\flo@tit\vbox{#1}
\forbid \vskip\topinsertsep}}}
\def\pageinsert#1{\par{\insert\topins{\flo@tit\vbox to\vsize{#1}}}}
\def\midinsert#1{\par{\setbox0\vbox{#1} \dimen@=\ht0
\advance\dimen@\dp0 \advance\dimen@2\bigvglue
\advance\dimen@\pagetotal
\ifdim\dimen@>\pagegoal\topinsert{\box\z@}
\else \bigskip\box\z@\bigbreak\fi}}
% REFERENCES
% Usage:
% \ref [Boo] \refauth{Boojum, C. D.}
% \reftit{Salting jubjubs in glue.}
% \refpub{J. of Beavers and Butchers V. 1 N. 357 (1999).}
% \refrem{Charming; reminds me of smiles and soap.}
\newglue\refvglue % extra vertical skip between references
\newdimen\refindent % indentation of references
\def\ref [#1]{\par\penalty-400\vskip \refvglue
\hangindent \refindent \hangafter=1
$\hbox to \refindent {[#1]\hss}$}
\def\refauth#1{\unskip {\rm #1}} % Author (s)
\def\reftit#1{\unskip\unskip, {\it #1}} % Title
\def\refpub#1{ {\rm #1}} % Publication
\long\def\refrem#1{\par
\vskip0.5ex{\advance\leftglue by \refremindent
{\small $\rpoint$ #1}}} % Review comments
% THEOREMS, DEFINITIONS, PROOFS
% Theorems, lemmas, conjectures, and definitions.
% Usage: \theorem{3.1}{P=NP.\tp Provided of course that N=1 or P=0.}
\newdimen\theostatindent % indentation of theorem statements
\def\lemma{\theolemma{\it}{Lemma}}
\def\theorem{\theolemma{\it}{Theorem}}
\def\corollary{\theolemma{\it}{Corollary}}
\def\conjecture{\theolemma{\it}{Conjecture}}
\def\definition{\theolemma{\rm}{Definition}}
\def\problem{\theolemma{\rm}{Problem}}
\long\def\theolemma#1#2#3#4{\par\medbreak
{\advance\leftglue by \theostatindent
\hskip-\theostatindent{\bf #2 #3. }{#1 #4}}\par
\ifdim\lastglue<\medvglue
\unvskip\penalty55\medskip\fi}
% Proofs.
% Usage: \proof Bla bla bla.\pp More bla bla bla. \qed
% (usually, but not necessarily, just after a \theorem or \lemma)
\newdimen\proofindent % indentation of theorem statements
\outer\def\proof{\beggroup \advance\leftglue by \proofindent
\begproofmark}
\outer\def\qed{\unskip\penalty1000\endproofmark\endgroup\par
\vskip 1.0ex plus 1.0ex}
% TITLES
% Begin new file
\def\begfile#1{\gdef\filestamp{#1}\gdef\newfile{T}}
% Paper title and related stuff (author, institution, abstract, keywords)
% Usage:
% \begintitles
% \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.}
% \endtitles
\def\begintitles{\begingroup
\hsize=\pagewidth\leftglue=0\rightglue=0
\baselinesep -1pt \linesep 1.2ex
\vskip3ex
}
\def\title#1{\vskip0pt plus1ex
{\titlefont\baselinesep 2.0ex\linesep.1ex
\ctrpar to\pagewidth{#1}}
\gdef\hdtitle{#1}
\vskip10pt}
\def\shorttitle#1{\gdef\hdtitle{#1}}
\def\titlerule{\ctrpar to\pagewidth{
\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}}}
\def\endtitles{\vskip3ex\endgroup}
% 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{
\bigbreak
\hbox{{\secfont #1}}
\penalty 1000\smallskip}
\def\subsection#1{
\medbreak
\hbox{{\subsecfont #1}}
\penalty 1000\smallskip}
% MISCELLANEOUS OPTIONS AND PARAMETERS
% (dimensions in points unless otherwise indicated)
% References
\refindent=4em % indentation of reference body (in em)
\refremindent=5em % indentation of reference remarks (in em)
\refvglue=2ex % vglue between references (in ex)
% Algorithms
\algthickness= 0.6pt % thickness of block brackets
\alglevelindent = 20pt % extra indent. per level (incl. \algthickness)
\algstepindent = 18pt % indent. of \step text rel. to innermost bracket
\algcommindent = 18pt % indent. of \comm text rel. to innermost bracket
\algcontindent = 8pt % extra indentation of continuation lines
\algstepnoglue = 3pt % space between step number and step text
% Programs
\progthickness = 0.6pt % thickness of block brackets
\proglevelindent = 12pt % extra indent. per level (incl. \progthickness)
\progstepindent = 4pt % indent. of \step text rel. to innermost bracket
\progcommindent = 4pt % indent. of \comm text rel. to innermost bracket
\progcontindent = 8pt % 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
\message{output routines,}
% Global flags and variables (internal)
\newif\printfilestamp \printfilestamptrue % T if file stamp is to be printed
\newif\firstpage \firstpagetrue % T on first page of output.
\newif\newfile \newfilefalse % T on first page of a new file.
\countdef\pageno=0 \pageno=1 % first page is number 1
% Page header and footer formats
\def\makeheadline{\vbox{
\vbox to 0pt{
\vskip0pt minus1000pt
\hbox to \pagewidth pt
{\headerfont \iffirstpage \else \hdtitle\hfil\count0 \fi}
\vskip 4 pt
\hrule
\vskip 3 pt
\hrule}
\vskip 20pt}}
\newif\putf@@t % internal flag
\def\makefootline\footline={
\putf@@ttrue
\ifprintfilestamp \else \putf@@tfalse\fi
\ifnewfile \else \putf@@tfalse \fi
\vbox
{\ifputf@@t{
\vskip 15pt
\hbox to \pagewidth pt{\hfil \small\it \filestamp} }
\fi} }
% Page format
\output{\plainoutput}
\def\plainoutput{\baselinesep -1pt \linesep 0pt
\shipout\vbox{\makeheadline\pagebody\makefootline}
\advance \pageno by 1
\newfilefalse
\firstpagefalse
\ifnum\outputpenalty>-\@MM \else\dosupereject\fi}
\def\pagebody{\vbox to\vsize{
\boxmaxdepth\maxdepth
\ifvoid\topins\else\unvbox\topins\fi
\unvbox\@cclv % open up \box255
\ifvoid\footins\else % footnote info is present
\vskip\glue\footins
\kern-3\p@ \hrule width 2truein \kern 2.6\p@
\unvbox\footins\fi}
}
\def\dosupereject{\ifnum\insertpenalties>\z@ % something is being held over
\line{}\kern-\topskip\forbid\vfill\supereject\fi}
% INITIALIZATION
\interparglue=0pt plus 1pt
\abovedisplayskip=12pt plus 3pt minus 9pt
\abovedisplayshortskip=0pt plus 3pt
\belowdisplayskip=12pt plus 3pt minus 9pt
\belowdisplayshortskip=7pt plus 3pt minus 4pt
\leftglue=0pt
\rightglue=0pt
\topskip=10pt
\splittopskip=10pt
\tabglue=0pt
\spaceskip=0pt
\xspaceskip=0pt
\parfillglue=0pt plus 1fil
\hsize=6.5in
\vsize=8.9in
\maxdepth=4pt
\splitmaxdepth=\maxdimen
\boxmaxdepth=\maxdimen
% \lineskiplimit=0pt, changed by \normalbaselines
% \hoffset=0pt
% \voffset=0pt
% \baselinesep=0pt, changed by \normalbaselines
% \lineglue=0pt, changed by \normalbaselines
% \parindent=0pt
% \hangindent=0pt, zeroed by TeX after each paragraph
% \predisplaysize=0pt, set before TeX enters $$

% \interparglue=0pt
% \abovedisplayskip=0pt
% \abovedisplayshortskip=0pt
% \belowdisplayskip=0pt
% \belowdisplayshortskip=0pt
% \leftglue=0pt
% \rightglue=0pt
% \topskip=10pt
% \splittopskip=10pt
% \tabglue=0pt
% \spaceskip=0pt
% \xspaceskip=0pt
% \parfillglue=0pt
% \fam=0
% \time=now % TeX does this at beginning of job
% \day=now % TeX does this at beginning of job
% \month=now % TeX does this at beginning of job
% \year=now % TeX does this at beginning of job
\thinmuglue=3mu
\medmuglue=4mu plus 2mu minus 4mu
\thickmuglue=5mu plus 5mu
% We also define special registers that function like parameters:
\newglue\smallvglue \smallvglue=3pt plus 1pt minus 1pt
\newglue\medvglue \medvglue=6pt plus 2pt minus 2pt
\newglue\bigvglue \bigvglue=12pt plus 4pt minus 4pt
\newglue\normalbaselineskip \normalbaselineskip=12pt
\newglue\normallineskip \normallineskip=1pt
\newdimen\normallineskiplimit \normallineskiplimit=0pt
\newdimen\jot \jot=3pt
\newcount\interdisplaylinepenalty \interdisplaylinepenalty=100
\newcount\interfootnotelinepenalty \interfootnotelinepenalty=100
\defnormalwidths
\standardsize
\hsize\textwidth pt
\vsize\textheight pt
\catcode`@=12 % at signs are no longer letters
\endlinechar=`\^^M % <return> at end of line will not be ignored