% GSMACRO.TEX, VERSION 3.12
% Macro file for two-up TeX files
% February 19, 1998
% Written by Alan Guth
% Conditional variables chosen for generic use, 8.286 web page

% TO INSPECT OR MODIFY CONDITIONAL VARIABLES, SEARCH FOR ****

% So that subsequent input packages can know that the
%   magnification has been set (at 1000):
   \def\magset{true}

% Font definition files and graphics files will be sought first
%    in the current directory, and then along the following path. 
%    To add to the path, edit this file or use 
%            \addtopath <Directory-name>
%    in your source TeX file.

\def\path{/ctpa04/guth/gletter/, IRENEDKA200:[THEORY.GUTH.GLETTER]} 

%Redefinition of \alloc@ and \newinsert, to avoid writing of
%   counter numbers to output .lis file
% We make @ signs act like letters, temporarily.
\catcode`@=11
\def\alloc@#1#2#3#4#5{\global\advance\count1#1by\@ne
  \ch@ck#1#4#2% make sure there's still room
  \allocationnumber=\count1#1%
  \global#3#5=\allocationnumber
  \writelog{#5}{#2}}
\outer\def\newinsert#1{\global\advance\insc@unt by\m@ne
  \ch@ck0\insc@unt\count
  \ch@ck1\insc@unt\dimen
  \ch@ck2\insc@unt\skip
  \ch@ck4\insc@unt\box
  \allocationnumber=\insc@unt
  \global\chardef#1=\allocationnumber
  \writelog{#1}{\insert}}
\def\writelog#1#2{}

% CONDITIONAL NEWIF AND NEWCOUNT: 
% The conditional newif macro defines a conditional variable and
%    sets it to either true or false, except that the macro will
%    have no effect if the conditional variable already exists.
% Example: \conditionalnewif\ifXX{true}
%    If the conditional variable \ifXX already exists, its
%    previous value is maintained.  If it does not exist, the
%    above statement has the same effect as
%           \newif\ifXX  \XXtrue
% Similarly, the conditional newcount defines a new count
%    variable and sets it to a specified value, except that this
%    macro has no effect if the count variable already exists.
% Example: \conditionalnewcount\XX{6}
%    If the variable \XX already exists, its previous value is
%    maintained.  If it does not exist, the above statement has
%    the same effect as
%           \newcount\XX  \XX=6
% Written by Alan Guth, 11/22/92
% Comments in the following macro code refer to the first example
%    above:
\def\conditionalnewif#1#2{\count@\escapechar \escapechar\m@ne
      % \escapechar is first character produced by \string: set
      %     to blank
   \toks0=\expandafter{\string#1}         % \toks0=ifXX
   \expandafter\expandafter\expandafter
      \edef\@if#1{true}{\let\noexpand#1=\noexpand\iftrue}%
         % \def\XXtrue{\let\ifXX=\iftrue} Copied from \newif
   \expandafter\expandafter\expandafter
      \edef\@if#1{false}{\let\noexpand#1=\noexpand\iffalse}%
         % \def\XXfalse{\let\ifXX=\iffalse} Copied from \newif
   \expandafter\ifx\csname\string#1\endcsname\relax   % \ifx \ifXX \relax
      \csname\expandafter\if@\the\toks0#2\endcsname   
         % -> \csname \if@ifXXtrue \endcsname
         % -> \csname XXtrue \endcsname ; \if@ is macro which
         %       absorbs following if as arguments
         % -> \XXtrue
   \fi 
   \escapechar\count@\toks0={}}

\def\conditionalnewcount#1#2{\count@\escapechar \escapechar\m@ne
   \expandafter\ifx\csname\string#1\endcsname\relax
      \alloc@0\count\countdef\insc@unt#1 #1=#2
   \fi \escapechar\count@}

% \new definitions for initialization
\newcount\machineid
% For Path support: 
\newread\testrd \newif\iffilefound
\newtoks\toksa \newtoks\toksb 
% End of new definitions for initialization

% **** SETTINGS FOR CONDITIONAL VARIABLES:

% Set your machineid, and edit values for that machine.  If your
% machine is not listed, use ``Generic''.

\machineid=1  % 1=Generic, 2=CTPA0x, 3=IRENE, 4=MARIE, 5=Guth's PC

   % Generic computer:
   \def\DefaultsOne{%
   \def\dprintermargin{true}  % True: printer automatically supplies 1in
                              %   margins (as in postscript); false: no
                              %   margins supplied by printer
   \def\dpslandscape{true}    % Include postscript \special{landscape}
   \def\dgraphtype{2}         % Type of graphics supported: 
                                  %   1: Imagen
                                  %   2: Postscript
                                  %   3: HP LaserJet
                                  %   4: Omit graphics insertions
   \def\dshowgbox{false}      % If true, shows box outlining graphics,
                              %   useful for previewing in a mode without
                              %   graphics
   \def\dparspec{true}        % If true, uses parametrically specified fonts,
                              %   as introduced in gletter in 11/92.  This
                              %   means that one separately specifies a size
                              %   (\small, \normalsize, \large, \vlarge,
                              %   \titlefont, or \largetitlefont), a style
                              %   (\normal, \bf, \it, \sl, \bfit, or \altss
                              %   (for sans serif only)), and a mode (\roman
                              %   or \sansserif).  If false, each font is
                              %   fully specified by a single name, as always.
   \def\dcm{true}             % If true, uses CM fonts.  If false, uses AM
                              %   fonts, which AHG prefers even though they
                              %   are supposedly obsolete.
   \def\dgraphres{300}        % Resolution for graphic inserts.  Use 600 if
                              %   your printer supports it.  Otherwise use
                              %   300.  200 is provided for computer
                              %   transmission of faxes at 200 dpi.  Any
                              %   setting will normally work, but setting this
                              %   variable right will improve the image.
   }
   % CTPA0x: 
   \def\DefaultsTwo{%
       \def\dprintermargin{true}
       \def\dpslandscape{true}
       \def\dgraphtype{2}
       \def\dshowgbox{false}
       \def\dparspec{false}
       \def\dcm{true}
       \def\dgraphres{600}}
   % IRENE:
   \def\DefaultsThree{%
       \def\dprintermargin{true}
       \def\dpslandscape{true}
       \def\dgraphtype{2}
       \def\dshowgbox{false}
       \def\dparspec{false}
       \def\dcm{false}
       \def\dgraphres{600}}
   % Marie:
   \def\DefaultsFour{%
       \def\dprintermargin{true}
       \def\dpslandscape{true}
       \def\dgraphtype{2}
       \def\dshowgbox{false}
       \def\dparspec{false}
       \def\dcm{true}
       \def\dgraphres{600}}
   % Guth's PC:
   \def\DefaultsFive{%
       \def\dprintermargin{false}
       \def\dpslandscape{false}
       \def\dgraphtype{3}
       \def\dshowgbox{false}
       \def\dparspec{true}
       \def\dcm{false}
       \def\dgraphres{600}}

%Setting of default parameters:
\ifcase \machineid \or \DefaultsOne \or \DefaultsTwo \or \DefaultsThree
  \or \DefaultsFour \or \DefaultsFive \fi

% default variables for initialization
   \conditionalnewif\ifprintermargin{\dprintermargin}
   \conditionalnewif\ifpslandscape{\dpslandscape}
   \conditionalnewcount\graphtype{\dgraphtype} 
   \conditionalnewif\ifshowgbox{\dshowgbox} 
   \conditionalnewif\ifparspec{\dparspec}
   \conditionalnewif\ifcm{\dcm}
   \conditionalnewcount\graphres{\dgraphres}
   \conditionalnewif\iffontsdefined{false}

\def\addtopathactive#1{\toksa=\expandafter{\path}%
  \toksb={#1}\xdef\path{\the\toksa, \the\toksb}}
\def\addtopath{\let\dobalance=\addtopathactive \getbalance}

\ifnum\machineid=5 % Add to path for Guth's PC
  \addtopathactive{g:/gletter/, c:/gletter/, f:/letters/,
  c:/letters/, f:/vax/, e:/diagrams/}
\fi 

\immediate\write16{GSMACRO VERSION 3.12 (2/19/98)}
\immediate\write16{\space\space\space Report problems to Alan Guth
(guth@ctp.mit.edu).} 

\ifpslandscape \special{landscape} \fi

%\new declarations 
\newdimen\topspace \newinsert\topspaceinsert
\newdimen\topspacel \newdimen\topspacer 
\skip\topspaceinsert=0pt \count\topspaceinsert=1000
\dimen\topspaceinsert=\maxdimen \newcount\headskip
\newif\ifopened  \openedfalse  \headskip=1 
\newdimen\digitwidth \newdimen\commawidth
\newcount\lcount \newcount\linecount
\newdimen\spacea \newdimen\spaceb \newdimen\spacec
\newdimen\spaced \newdimen\spacee \newdimen\spacef
\newdimen\spaceg \newdimen\headlineskip
\newif\ifsetnextheadline \setnextheadlinefalse
\newif\ifsetnextheadlineb \setnextheadlinebfalse
\newdimen\pix \newif\ifwarn \warntrue
\newcount\unscale \newcount\remain \newcount\product
%End of \new declarations

%Restore original meaning to \alloc@ and \newinsert
\def\writelog#1#2{\wlog{\string#1=\string#2\the\allocationnumber}}

%PATH SUPPORT PACKAGE (Added 7/29/96, modified 11/23/96 to save
%   entries): 
% FindDirFromPath{filename}{path}
% Sets \ffdir to directory in which filename is found, or \XXX if
%   not found.  Also sets \filefound true or false, accordingly. 
%   The path is a comma separated string, which may or may not
%   contain spaces between the entries.  The current directory
%   can be included in the path as a blank.  The command
%   \inputfrompath searches the current directory first.
% Filenames and directories are saved in \FileList for future
%   reference.  TeX (or at least PC TeX 2.931) saves the full
%   pathname of every file it opens, so without this feature
%   memory would be overflowed quickly when multiple
%   recommendation letter packages are printed.
\def\FindDirFromPath#1#2{\edef\ffname{#1}\SearchFilelist
   \iffilefound \else
      \edef\ffpath{#2}%
      \expandafter \searchpath \ffpath,\endsearch,
      \iffilefound \AddToFilelist \fi
   \fi}
\def\AddToFilelist{\toksa=\expandafter{\Filelist}
   \xdef\Filelist{\the\toksa\ffname,\ffdir,}}
\def\SearchFilelist{\filefoundfalse \expandafter \matchfile
   \Filelist\endsearch,\endsearch,}
\def\matchfile#1,#2,{\def\tester{#1}%
   \ifx \tester \endsearchtest
      \def\followup{}%
   \else
      \ifx \tester \ffname
         \filefoundtrue
         \edef\ffdir{#2}
         \def\followup{\KillToDoubleEnd}
      \else
         \let\followup=\matchfile
      \fi
   \fi
   \followup
}
\def\endsearchtest{\endsearch}
\def\followup{}
\def\endsearch{}
\def\Filelist{}
\def\XXX{}
\def\TestDir#1{\openin\testrd=#1\ffname \relax
     \ifeof\testrd \global\filefoundfalse \else \global
     \filefoundtrue \fi \closein\testrd}
\def\KillToEndsearch#1\endsearch,{}
\def\KillToDoubleEnd#1\endsearch,\endsearch,{}
\def\KillLeadingSpace#1{\expandafter\killspace#1}
\def\killspace#1{\if #1 \else #1\fi}
\def\searchpath#1,{\def\tester{#1}%
     \ifx \tester \endsearchtest
          \gdef\ffdir{\XXX}%
          \def\followup{}%
     \else 
          \TestDir{#1}%
          \iffilefound
               \ifx \tester \nulltest \def\ffdir{} \else
                  \edef\ffdir{\KillLeadingSpace{#1}}\fi%
               % \KillLeadingSpace included in case \path includes spaces
               %  after each comma.  If \ffdir begins with a space, dvips
               %  cannot find the file.  If consecutive spaces appear in
               %  \path, the TeX reading mechanism automatically compresses
               %  them to a single space.
               \let\followup=\KillToEndsearch
          \else
               \let\followup=\searchpath
          \fi
     \fi
     \followup
}

{\obeylines
\gdef\inputfrompath#1{%
   \FindDirFromPath{#1}{,\path} \iffilefound%
   \input \ffdir#1
   \else
      \immediate\write16{}%
      \errmessage{The file \ffname\space was not found. %
      More info will flash by, and can be found in log file.}%
      \immediate\write16{The search path is: \path}%
\immediate\write16{To add to the path, add the following command to your source file:}%
\immediate\write16{\string\addtopath\space new-directory1, new-directory2, ...}%
\immediate\write16{Make sure the line above is not contained inside any other command.  It must}%
\immediate\write16{\space\space\space be on a line by itself.}%
      \immediate\write16{}%
   \fi}}

%%% Double column output routine from the TeXbook %%%%

\tolerance=1000
\newdimen\fullhsize 
\fullhsize=10truein \hsize=4.75truein 
\def\fulline{\hbox to \fullhsize}
% \vsize=7truein        % Gilson (9/15/90) uses 7.5truein
\hfuzz=5pt
%  \hoffset=0.46truein % \voffset=0.6truein
\hoffset=-.54truein \voffset=-.4truein  % Postscript margins are
%    now default, starting with v. 3.1

% On 4/26/91 I decided to change to the following vertical
%   settings, corresponding to 1 in margins at top and bottom:
\vsize=6.5truein \voffset=0truein

% The following style settings are not part of the standard
%   small.tex, although Halliwell's version contained a similar
%   baselineskip statement (12pt plus 2pt minus 1pt).
\baselineskip 12pt plus 1 pt minus 1pt
\parskip=\medskipamount
\tolerance=10000

\let\lr=L \newbox\leftcolumn

\output={\if L\lr
   \global\setbox\leftcolumn=\columnbox \global\let\lr=R
      \topspace=\topspacer
   \else \topspace=\topspacel \doubleformat \global\let\lr=L
   \fi
   \advancepageno
   \ifnum\outputpenalty>-20000
     \ifnum\pageno>\headskip
       \insert\topspaceinsert{\vskip\topspace} \fi
   \else\dosupereject\fi
   %Insert above added to allow space for headline at top of each
     %page. 
   \processnextheadline}
    %Above command added to check if \nextheadline or
    %\nextheadlineb have been set

\def\doubleformat{\shipout\vbox{%\makeheadline  % makeheadline moved
   \fulline{\box\leftcolumn\hfil\columnbox} }}  % to columnbox,
                                                % so each half
                                                % page has one

\def\columnbox{\leftline{\vbox{{\setbox0=\vbox{\unvcopy\@cclv} 
   \ifdim \ht0 > \topskip \makeheadline \fi
   \pagebody \makefootline}}}}
   % In the above macro, the \setbox0 construction is used
   % because a void \@cclv (text of page) is a box stretched to
   % full size by \vfill.  The contents of \box0 used outside
   % this macro are protected by {}.  To allow headlines on
   % otherwise empty pages, use the following macro.
\def\blankheadokay{\def\columnbox{\leftline{\vbox{{\makeheadline
   \pagebody\makefootline}}}}}

%Implement following macro for printing with printers that automatically
%   create one inch margins, such as the Postscript printers:
\def\subtractmargin{}
\def\reducemargin{\advance\hoffset by-1truein\advance\voffset
     by-1truein  \printermargintrue}
\def\increasemargin{\advance\hoffset by 1truein\advance\voffset
     by 1truein  \printermarginfalse}
\def\addmargin{\increasemargin}
\ifprintermargin \else \addmargin \fi

%Following macro is used for gboxit, to allow it to know when it
%  is working inside \eqalign.
  \def\openup{\openedtrue\afterassignment\@penup\dimen@=}

%Modification of format for footnotes:
 \def\vfootnote#1{\insert\footins\bgroup 
    \interlinepenalty\interfootnotelinepenalty
    \splittopskip\ht\strutbox % top baseline for broken footnotes
    \splitmaxdepth\dp\strutbox \floatingpenalty\@MM
    \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip 
    \xspaceskip\z@skip \footformat \footfont 
    \ifdim \parindent < 10pt \parindent=10pt \fi
    \textindent{#1}\footstrut\futurelet\next\fo@t} 
 \def\footformat{} \def\footfont{}
 %To change the linespacing in footnotes:
        \def\footformat{\baselineskip=10pt plus 1pt} 
 %To change the space between text and footnotes on a page:
        \skip\footins=18pt 
 %To make the footnote rule the same width as the page:
        \def\footnoterule{\kern-3pt
        \hrule width \the\hsize \kern 2.6pt}

\catcode`@=12 % at signs are no longer letters

%HEADINGS:  For a one or two line heading, on pages after the
%   first one can use the following macros.  These macros create
%   headlines which begin at the usual top margin, causing the
%   rest of the page to be shorter than normal.
% Example:
%   \headline{LECTURE NOTES 1: THE DOPPLER EFFECT AND SPECIAL
%      RELATIVITY, \hfill p.~\folio}
%   \nopagenumbers
%  Other instructions are \headlineb{xxx}, \nextheadline{xxx},
%      \nextheadlineb{xxx}, \headstart{n}, \pageset{n}.

\def\nulltest{}    %Used in comparison tests
\def\headlinetextl{}  %Left headline initialized as null
\def\headlinetextr{}  %Right headline initialized as null
\def\headlinetextlb{}   %Left 2nd headline initialized as null
\def\headlinetextrb{}   %Right 2nd headline initialized as null
\def\nextheadlinetext{}  %Headline for next page initialized
\def\nextheadlinetextb{} %2nd headline for next page initialized
\topspace=0pt
\def\topline#1{{\setbox1=\line{#1\hfil} \ifdim\ht1<10pt
    \vbox to 10pt{\vfill \box1} 
   \else \box1 \fi}}
\def\makeheadline{\vbox to 0pt{\baselineskip \headlineskip
    \ifnum\pageno > \headskip
       \if L\lr
         \ifx \headlinetextl \nulltest \else \topline{\headlinetextl}
             \fi  
         \ifx \headlinetextlb \nulltest \else
             \line{\headlinetextlb\hfil} \fi 
       \else
         \ifx \headlinetextr \nulltest \else \topline{\headlinetextr}
             \fi  
         \ifx \headlinetextrb \nulltest \else
             \line{\headlinetextrb\hfil} \fi 
       \fi
    \fi \vss} \nointerlineskip}
% User must set parameter \topspace to allow room for headings.
% Recommended values: 26pt for 1-line heading, 38pt for 2-line.
% After setting, add macro \maketopspace to put it on the current
%    page.  It will be inserted automatically on subsequent pages.
\def\headlinel#1{\let\headlinetextlold=\headlinetextl
    \gdef\headlinetextl{#1} % \gdef\nextheadlinetextl{#1}
  \ifx \headlinetextlold \nulltest
    \ifx \headlinetextl \nulltest \else
       \toks1=\expandafter{\headlinetextl}
          \immediate\write16{Left headline set: \the\toks1} 
       \global\advance\topspacel by 26pt 
       \ifnum\pageno > \headskip \if L\lr
          \insert\topspaceinsert{\vskip 26pt} \fi\fi
    \fi
  \else
    \ifx \headlinetextl \nulltest
       \global\advance\topspacel by -26pt 
       \ifnum\pageno>\headskip \if L\lr \insert\topspaceinsert{\vskip
          -26pt} \fi\fi
       \immediate\write16{Left headline cancelled.}
    \else \toks1=\expandafter{\headlinetextl} 
       \immediate\write16{Left headline changed to: \the\toks1}
    \fi
  \fi\toks1={}}
\def\headliner#1{\let\headlinetextrold=\headlinetextr
    \gdef\headlinetextr{#1} % \gdef\nextheadlinetextr{#1}
  \ifx \headlinetextrold \nulltest
    \ifx \headlinetextr \nulltest \else
       \toks1=\expandafter{\headlinetextr}
          \immediate\write16{Right headline set: \the\toks1} 
       \global\advance\topspacer by 26pt 
       \ifnum\pageno > \headskip \if R\lr
          \insert\topspaceinsert{\vskip 26pt} \fi\fi
    \fi
  \else
    \ifx \headlinetextr \nulltest
       \global\advance\topspacer by -26pt 
       \ifnum\pageno>\headskip \if R\lr \insert\topspaceinsert{\vskip
          -26pt} \fi\fi
       \immediate\write16{Right headline cancelled.}
    \else \toks1=\expandafter{\headlinetextr} 
       \immediate\write16{Right headline changed to: \the\toks1}
    \fi
  \fi\toks1={}}
\headlineskip=10pt
\def\headlinelb#1{\let\headlinetextlbold=\headlinetextlb
    \gdef\headlinetextlb{#1} % \gdef\nextheadlinetextb{#1}
  \ifx \headlinetextlbold \nulltest
    \ifx \headlinetextlb \nulltest \else
       \toks1=\expandafter{\headlinetextlb}
       \immediate\write16{Left second headline set: \the\toks1} 
       \global\advance\topspacel by \headlineskip
       \ifnum\pageno > \headskip \if L\lr \insert\topspaceinsert{\vskip
          \headlineskip} \fi\fi
    \fi
  \else
    \ifx \headlinetextlb \nulltest
       \global\advance\topspacel by -\headlineskip
       \ifnum\pageno>\headskip \if L\lr \insert\topspaceinsert{\vskip
          -\headlineskip} \fi\fi
       \immediate\write16{Left second headline cancelled.} 
    \else \toks1=\expandafter{\headlinetextlb} 
       \immediate\write16{Left second headline changed to: \the\toks1}
    \fi
  \fi\toks1={}}
\def\headlinerb#1{\let\headlinetextrbold=\headlinetextrb
    \gdef\headlinetextrb{#1} % \gdef\nextheadlinetextrb{#1}
  \ifx \headlinetextrbold \nulltest
    \ifx \headlinetextrb \nulltest \else
       \toks1=\expandafter{\headlinetextrb}
       \immediate\write16{Right second headline set: \the\toks1} 
       \global\advance\topspacer by \headlineskip
       \ifnum\pageno > \headskip \if R\lr \insert\topspaceinsert{\vskip
          \headlineskip} \fi\fi
    \fi
  \else
    \ifx \headlinetextrb \nulltest
       \global\advance\topspacer by -\headlineskip
       \ifnum\pageno>\headskip \if R\lr \insert\topspaceinsert{\vskip
          -\headlineskip} \fi\fi
       \immediate\write16{Right second headline cancelled.} 
    \else \toks1=\expandafter{\headlinetextrb} 
       \immediate\write16{Right second headline changed to: \the\toks1}
    \fi
  \fi\toks1={}}
\def\headline#1{\headlinel{#1}\headliner{#1}}
\def\headlineb#1{\headlinelb{#1}\headlinerb{#1}}
\def\nextheadline#1{\gdef\nextheadlinetext{#1}\setnextheadlinetrue}
\def\nextheadlineb#1{\gdef\nextheadlinetextb{#1}\setnextheadlinebtrue}
\def\maketopspace{\insert\topspaceinsert{\vskip\topspace}}
\def\headstart#1{\count255=\headskip \global\headskip = #1 
  \global\advance \headskip by -1 
  \ifnum\pageno > \count255
    \ifnum\pageno > \headskip \else 
      \insert\topspaceinsert{\vskip -\topspace} \fi
  \else
    \ifnum\pageno > \headskip 
      \insert\topspaceinsert{\vskip \topspace} \fi
  \fi}
% Use \headstart{3} to start headlines on page 3.  Default is 2. 

\def\pageset#1{\count255=\pageno \global\pageno = #1 
  \ifnum\count255 > \headskip
    \ifnum\pageno > \headskip \else 
      \insert\topspaceinsert{\vskip -\topspace} \fi
  \else
    \ifnum\pageno > \headskip 
      \insert\topspaceinsert{\vskip \topspace} \fi
  \fi}
% Use \pageset{3} to set pageno to 3.

%Redefinition of \pagecontents and \plainout:
% We make @ signs act like letters, temporarily.
\catcode`@=11
\def\pagecontents{
  \ifvoid\topspaceinsert\else\unvbox\topspaceinsert\fi 
    %Line above added to allow space for headline(s).
  \ifvoid\topins\else\unvbox\topins\fi
  \dimen@=\dp\@cclv \unvbox\@cclv % open up \box255
  \ifvoid\footins\else % footnote info is present
    \vskip\skip\footins
    \footnoterule
    \unvbox\footins\fi
  \ifr@ggedbottom \kern-\dimen@ \vfil \fi}
\def\processnextheadline{
   \ifsetnextheadline
      \edef\tem{{\nextheadlinetext}}
      \toks1=\expandafter{\tem}
      \expandafter\headline\the\toks1 
      \global\setnextheadlinefalse  \fi
   \ifsetnextheadlineb
      \edef\tem{{\nextheadlinetextb}}
      \toks1=\expandafter{\tem}
      \expandafter\headlineb\the\toks1
      \global\setnextheadlinebfalse \fi\toks1={}}

\catcode`@=12 % at signs are no longer letters

%FONT PACKAGE:
% Needs \newread\testrd, defined above with new declarations
\def\loadfonts{%
   \iffontsdefined \else
      \ifcm
         \ifparspec
            \inputfrompath{ggfontcm.tex}%
         \else
            \inputfrompath{gfontcm.tex}%
         \fi
      \else
         \ifparspec
            \inputfrompath{ggfontam.tex}%
         \else
            \inputfrompath{gfontam.tex}%
         \fi
      \fi
   % Implement mode that may have been specified before loading fonts:
   %    Default = roman.  If fonts are reloaded, user must respecify mode.
   % \ifcase \futuremode \roman \or \sansserif \fi
   \fi}
\loadfonts
\def\namedfonts{\parspecfalse \fontsdefinedfalse \loadfonts}
\def\parameterspecifiedfonts{\parspectrue \fontsdefinedfalse \loadfonts}
\def\ParameterSpecifiedFonts{\parspectrue \fontsdefinedfalse \loadfonts}
\def\parfonts{\parspectrue \fontsdefinedfalse \loadfonts}
\def\amfonts{\cmfalse \fontsdefinedfalse \loadfonts}
\def\cmfonts{\cmtrue \fontsdefinedfalse \loadfonts}

\def\pagenumbers{\footline={\hss\normal\ifnum\pageno>\headskip
   \folio\fi\hss}}
\pagenumbers

% Simplequotes macros-- causes " to alternate meanings between ``
%   and ''
\def\quote{"}
\catcode`"=\active
\def\simplequotes{\def\openquote{``\gdef"{\closequote}}
  \def\closequote{''\gdef"{\openquote}} \gdef"{\openquote}}
\def\nosimplequotes{\gdef"{\quote}}
\simplequotes

%GBOXIT MACROS: RESULT IS ONE MACRO, \gboxit{}, WHICH WORKS
%  FOR ALL PURPOSES.  MOST OF THE COMPLICATION IS TO ALLOW IT TO
%  WORK INSIDE \eqalign, ETC.
\def\boxdisp#1{\boxgen{\hbox{$\displaystyle #1$}}{10pt}}
\def\boxtext#1{\boxgen{#1}{3pt}}
\def\boxeq#1{\boxgen{\hbox{$#1$}}{3pt}}
\def\boxgen#1#2{\hbox{\vrule\vbox{\hrule\kern#2\vtop{
   \hbox{\kern#2#1\kern#2}\kern#2\hrule}}\vrule}}
\def\gboxit#1{\ifopened\boxdisp{#1}\else\ifmmode 
   \ifinner\boxeq{#1}\else\boxdisp{#1}\fi
  \else\boxtext{#1}\fi\fi}

\def\.{.{\spacefactor=3000}}  % Period with long space.  Unlike
%    older definition, this definition works for cases like ``(A\.) ''.
% Old definition, kept for compatibility with old files:
\def\period{{.\spacefactor=3000} } 
% Discarded definition:  \def\.{\period\ignorespaces}
\def\shortperiod{\sfcode`.=1000} %Gives short spaces following periods.
\def\normalperiod{\sfcode`.=3000} %Undoes \shortperiod

% If \seespace is added at the end of a macro definition, then a
%    space following the control sequence will be read.  There is
%    a problem, however, if the text is first read as an argument
%    of a macro, as with my editorial note macros.  In that case
%    the space following the control sequence disappears before
%    the macro is executed.  For this reason, the \seespace macro
%    also inserts a space if the following token is any letter
%    (as identified by catcode).
\def\seespace{\begingroup\obeyspaces\obeylines\spacetest}
{\obeyspaces\gdef\testactivespace{ }}
{\obeylines %
\gdef\spacetest#1{\def\tester{#1}%
\ifx\tester\testactivespace\ \else\ifx #1
\ \else \ifcat \tester A\ #1\else #1\fi\fi\fi\endgroup}}

%HEADING MACROS
%IF HEADINGS AND SUBHEADINGS FOLLOW, PUT ON ADJACENT LINES TO
%   AVOID EXTRA SPACE BETWEEN THEM
%EXAMPLES:
%   \superhead{II. PROJECT DESCRIPTION}% Printed centered, \bigbf
%   \head{A. INTRODUCTION}% Printed centered, \bf
%   \subhead{1. Phase Transitions in the Early Universe}
%         % At left margin, \bf
%   \subsubhead{a)}{Formation of Large Scale Structure/Dark
%   Matter in the Universe:} % At left margin, first part \bf,
%         2nd part text font

% Meaning of inputs to following macro:
%   #1  Text of headline
%   #2  Used to pass along next instruction, to avoid double 
%       skips.
%   #3  Skip above, in addition to parskip
%   #4  Skip below, in addition to parskip
%   #5  Font type
%   #6  Hanging indentation for continuation line, if headline
%       does not fit on one line.
%   #7  Minimum baselineskip for continuation line.  Will use
%       normal baselineskip if it exceeds this value.

\long\def\centerhead#1#2#3#4#5#6#7{
   \par \ifnum \lastpenalty < 10000 \goodbreak \fi
   #3  %Skip above, in addition to \parskip
   \setbox1=\hbox{#5#1} %#5 is font type
   \ifdim \wd1 > \hsize 
     {\ifdim \baselineskip < #7 \baselineskip = #7 \fi
     \hangindent=#6 {\noindent {#5#1}} \par \hangindent=0pt}
   \else
     \vskip \parskip \centerline{#5#1} \fi
   \nobreak
   {\let\next=#2
      \ifx \next \superhead \else
      \ifx \next \head \else
      \ifx \next \subhead \else
      \ifx \next \subsubhead \else
           #4          %Skip below, in addition to parskip
           \nobreak    %Unless followed by another heading
      \fi\fi\fi\fi}
   #2}

% Warning: The macro above, and also \lefthead, need to be
% revised. The problem is that that argument #2 can be a long
% string that was enclosed in {}'s, but then the let statement
% above will act on only the first token in the string.  The
% later tokens will be executed, and then executed again at the
% end of the \centerhead macro.  Probably this problem can be
% fixed by using futurelet.

% Meaning of inputs to following macro:
%   #1  Text of first part of headline, set in font specified by
%       #6.
%   #2  Text of second part of headline, set in text font.
%   #3  Used to pass along next instruction, to avoid double 
%       skips.
%   #4  Skip above, in addition to parskip.
%   #5  Skip below, in addition to parskip.
%   #6  Font type.
%   #7  Hanging indentation for continuation line, if headline
%       does not fit on one line.
%   #8  Minimum baselineskip for continuation line.  Will use
%       normal baselineskip if it exceeds this value.

\long\def\lefthead#1#2#3#4#5#6#7#8{
   \par \ifnum \lastpenalty < 10000 \goodbreak \fi
   #4  %Skip above, in addition to \parskip
     {\ifdim \baselineskip < #8 \baselineskip = #8  \fi
     \hangindent=#7 {\noindent {#6#1} #2} \par \hangindent=0pt}
   \nobreak
   {\let\next=#3
      \ifx \next \superhead \else
      \ifx \next \head \else
      \ifx \next \subhead \else
      \ifx \next \subsubhead \else
           #5          %Skip below, in addition to parskip
           \nobreak    %Unless followed by another heading
      \fi\fi\fi\fi}
   #3}

\long\def\superhead#1#2{\centerhead{#1}{#2}{\bigskip}
     {\medskip}{\bigbf}{30pt}{15pt}}

\long\def\head#1#2{\centerhead{#1}{#2}{\medskip}{\smallskip}
      {\bf}{30pt}{12pt}}

\long\def\subhead#1#2{\lefthead{#1}{}{#2}{\smallskip}{}
      {\bf}{30pt}{12pt}}

\long\def\subsubhead#1#2#3{\lefthead{#1}{#2}{#3}{}{}{\bf}
      {30pt}{12pt}}

%ITEMIZE MACRO: USED TO TURN ALL PARAGRAPHS INTO
%   "ITEM" FORMAT, WITH FIRST WORD AS LABEL.

\long\def\itemize#1{{
   \def\entry ##1 {\hang\llap{##1\enspace}\ignorespaces}
   \everypar={\entry} \par #1\par
}}

% The following macros are equivalent to adding
%   \noalign{\smallskip} between any two lines of \eqalign,
%   \eqalignno, \leqalignno, \displaylines, and the \eqcenter
%   macro defined below.  \matrix and \pmatrix are not affected. 
\jot = 6pt   % increased from default of 3pt
\catcode`@=11
\def\cases#1{\left\{\,\vcenter{\normalbaselines\openup3pt\m@th
    \ialign{$##\hfil$&\quad##\hfil\crcr#1\crcr}}\right.}
    % \openup3pt was added
\catcode`@=12

% The following macros redefine \eqno and \eqalignno, so that the
%    output is printed in \normal font, as set by gfont (either
%    \rm or \sansserif).  This only makes a difference when the
%    equation numbers contain latin letters, such as 1a.
\let\oldeqno = \eqno
\def\eqno#1$${\oldeqno{\hbox{\normal #1}}$$}
% We make @ signs act like letters, temporarily.
\catcode`@=11
\def\eqalignno#1{\displ@y \tabskip\centering
  \halign to\displaywidth{\hfil$\@lign\displaystyle{##}$\tabskip\z@skip
    &$\@lign\displaystyle{{}##}$\hfil\tabskip\centering
    &\llap{$\@lign{\hbox{\normal ##}}$}\tabskip\z@skip\crcr
    #1\crcr}}
\catcode`@=12 % at signs are no longer letters

% The following macro creates a new form of alignment for
%    displayed equations, allowing any number of equations to be
%    centered and given a single equation number with \eqno.
% Example:
%  $$\eqcenter{  first equation line \cr
%                second equation line \cr}\eqno(15)$$
\catcode`@=11
\def\eqcenter#1{\null\,\vcenter{\openup\jot\m@th
  \ialign{\strut\hfil$\displaystyle{##}$\hfil
      \crcr#1\crcr}}\,}
\catcode`@=12

%  This format depends on using some special techniques of
%  inputting information into macros which are defined as the
%  processing takes place.  Begin by defining a modified version
%  of \obeylines, called \seelines.  This command turns each
%  carriage return into the control sequence \linebreak, which
%  the user can define.  By default, \linebreak is defined as
%  \inactive, which simulates the normal carriage return.
%  \inactive inserts a space, and if the next token is also a
%  carriage return, it inserts a \par.  Apparently TeX's normal
%  mechanism of ignoring blank spaces before and after a carriage
%  return continues to operate in this context. 

{\catcode`\^^M=\active %
  \gdef\seelines{\catcode`\^^M=\active \def^^M{\linebreak}}}
{\seelines \gdef\partest{\ifx\next
  \par\fi}}
\def\inactive{ \futurelet\next\partest}
\def\linebreak{\inactive}

%  One can now define \getbalance and \dobalance so that one can
%  use a definition of the form
%       \def\seqactive#1{...}
%       \def\seq{\let\dobalance=\seqactive \getbalance}
%  so that \seq will become a macro with argument #1 equal to
%  the balance of the line on which it appears.  The replacement
%  text will be {...}.  Definitions made within {...} should
%  be done by using \gdef rather than \def.  If the argument
%  is found not to fit on one line, it can be continued by
%  ending the line with a space followed by %.  

{\seelines \long\gdef\getbalancea #1
  {\dobalance{#1} \endgroup}}
\def\getbalance{\begingroup % \catcode`{=\active \catcode`}=\active
  \seelines \getbalancea}

%  To handle sequences of lines, I define an input system which
%  allows the following general construction: 
%       \def\seqactive#1{...}
%       \def\seqfinish{....}
%       \def\seqafter{...}
%       \def\seq{\let\dotofinish=\seqactive \def\doafterfinish
%           {\seqfinish} \def\doafterall{\seqafter}
%           \def\tofinish{xxx} \gettofinish}. 
%  The result will be that all lines following \seq will be
%  processed as arguments to the macro \seqactive.  The
%  processing will cease when a line is encountered that
%  contains exactly the one token xxx.  The token could be a
%  single control sequence, like \finish, or a null line, or a
%  single character.  After the line processing ceases, the
%  macro \seqfinish will be executed.  After the end of a
%  grouping which begins at \gettofinish, the final macro
%  \seqafter is executed.  As an option, one can add \getbalancea
%  to the end of \def\seq, and earlier in \def\seq include the
%  assignment \let\dobalance=\seqbalance.  Elsewhere one defines
%  \def\seqbalance#1{...}, and the result is that the macro
%  \seqbalance is performed with the argument consisting of the
%  balance of the line on which \seq appears.

{\seelines \long\gdef\gettofinisha #1
  {\def\tester{#1} \ifx \tester \tofinish \doafterfinish%
        \endgroup \doafterall%
    \else \dotofinish{#1} \fi
   }}
\def\gettofinish{\begingroup 
  % \catcode`{=\active \catcode`}=\active 
  \def\linebreak{\par \gettofinisha} \seelines}

%\CENTERBLOCK
%\centerblock is used to insert objects like addresses.  The format
%  for inserting the address is:
%        \centerblock  [\baselineskip=12pt]
%        Technical Printing, Inc.
%        37 Pine Grove Terrace
%        Cambridge, MA 02139
%        \noalign{\smallskip}
%        ATTN: Mr. John Jones
%
%        [Continuation of text ... ]
%  The result will be an address which is centered from left to
%  right, with a line spacing slightly narrower than the rest.
%  The address will be separated from the text above and below by
%  the same separation as between paragraphs.  The continuation
%  of the text will be treated as a new paragraph, so one must
%  begin it with \noindent if it is not really a new paragraph.
%  Within the centerblocked material, periods will not cause extra
%  space to be left.

\def\centerblock{\table \baselineskip=10.5pt plus 1pt minus 1pt}

%TABLE
%\table is used to insert a table, like a list of expenses.  The
%  format for inserting the list is:
%        \endbody\table \spacea=10pt [\baselineskip= %
%             10.5pt]
%        Title1  &Title2    &Title3
%        \noalign{\smallskip}
%        Item1a  &Item2a    &Item3a
%        Item1b  &Item2b    &Item3b
%
%        [Continuation of text ... ]
%  Each line of the table is normally entered as one line of
%  input text, but the line can be continued by ending it with a
%  space followed by %.  The result will be a table with 3
%  columns (1-8 columns are possible), centered from left to
%  right.  The spacing indicated by \spacea will be left between
%  columns 1 and 2, \spaceb will be left between columns 2 and 3,
%  etc. The default values for \spacex is 20pt.  The table will
%  be separated from the text above and below by the same
%  separation as between paragraphs.  The continuation of the
%  text will be treated as a new paragraph, so one must begin it
%  with \noindent if it is not really a new paragraph.  If one
%  wants to narrow the spacing, one should add
%  \baselineskip=10.5pt.

\spacea=20pt \spaceb=20pt \spacec=20pt \spaced=20pt \spacee=20pt
   \spacef=20pt \spaceg=20pt
\def\tstrut{\vrule height8.5pt depth0pt width0pt}
\def\loop#1\repeat{\long\gdef\lbody{#1}\iterate}
\def\iterate{\lbody \let\lnext\iterate \else\let\lnext\relax\fi 
  \lnext}
\let\repeat=\fi % this makes \loop...\if...\repeat skippable

\def\tabletext{\lineskip=\baselineskip \advance\lineskip
  by -\prevdepth \advance\lineskip by -8.5pt \global\linecount=20
  \let\dotofinish=\tableactive \def\doafterfinish{\maketable}
  \def\doafterall{} \def\tofinish{} \gettofinish}
\def\tableactive#1{\global\advance\linecount by 1
  \global\toks\linecount={#1}} 
\def\maketable{\vskip\parskip \line{\hfill \vbox{\parskip=0pt
  \lineskip=0pt \shortperiod \digits
  \halign{##\hfil &\hskip\spacea ##\hfil &\hskip\spaceb ##\hfil
     &\hskip\spacec ##\hfil &\hskip\spaced ##\hfil &\hskip\spacee
     ##\hfil &\hskip\spacef ##\hfil &\hskip\spaceg ##\hfill\cr
     \insertrows\crcr}}\hfill}\par}
\def\insertrows{\global\lcount=20\gdef\ins{}%
  \global\advance\linecount by -1 \ifnum\linecount>20%
  \loop\global\advance\lcount by 1\toks1=\expandafter{\ins}%
  \ifnum\lcount=21\toks2={\tstrut\crcr}\else\toks2={\crcr}%
  \fi \xdef\ins{\the\toks1 \the\toks\lcount \the\toks2}%
  \ifnum\linecount>\lcount \repeat \fi \advance\lcount by 1%
  \toks1=\expandafter{\ins}\xdef\ins{\the\toks1
  \the\toks\lcount}\ins} 
\def\table{\par \begingroup \seelines \gettable}
{\seelines \long\gdef\gettable#1

{\tabletext #1

\endgroup}}

%For purposes of underlining the last line of a column of digits
%  to be added, I define a macro \addline which acts like
%  \underbar, except that it adds some extra space both above and
%  below. 

\catcode`@=11
\def\addline#1{\vtop{\hbox{$\setbox1=\hbox{#1} \dp1=1.5pt
  \m@th \underline{\box1}$} \ifdim\lineskip=0pt \vskip 2.5pt
  \else \vskip 1.5pt \fi}} %If clause gives same results for
  %  \lineskip=0pt or 1pt.
\catcode`@=12

%Alignment of columns of numbers:
%  The easiest way is to define @ as a blank symbol with the same
%  width as a digit.  The $ seems to have the same width, at
%  least in Roman type, so it can also be substituted by a @ in
%  lines for which the $ is not wanted.  To use this definition, 
%  type \digits.  To redefine @ as a normal symbol, type
%  \nodigits.  To use the normal symbol when \digits is in
%  effect, use \at.  Note that @ is always an active symbol.  For
%  a spacer to substitute for a comma, use \cw (comma-width).
%  Within the \table macro, \digits is selected by default.

\def\at{@} 
\setbox0=\hbox{\rm0} \digitwidth=\wd0
\def\dw{\kern\digitwidth}
\setbox0=\hbox{\rm,} \commawidth=\wd0
\def\cw{\kern\commawidth}
\catcode`@=\active
\def\digits{\def@{\dw}} 
\def\nodigits{\def@{\at}}
\nodigits

%  GRAPHICS INSERTIONS (my own macros):
\def\postscript{\graphtype=2 
   \ifprintermargin \else \reducemargin \printermargintrue \fi 
   \ifpslandscape \else \special{landscape} \pslandscapetrue \fi} 
% To use Level 2 Postscript with \CTPGraphicLetterheadA, use:
\def\psleveltwo{\postscript \leveltwotrue}
\def\hp{\graphtype=3 \printermarginfalse}
\def\nographics{\graphtype=4}
\def\showgraphicsboxes{\showgboxtrue}
\def\hidegraphicsboxes{\showgboxfalse}
\newif\iftopstart  \newif\ifhphi \hphifalse
\def\hphigh{\hphitrue}
\def\graphboxa#1#2#3{\hbox to #2{\offinterlineskip
     \ifshowgbox \hss \vrule \fi
     $\vcenter to #3{
        \ifshowgbox \vss \hrule \fi
        \hbox{$\vcenter to #3{
           \hbox to #2{\hfill}
           \iftopstart \special{#1} \fi
           \vfill
           \iftopstart \else 
              \ifnum \graphtype=3 
                 \ifhphi \vbox to 0pt{\vskip #3 \special{#1}\vss}
                 \else \special{#1} 
                 \fi 
              \else \special{#1} 
              \fi
           \fi}$}
        \ifshowgbox \hrule \vss \fi
        \hbox{}}$%
     \ifshowgbox \vrule \hss \fi}\ifhphi \global\hphifalse \fi}
% The following version of \graphbx is new 9/1/96 with the
%   addition of path capabilities, revised 9/29/96 to add
%   unscaled feature, and 11/24/96 modify path handling to always
%   use \FindDirFromPath.
% The problem is to use TeX's awkward programming capability to 
%   compute the scaling factor to cancel \mag for \ugraphbx.  I
%   have found that if it is rounded to the nearest percent,
%   Ghostscript can create streaks.
\newif\ifunscalegraph \unscalegraphfalse
\def\ugraphbx#1#2#3#4{\unscalegraphtrue \graphbx{#1}{#2}{#3}{#4}%
   \unscalegraphfalse}
% Introduce Knuth's length macro from page 219 of the TeXbook,
%    but insert an \expandafter to allow the argument to be a
%    macro that will be expanded once.  The effect of these
%    macros is that "\length \text" sets \count0 to the number of
%    nonblank tokens in \text.
\def\length#1{\count0=0 \expandafter\getlength#1\end}
\def\getlength#1{\ifx #1\end \let\next=\relax \else\advance\count0
     by1 \let\next=\getlength\fi \next}
\def\graphbx#1#2#3#4{%
   \def\graphscale{}%
   \ifcase \graphtype \or
      \def\ffgname{#2.imi}\def\graphkey{insert\ }\topstarttrue\or %Imagen
      \ifunscalegraph % First compute integer percent:
         \unscale=100000 \divide\unscale by \mag
         % Now find remainder
         \product = \unscale \multiply \product by \mag
         \remain = 100000 \advance \remain by -\product
         % Use remainder to computer thousandths
         \multiply \remain by 1000 \divide \remain by \mag
         \edef\dec{\number\remain}%
         % If \dec < 100, must append leading zeros (tricky):
         {\length\dec \loop \ifnum \count0 < 3
         \toks0=\expandafter{\dec}\xdef\dec{0\the\toks0}%
         \advance \count0 by 1 \fi \ifnum \count0 < 3 \repeat}%
         \edef\graphscale{\space hscale=\the\unscale.\dec\space 
         vscale=\the\unscale.\dec}\fi
      \def\ffgname{#2.psi}\def\graphkey{psfile=}\topstartfalse\or %Postscript
      \def\ffgname{#2.hpi}\def\graphkey{pcl:}\topstartfalse\or    %HP LaserJet
      \def\ffgname{}\def\graphkey{}\topstarttrue\fi             %Omit graphics
   \ifnum \graphtype=4%
      \graphboxa{}{#3}{#4}%
   \else
      % Look first in specified directory, then current
      %    directory, and then along path.
      \FindDirFromPath{\ffgname}{#1,,\path}%
      \iffilefound
         \graphboxa{\graphkey\ffdir\ffgname\graphscale}{#3}{#4}%
      \else \ifwarn
         \immediate\write16{}%
         \errmessage{The graphics file \ffgname\space was not found. 
         More info will flash by, and can be found in log file.}%
         \immediate\write16{The search path is: \path}%
\immediate\write16{To add to the path, add the following command to the input file:}%
\immediate\write16{\string\addtopath\space new-directory1, new-directory2, ...}%
\immediate\write16{Make sure the line above is not contained inside any other command.}%
\immediate\write16{Or, if the graphics type is set wrong, add the command:}%
\immediate\write16{\space\space \string\postscript,
   \string\psleveltwo, \string\hp, or \string\nographics.}%
         \immediate\write16{}\fi
         \graphboxa{}{#3}{#4}%
      \fi
   \fi}
% It may by convenient to express graphics dimensions in pixels,
%    which for 300 dpi can be defined as follows.  One would
%    expect \pix=.003333truein, but for some reason it doesn't
%    quite work.
\pix=0.0033466truein % Value taken from gtransp.tex; Determined by 
                     % experimentation, tested exact at 2000 pixel separation

% Technical notes on \graphboxa:
%   The macro produces a box of width #2 and height #3, for
%   either setting of \showgbox.  If \showgbox is true, it
%   produces a visible rule around the box, of standard thickness
%   0.4pt.  This rule, however, does not affect the size of the
%   box, or the location of the box or its \special{insert}.  The
%   inner \vcenter is enclosed in an \hbox to prevent it from
%   starting a paragraph.  The \hbox{} at the bottom of the
%   outer \vcenter is included so that when \showgbox is false,
%   the depth of the last \hbox is zero--- otherwise this depth
%   is added to the vertical dimension of the \vcenter.  And the
%   % sign is used to prevent the insertion of a space in
%   horizontal mode.  The \offinterlineskip might not be
%   necessary, but is intended to guarantee that the \lineskip
%   inserted before \hbox{} is zero.  And the vcenter has the
%   effect of putting the baseline in the middle of the box. 
%   (Actually it is the height + depth that is equal to the
%   height specified in the calling statement. 
%        \hphigh was added 1/14/93, to compensate for a
%   shortcoming of the ptihp program that I use to convert dvi
%   files into an hp file for printing on the HP printer.  Since
%   the maximum resolution when the program was written was 300
%   dpi, the program does not properly handle 600 dpi.  If ptihp
%   simply inserted the hp file when the special was executed,
%   there would be no problem.  However, the ptihp program was
%   written under the assumption that when a graphics file is
%   inserted, the active point just before the insertion should
%   be at the lower left corner of the graphic image.  The HP
%   printer, however, inserts the graphic starting from the upper
%   left corner.  So before executing the special command, ptihp
%   automatically inserts a negative vskip of length equal to the
%   height of the picture.  The graphboxa macro allows for this
%   by using topstartfalse for HP mode, so that the point is
%   started at the lower left corner of the image.  However, in
%   600 dpi mode, ptihp assumes that the resolution is really 300
%   dpi.  When the bitmap is examined, it concludes that the
%   size of the bitmap is twice as large as it really is, and so
%   inserts a negative vskip that is twice as large.  The hphigh
%   mechanism therefore inserts a positive vskip equal to the
%   height of the bitmap to compensate.  The vskip is inserted
%   only if graphtype=3 (HP mode), and only if \ifhphi is true. 
%   The macro \hphigh is to be run before the call to graphbx, so
%   that \ifhphi is set to true.  When graphbx runs it sets \ifhp
%   back to false, so the \hphigh statement affects only the next
%   use of graphbx.

\def\bye{\vfill\supereject\end}

% Display of boxes in LIS files:
%  The following macro will cause boxes to be displayed in full. 

\def\showall{\showboxdepth=\maxdimen \showboxbreadth=\maxdimen} 

% Show memory usage by default, use \nomemoryreport to cancel
\tracingstats=1
\def\nomemoryreport{\tracingstats=0}
