\newdimen\fullhsize
\newdimen\pagewidth \newdimen\pageheight \newdimen\ruleht
\hsize=30pc \vsize=43pc \maxdepth=2.2pt \parindent=2.0pc
\pagewidth=\hsize \pageheight=\vsize \ruleht=.5pt
\fullhsize=\hsize
\def\fullline{\hbox to\fullhsize}
\abovedisplayskip=6pt plus 3pt minus 1pt
\belowdisplayskip=6pt plus 3pt minus 1pt
\abovedisplayshortskip=0pt plus 3pt 
\belowdisplayshortskip=4pt plus 3pt 
\parskip=0pt plus 1.4pt
\dimen8=0pc
\def\leftheadline{\hbox to \pagewidth{%
    \vbox to 10pt{} % strut to position the baseline
    \tenrm\kern-3pc\folio\hfill
    \lhead}} % running head flush left
\def\rightheadline{\hbox to \pagewidth{\vbox to 10pt{}%
    \tenrm\kern-3pc\rhead % running head flush right
    \hfill\folio}} 
\def\advancepageno{\ifnum\pageno<0 \global\advance\pageno by -1
  \else\global\advance\pageno by 1 \fi}
\newif\ifproofmode
\proofmodefalse
\newif\iftitle
\def\makefootline{\bigskip\line{\the\footline}}
\def\onepageout#1{\ifodd\pageno\hoffset=2pc\else\hoffset=-1pc\fi
		  \shipout\vbox{ % here we define one page of output
    \offinterlineskip % butt the boxes together
    \vbox to 2.5pc{ % this part goes on top of the 41pc pages
      \iftitle % \setcornerrules
      \else\ninepoint\ifodd\pageno
                         \rightheadline
		     \else
                         \leftheadline
                     \fi\tenpoint
      \fi \vfill}
    \vbox to \pageheight{
      \ifvoid\topins \else\unvbox\topins\fi
%      \ifvoid\margin\else % marginal info is present
%       \rlap{\kern34pc\vbox to0pt{\kern4pt\box\margin \vss}}\fi
      #1 % now insert the main information
      \ifvoid\footins\else % footnote info is present
       \vskip\skip\footins \kern-3pt
       \hrule height\ruleht width\pagewidth \kern-\ruleht \kern3pt
       \unvbox\footins\fi
      \boxmaxdepth=\maxdepth}
      \iftitle \global\titlefalse
               \bigskip\hbox to30pc{\hfill\tenpoint\folio}
      \else    \makefootline\fi
  }
  \advancepageno}
\newbox\partialpage
\def\begindoublecolumns{\begingroup
  \output={\global\setbox\partialpage=\vbox{\unvbox255\bigskip}}\eject
  \output={\doublecolumnout} \hsize=14pc \vsize=86.3pc}
\def\enddoublecolumns{\output={\balancecolumns}\eject
  \endgroup \pagegoal=\vsize}
\def\doublecolumnout{\splittopskip=\topskip \splitmaxdepth=\maxdepth
  \dimen8=43pc \advance\dimen8 by-\ht\partialpage
  \setbox0=\vsplit255 to\dimen8 \setbox2=\vsplit255 to\dimen8
  \onepageout\pagesofar \unvbox255 \penalty\outputpenalty}
\def\pagesofar{\unvbox\partialpage
  \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}}
\def\balancecolumns{\setbox0=\vbox{\unvbox255} \dimen8=\ht0
  \advance\dimen8 by\topskip \advance \dimen8 by -\baselineskip
  \divide\dimen8 by2 \splittopskip=\topskip
  {\vbadness=10000 \loop \global\setbox3=\copy0
    \global\setbox1=\vsplit3 to\dimen8
    \ifdim\ht3>\dimen8 \global\advance\dimen8 by1pt \repeat}
  \setbox0=\vbox to\dimen8{\unvbox1} 
  \setbox2=\vbox to\dimen8{\unvbox3}
  \vbox to 2.5pc{ % this part goes on top of the 41pc pages
     \ninepoint\ifodd\pageno
                     \rightheadline
               \else
                     \leftheadline
               \fi\tenpoint
  \vfill}
  \pagesofar}
\def\ind#1{\noindent {#1}\par}
\def\subind#1{\item{\hfil} #1\par}
