%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2up.tex %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\fileversion{0.9f+jtk}
\def\filedate{1994/01/31}
%%
%% File 2up.tex, for use with Generic TeX.
%%
%% COPYRIGHT 1992, by Timothy Van Zandt, tvz@Princeton.EDU
%%   
%% Copying of part or all of this file is allowed under the following
%% conditions only:
%% (1) You may freely distribute unchanged copies of the file. Please
%%     include the documentation when you do so.
%% (2) You may modify a renamed copy of the file, but only for personal
%%     use or use within an organization.
%% (3) You may copy fragments from the file, for personal use or for use
%%     in a macro package for distribution, as long as credit is given
%%     where credit is due.
%%
%% You are NOT ALLOWED to take money for the distribution or use of
%% this file or modified versions or fragments thereof, except for
%% a nominal charge for copying etc.
%%
% *******************************************************************
% **                         DESCRIPTION                           **
% *******************************************************************
%
% This style option allows one to print a document two-up, with considerable
% flexibility as to paper size and layout. It does this by making a few
% simple changes to TeX's output routine. It does not involve a dvidvi
% converter or PostScript code. It produces a standard dvi file. It should
% work with any TeX macro package (but see the next section).
%
% There are other tools for doing the same thing. Here is a comparison:
%
%  * PostScript filters: As long as you have or can generate the needed font
%    bitmaps (e.g., pk files), fonts will not be scaled and output quality
%    will be higher with 2up.tex than with a PostScript filter, unless of
%    course you are only using PostScript fonts.
%
%  * Rokicki's dvidvi: dvidvi is a versatil tool that does much more than
%    2up printing. It has one big advantage over 2up.tex for 2up printing:
%    2up.tex needs care to get the page references right. However, there are
%    a few reasons you might still like to use 2up.tex:
%     - It has an easy to use interface (for setting up magnification and
%       placing the pages in the right place);
%     - There is no extra step going from tex to dvi to the printer (and it
%       can be nice to control the output from within the TeX document); and
%     - Since it consists of TeX macros it can be easier (for some) to hack.
%
%
% *******************************************************************
% **                        COMPATIBILITY                          **
% *******************************************************************
%
% These macros should work with most TeX macro packages, except for the
% following possible compatibility problems:
%
% If you have used `true' dimensions in your document, you cannot reduce
% it and you may find it impossible to fit the two pages on a single one.
% `true' dimensions are a no-no if you want to change the magnification
% of a document. THIS INCLUDES THE USE OF PLAIN TEX'S \magnification
% MACRO, WHICH USES TRUE DIMENSIONS. INSTEAD OF \magnification, USE
% \mag AND SET THE PAGE DIMENSIONS (\hsize AND \vsize) APPROPRIATELY
% SCALED.
%
% Page cross-references will not be accurate, because finished pages are not
% immediately shipped out.  If you use page cross-references (as opposed,
% say, to an equation cross reference), or an index, or a table of contents,
% etc., follow this procedure:
%
%   1. Get to the point where everything is working right and you are ready
%   to print.
%   2. Run the job without the 2up macros, until all cross-references
%   are properly resolved. Run any index utility at this point.
%   3. Run the job ONE MORE TIME with the 2up macros; it will use the
%   correct cross-references from the previous runs. (In LaTeX documents,
%   it is useful at this point to include the \nofiles command, so that
%   the correct cross-references are preserved.)
% 
% The remaining compatibility problems are less likely to arise:
%
% If you use a macro package other than LaTeX that does unusual things 
% to end a document and/or that modifies the definition of \end, you may
% find that the last page is nor printed or that an extra page with
% headings is inserted at the end of the document. This is fixable on
% a case-by-case basis. See the redefinition of \end towards the end of
% this file for details.
%
% If you meddle with TeX's \shipout primitive after loading these macros,
% then these macros probably will not work (because they also meddle with
% this primitive).
%
% These macros use only TeX primitives, except for the following commands
% from Plain TeX, that are part of most macro packages:
%   \newbox, \newcount, \newdimen and \newif
%
% The first page of the source document is not on the first twoup target
% page (possible, for example, with twosided printing and the booklet option,
% but generally unlikely), \special's that come at the beginning of the
% document also do not get onto the first page of output. For some
% dvi drivers, this can mess up \special's for landscape printing or
% including a PostScript header file. In this case, you have to specify
% these things as command line options when using your dvi driver.
%
%
% *******************************************************************
% **                          PARAMETERS                           **
% *******************************************************************
%
% Terminology: The "source" layout is the layout of your document
%              the way it is usually printed.
%              The "target" layout is the layout when it
%              is printed two-up.
%
% After inputing this file, you must set the target and source layout:
%
%      \source{<mag>}{<width>}{<height>}
%      \target{<mag>}{<width>}{<height>}
%
%    a. <mag> is
%       - the integer nearest to 1000 times the magnification, or
%       - \magstep<n> for a magnification of 1.2^n (n=0,...,5), or
%       - \magstepminus<n> for a magnification of 1.2^{-n} (n=0,...,5).
%    To minimize the number of non-standard font magnifications, use one
%    of the last two options, and choose the target magnification closest to 1
%    such that the source pages fit properly in the target output,
%    keeping in mind that each source page is centered in half a target page.
%
%    b. <width> and <height> are the true width and height of the paper,
%     when looking at the output right side up.
%
% Don't change the magnification of your document after using the \target
% command, as you will override the settings made by twoup.tex.
%
% You can also specify some options:
%
%     \targetlayout{<options>}
%
% where <options> is a comma separated list with no spaces. Valid
% options are:
%
%    a. topbottom - The two source pages are printed one on top of the other.
%    b. twosided  - Odd pages are always printed on the right or the bottom.
%    c. booklet   - Pages are printed like a booklet, in page-skipping
%    		    increasing order (e.g. page with page1 on it, then
%		    page with page3 on it ...)
%    d. bookletduplex - Pages are printed like a booklet, in proper order
%		    for tumble printing on a duplex printer.
%
% For the booklet and bookletduplex options, you must have enough memory
% and box registers to hold all the pages in the document. A BigTeX
% should be able to handle at least a 32-page booklet.
%
% Finally, 2up.tex inserts a line between pages with the following dimensions:
%
%     \pagesepwidth       Thickness of line. (Default 0pt)
%     \pageseplength      Length of line. (Default 6.5in)
%     \pagesepoffset      Distance from bottom of page to bottom of line, or
%                         from side of page to beginning of line (topbottom).
%                         (Default 1in)
%
% MAKE NO OTHER CHANGES TO YOUR DOCUMENT EXCEPT THE FOLLOWING:
%
% -- You have to see to it that the target output is printed with the
% correct orientation (landscape or portrait).
%
% -- You can, but do not need to, use the following commands:
%
%    -- \twoupemptypage inserts a completely blank half page in the target.
%
%    -- LaTeX users: \twoupclearpage ejects a complete target page.
%
%    -- Plain TeX users: \twoupeject ejects a complete target page.
%
%
% *******************************************************************
% **                          DEFAULTS                             **
% *******************************************************************
%
% The following commands set the parameters for some common sources and
% targets. The definitions of these commands are also useful examples.
%
%
% I. \twouparticle -- THIS IS THE DEFAULT FOR LATEX
%
% Source: A portrait document on 8.5x11 inch paper with wide margins as
% used in LaTeX's article style, and without marginal notes.
%
% Target: A landscape document on the same size paper, with the source
% pages printed side by side.
%
% Definition:
%
%    \target{\magstepminus1}{11in}{8.5in}
%    \source{\magstep0}{8.5in}{11in}}
%
% If you use narrower side margins, or if you use marginal notes, then you
% will need to use \twoupplain or \twouplegaltarget, defined below.
%
% I. \twoupplain-- THIS IS THE DEFAULT FOR NON-LATEX
%
% Same as \twouparticle, but for source documents with narrower margins.
%
% Definition:
%
%    \target{\magstepminus1}{11in}{8.5in}
%    \source{\magstep0}{8.5in}{11in}}
%
% II. \twouplegaltarget.
%
% Source: A portrait document on 8.5x11 inch paper with just about any
% margins and perhaps with marginal notes.
%
% Target: A landscape document on legal size paper (8.5x14 inches),
% with the source pages printed side by side.
%
% Definition: 
%
%   \target{\magstepminus1}{14in}{8.5in}%
%   \source{\magstep0}{8.5in}{11in}%
%
%
% III. \twouplandscape.
%
% Source: A landscape document on 8.5x11 inch paper with just about any
% margins.
%
% Target: A portrait document on the same size paper, with the source pages
% stacked vertically.
%
% Definition:
%
%   \target{\magstepminus2}{8.5in}{11in}%
%   \source{\magstep0}{11in}{8.5in}%
%   \targetlayout{topbottom}}
%
%
% *******************************************************************
% **                         CHANGES                               **
% *******************************************************************
%
% JTK, 1994/01/31: add bookletduplex page ordering for duplex printing
%
% V0.9a: Everything redone. Too many differences to point out. Main
% changes to user interface are that \targetpaperwidth is now
% \targetwidth, etc., and there is a new twosidebyside layout. Previous
% version was for LaTeX only.
%
% V0.9b: Interface redone again. booklet option added.
%
% V0.9c: Pages ship out a little earlier. A few bugs fixed. 
% Parameters \pageseplength and \pagesepthickness added.
% 
% V0.9d: Fix bug with \twoupclearpage and \twoupeject.
%
% V0.9e: Made pages be counted (from dvi driver's viewpoint) by the physical
% page number.
%
% V0.9f: Reset \voffset and \hoffset instead of inserting glue in the
% box to be shipped out. Modified implementation of page separator.
% Parameter \pagesepoffset added, and \pagesepthickness changed to
% \pagesepwidth.
%
% *******************************************************************
% **                      IMPLEMENTATION                           **
% *******************************************************************
%
\edef\theatcode{\the\catcode`\@}
\ifnum\theatcode=13\let\theat @\fi
\catcode`\@=11\relax
%
\message{\space\space v\fileversion\space\space \filedate\space\space <tvz>}
%
% Parameter registers:
\newdimen\@targetwidth
\newdimen\@targetheight
\newdimen\pageseplength
\newdimen\pagesepwidth
\newdimen\pagesepoffset
\newdimen\twoup@hoffset
\newdimen\twoup@voffset
\newif\if@sidebyside
\@sidebysidetrue
\newif\if@twosided
%
% Registers used by output routine.
\newif\if@leftpage
\@leftpagetrue
\newbox\@leftpage
\newbox\@rightpage
\newcount\@physicalpage
%
% Since pages are shipped out half as often:
\multiply\maxdeadcycles by 2
%
% Registers used only for booklet layout:
\begingroup
\let\newcount\relax
\gdef\booklet@registers{%
  \newcount\bookletpage \bookletpage=0 \newcount\leftpagenumber
  \newcount\rightpagenumber \multiply\maxdeadcycles by 20}
\endgroup
%
% A useful extension of the \magstep macro.
\def\magstepminus#1{%
  \ifcase#1 \@m\or 833\or 694\or 579\or 482\or 401\fi\relax}
%
% \@targetwidth and \@targetheight are set to the *unmagnified* dimensions
% of the target page. \inv@targetmag is the inverse of the target
% magnification.
{\catcode`\p=12\catcode`\t=12\gdef\@@inv@@mag#1pt#2{\def#2{#1}}}
\def\target#1#2#3{%
  \mag #1\relax
  \@targetwidth=1000pt
  \divide\@targetwidth by #1\relax
  \expandafter\@@inv@@mag\the\@targetwidth\inv@targetmag
  \@targetwidth=#2\relax
  \@targetwidth=\inv@targetmag\@targetwidth
  \@targetheight=#3\relax
  \@targetheight=\inv@targetmag\@targetheight}
%
% \@sourcewidth and \@sourceheight are set to the *unmagnified* dimensions
% of the source page when measured *without* TeX's 1 inch margins.
% \@sourcewidth and \@sourceheight are ordinary command sequences; this
% saves on dimension registers. \twoup@hoffset is used as a scratch
% register.
\def\source#1#2#3{%
  \twoup@hoffset=1000pt
  \divide\twoup@hoffset by #1\relax
  \expandafter\@@inv@@mag\the\twoup@hoffset\@tempa
  \twoup@hoffset=#2\relax
  \advance\twoup@hoffset by -2in
  \twoup@hoffset=\@tempa\twoup@hoffset
  \edef\@sourcewidth{\the\twoup@hoffset}%
  \twoup@hoffset=#3\relax
  \advance\twoup@hoffset by -2in
  \twoup@hoffset=\@tempa\twoup@hoffset
  \edef\@sourceheight{\the\twoup@hoffset}}
%
% \targetlayout does a loop that reads the comma separated arguments.
% There can be no extraneous spaces.
\def\targetlayout#1{\process@targetlayout#1,+,}
\begingroup\let\newcount\relax
\gdef\process@targetlayout#1,{%
  \def\@tempa{booklet}%
  \def\@tempb{twosided}%
  \def\@tempc{topbottom}%
  \def\@tempd{+}%
  \edef\@tempe{#1}%
  \def\@tempf{bookletduplex}%
  \let\next\relax
  \ifx\@tempa\@tempe
    \booklet@registers
    \let\shipout\shipout@booklet
    \let\twoup@eject\twoup@eject@booklet
    \let\next\process@targetlayout
  \fi
  \ifx\@tempf\@tempe
    \booklet@registers
    \let\shipout\shipout@booklet
    \let\twoup@eject\twoup@eject@bookletduplex
    \let\next\process@targetlayout
  \fi
  \ifx\@tempb\@tempe
    \@twosidedtrue
    \let\next\process@targetlayout
  \fi
  \ifx\@tempc\@tempe
    \let\ship@twoup\ship@topbottom
    \let\next\process@targetlayout
    \@sidebysidefalse
  \fi
  \ifx\@tempd\@tempe
    \def\next{}%
  \fi
  \ifx\next\relax
    \begingroup
      \errhelp{Valid target layouts are "topbottom", "twosided",
            "booklet", and "bookletduplex".}
      \errmessage{`#1' is invalid 2up target layout - ignored.}
    \endgroup
    \let\next\process@targetlayout
  \fi
  \next}
\endgroup
%
% This is default macro for calculating the horizontal and vertical offsets
% for positioning each half-page.
\def\calc@sidebyside{%
  \begingroup
    \globaldefs=1
		\voffset=-1truein\hoffset=-1truein
    \twoup@hoffset .5\@targetwidth
    \advance\twoup@hoffset by -\@sourcewidth
    \divide\twoup@hoffset by 2
    \twoup@voffset \@targetheight
    \advance\twoup@voffset by -\@sourceheight
    \divide\twoup@voffset by 2
    \let\calc@sidebyside\relax
  \endgroup}
% This is the macro for calculating offsets for the topbottom layout:
\def\calc@topbottom{%
  \begingroup
    \globaldefs=1
		\voffset=-1truein\hoffset=-1truein
    \twoup@hoffset \@targetwidth
    \advance\twoup@hoffset by -\@sourcewidth
    \divide\twoup@hoffset by 2\relax
    \twoup@voffset .5\@targetheight
    \advance\twoup@voffset by -\@sourceheight
    \divide\twoup@voffset by 2
    \let\calc@topbottom\relax
  \endgroup}
%
% By default, TeX's \shipout primitive is modified so that it saves each page
% and prints out every two, using the \ship@twoup macro.
\let\normal@shipout\shipout
\def\shipout{%
  \if@leftpage
    \global\@leftpagefalse
    \def\next{\global\setbox\@leftpage=}%
    \if@sidebyside
      \if@twosided
        \ifodd\count\z@
          \global\setbox\@leftpage=\vbox{}%
          \def\next{\shipout}%
        \fi
      \fi
    \fi
  \else
    \global\@leftpagetrue
    \def\next{\afterassignment\ship@rightpage\global\setbox\@rightpage=}%
    \if@sidebyside
      \if@twosided
        \ifodd\count\z@
        \else
          \global\setbox\@rightpage=\vbox{}%
          \ship@twoup
          \def\next{\shipout}%
        \fi
      \fi
    \fi
  \fi
	\next}
%
% \ship@rightpage assigns the box to \@rightpage, and then invokes \ship@twoup
% to ship out the full page. \shipout is followed by an \hbox, \vbox or \vtop,
% in which case \ship@rightpage is invoked after the opening {, or it is
% followed by a \box or \copy, in which case \ship@rightpage is invoked after
% the full assignment. \ship@rightpage figures out which is the case by
% checking whether \@rightpage is void.
\def\ship@rightpage{%
  \ifvoid\@rightpage\aftergroup\ship@twoup\else\ship@twoup\fi}
%
% With the booklet option, all the pages are accumulated, and are then
% printed with the \ship@booklet, \booklet@loop and \ship@twoup macros.
% The \begingroup\let\newbox\relax ... \endgroup business is one way of
% overcoming the fact that \newbox may be defined to be outer.
\begingroup\let\newbox\relax
\gdef\shipout@booklet{%
  \global\advance\bookletpage by 1
  \expandafter\newbox\csname bookletbox\the\bookletpage\endcsname
  \def\next{\expandafter\global\expandafter\setbox
    \csname bookletbox\the\bookletpage\endcsname=}
  \if@twosided
    \count@\bookletpage
    \advance\count@ by -\count\z@
    \ifodd\count@
      \expandafter\global\expandafter\setbox
        \csname bookletbox\the\bookletpage\endcsname\hbox{}
      \def\next{\shipout}
    \fi
  \fi
  \next}
\endgroup
\def\ship@booklet{%
  \ifnum\leftpagenumber>\bookletpage
    \setbox\@leftpage=\hbox{}
  \else
    \setbox\@leftpage=\expandafter\box
      \csname bookletbox\the\leftpagenumber\endcsname
  \fi
  \ifnum\rightpagenumber>\bookletpage
    \setbox\@rightpage=\hbox{}
  \else
    \setbox\@rightpage=\expandafter\box
      \csname bookletbox\the\rightpagenumber\endcsname
  \fi
  \count\z@\rightpagenumber
  \ship@twoup
  \booklet@loop}
\def\booklet@loop{%
  \advance\rightpagenumber by 2
  \advance\leftpagenumber by -2
  \ifnum\leftpagenumber<1\else\ship@booklet\fi}
\def\ship@bookletduplex{%
  \ifnum\leftpagenumber>\bookletpage
    \ifodd\leftpagenumber
	\setbox\@rightpage=\hbox{}
    \else
	\setbox\@leftpage=\hbox{}
    \fi
  \else
    \ifodd\leftpagenumber
	    \setbox\@rightpage=\expandafter\box
	      \csname bookletbox\the\leftpagenumber\endcsname
    \else
	    \setbox\@leftpage=\expandafter\box
	      \csname bookletbox\the\leftpagenumber\endcsname
    \fi
  \fi
  \ifnum\rightpagenumber>\bookletpage
	\ifodd\rightpagenumber
	    \setbox\@rightpage=\hbox{}
	\else
	    \setbox\@leftpage=\hbox{}
	\fi
  \else
	\ifodd\rightpagenumber
	    \setbox\@rightpage=\expandafter\box
	      \csname bookletbox\the\rightpagenumber\endcsname
	\else
	    \setbox\@leftpage=\expandafter\box
	      \csname bookletbox\the\rightpagenumber\endcsname
	\fi
  \fi
  \count\z@\rightpagenumber
  \ship@twoup
  \bookletduplex@loop}
\def\bookletduplex@loop{%
%  \advance\rightpagenumber by 2
%  \advance\leftpagenumber by -2
  \advance\rightpagenumber by 1
  \advance\leftpagenumber by -1
  \ifnum\leftpagenumber<\rightpagenumber\else\ship@bookletduplex\fi}
%
% This is the default macro that actually ships out each pair of pages.
\def\ship@twoup{\calc@sidebyside
  \begingroup
	  \global\advance\@physicalpage by 1
	  \count\z@=\@physicalpage
		\normal@shipout\hbox{%
				\hbox to .5\@targetwidth{%
					\hskip \twoup@hoffset
					\vbox to \@targetheight{\vskip\twoup@voffset\box\@leftpage\vss}%
					\hss}%
				\pagesep@sidebyside
				\hbox to .5\@targetwidth{%
					\hskip \twoup@hoffset
					\vbox to \@targetheight{\vskip\twoup@voffset\box\@rightpage\vss}%
					\hss}}%
	\endgroup}
\def\pagesep@sidebyside{%
  \begingroup
		\advance\pageseplength by \pagesepoffset
		\pagesepwidth=\inv@targetmag\pagesepwidth
		\kern -.5\pagesepwidth
		\vrule height \inv@targetmag\pageseplength
						depth -\inv@targetmag\pagesepoffset
						width \pagesepwidth
		\kern -.5\pagesepwidth
	\endgroup}
%
% This is the macro for shipping out each pair of pages with the
% topbottom option.
\def\ship@topbottom{\calc@topbottom
  \begingroup
	  \global\advance\@physicalpage by 1
	  \count\z@=\@physicalpage
		\dp\@leftpage=\z@\dp\@rightpage=\z@
    \normal@shipout\vbox{\offinterlineskip
		  \moveright\twoup@hoffset\vbox to .5\@targetheight{%
					\vskip\twoup@voffset\box\@leftpage\vss}%
		  \pagesep@topbottom
			\moveright\twoup@hoffset\vbox to .5\@targetheight{%
					\vskip\twoup@voffset\box\@rightpage\vss}}%
	\endgroup}
\def\pagesep@topbottom{%
  \begingroup
		\pagesepwidth=\inv@targetmag\pagesepwidth
		\vskip -.5\pagesepwidth
		\moveright\inv@targetmag\pagesepoffset\hbox{%
		  \vrule height\pagesepwidth width\inv@targetmag\pageseplength}
		\vskip -.5\pagesepwidth
	\endgroup}
%
% This one is easy:
\def\twoupemptypage{\shipout\hbox{}}
%
% This clears a whole target page if there is a saved left page. Note that
% this does not invoke the output routine; i.e., it is not like \clearpage
% or \supereject. See \twoupclearpage and \twoupeject below.
\def\twoup@eject{%
  \if@leftpage\else
    \global\setbox\@rightpage\hbox{}\ship@twoup
    \global\@leftpagetrue
  \fi}
  
% This is the definition of \twoup@eject with the booklet option:
\def\twoup@eject@booklet{%
  \leftpagenumber\bookletpage
  \advance\leftpagenumber by 3
  \divide\leftpagenumber by 4
  \multiply\leftpagenumber by 4
  \rightpagenumber=1
  \ship@booklet}
% This is the definition of \twoup@eject with the bookletduplex option:
\def\twoup@eject@bookletduplex{%
  \leftpagenumber\bookletpage
  \advance\leftpagenumber by 3
  \divide\leftpagenumber by 4
  \multiply\leftpagenumber by 4
  \rightpagenumber=1
  \ship@bookletduplex}
%
% This modification is needed for \LaTeX in order to get the last page
% printed out if the final page is a left page (the catcode business is
% because \enddocument is \let to \bye in amstex):
\begingroup
\expandafter\ifx\csname @latexerr\endcsname\relax
  \catcode`\>=14\else\catcode`\>=9\fi\relax
>>\gdef\twoupclearpage{\clearpage\twoup@eject}
>>\expandafter\@temptokena\expandafter{\enddocument}
>>\xdef\enddocument{\noexpand\twoupclearpage\the\@temptokena}
\endgroup
%
% For most other macro packages we could just leave be and all pages would
% always be printed because of the way the \end primitive works (except that
% TeX will go bonkers with the booklet layout). However,
% sometimes a blank filler page would be printed *with* headings. We prefer
% the filler page to be truly blank. To achieve this,  we hack the definition
% of \end. This may cause problems with some macros.
\expandafter\ifx\csname @latexerr\endcsname\relax
  \let\twoup@@@end\end
  \def\end{\twoup@eject\twoup@@@end}
  \def\twoupeject{\par\vfil\supereject\twoup@eject}
\fi
%
% Defaults:
\def\twouparticle{%
  \target{\magstepminus1}{11in}{8.5in}%
  \source{\magstep0}{8.5in}{11in}}
\def\twoupplain{%
  \target{\magstepminus2}{11in}{8.5in}%
  \source{\magstep0}{8.5in}{11in}}
\def\twouplegaltarget{%
  \target{\magstepminus1}{14in}{8.5in}%
  \source{\magstep0}{8.5in}{11in}}%
\def\twouplandscape{%
  \target{\magstepminus2}{8.5in}{11in}%
  \source{\magstep0}{11in}{8.5in}%
  \targetlayout{topbottom}}
\expandafter\ifx\csname @latexerr\endcsname\relax
  \twoupplain\else\twouparticle\fi
\pagesepwidth 0pt
\pageseplength 6.5in
\pagesepoffset 1in
%
\expandafter\catcode`\@=\theatcode\relax
\ifnum\theatcode=13\let @\theat\fi
\endinput
%%%%%%%%%%%%%%%%%%%%%%%%% END 2up.tex %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
