%	ptx.sty

\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025emb}\kern-.08em\TeX}}
% \def\BibTeX{{\rm B\kern-.05em{\smc i\kern-.025emb}\kern-.08em\TeX}}
% \def\LaTeX{L\kern-0.1em\raisebox{0.5ex}{a}\TeX\relax}
%%  \LaTeX definition added by BNB, 12 Aug 91
\newcount\TestCount
\def\La{\TestCount=\the\fam \leavevmode L\raise.42ex
        \hbox{$\fam\TestCount\scriptstyle\kern-.3em A$}}
\def\platex{\La\kern-.15em\TeX}
\def\LaTeX{\protect\platex}
%
%  set appropriate \bffam scriptsize fonts for \LaTeX logos
\font\sevbf=cmbx7
\font\svtnbf=cmbx12 at 17pt
\font\fivrm = cmr5 % used below
\def\@normalsize{\@setsize\normalsize{12pt}\xpt\@xpt
  \scriptfont\bffam\sevbf
  \abovedisplayskip 10pt plus2pt minus5pt \belowdisplayskip \abovedisplayskip
  \abovedisplayshortskip \z@ plus3pt
  \belowdisplayshortskip 6pt plus3pt minus3pt\let\@listi\@listI} 
\def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt \scriptfont\bffam\svtnbf}
%%  end of definitions added by BNB
%
%	style settings
%
\overfullrule=2pt
%
\pagestyle{headings}
%\def\@lhead{\the\count0 \hfil}  
%\def\@rhead{\hfil \the\count0}
\showboxbreadth=9999
\vfuzz 6pt
\hfuzz 6pt
\showboxdepth=9
\vbadness=10001
\splittopskip=0pt	% for our vsplits in the \ptx macro
\def\cmdfont{\tt}
%
\newcount\comcount
\newdimen\rightsize		% size of text to the right of the
	\rightsize=77mm		% separation
\newdimen\thisrightsize		% scratch
\newdimen\leftsize		% size of text to the left of the separation
	\leftsize=\rightsize
\newdimen\centersep		% size of the separation
	\centersep=3mm
\newdimen\maxlabelwidth
	\maxlabelwidth=0.75in
\newdimen\comlabelwidth
	\comlabelwidth=0.8in	% minimum label width in the command summary
\newdimen\comhangindent
	\comhangindent=\comlabelwidth
	\advance\comhangindent by 0.25in
\newskip\wrapsep		% space between wrapped text and normal text
	\wrapsep=2em minus 4pt
%
%
%	table of contents stuff
%
% \newwrite\contentsfile
% \newread\oldcontentsfile
% \def\contentsline#1#2{
% 	\@@line{\raisebox{0.25ex}{\hbox{$\bullet$}}
% 		\hskip 1em #1 \dotfill \quad #2}
% 	}
% \def\writecontents#1{\write\contentsfile
%                         {\string\contentsline{#1}{\the\count0}}}
%
%	macro definitons
%
\def\\{\char'134}
%
% \def\chapter#1{
% 	\cleardoublepage
% 	\refstepcounter{chapter}
% 	\chaptermark{#1}
% 	\writecontents{\protect #1}
% 	\begin{center}
% 	\huge	#1
% 	\end{center}
% 	\vskip 5ex plus 2ex}
%
\def\setindexstyle{
	\fboxsep=0pt
	\raggedbottom
	\headsep=0.3in
	\textheight=8.8in
	\topmargin=-0.25in
	\evensidemargin=0.68in
	\oddsidemargin=1.1in
	\hyphenpenalty=10000
	\exhyphenpenalty=10000
	\tolerance=1600
	\hbadness=1600
	%\catcode`\/=0
	%\catcode`\\=12
	}
%
%	boxes for the line splitting stuff
%
\newbox\leftbox
\newbox\leftextra
\newbox\leftside
\newbox\rightbox
\newbox\rightextra
\newbox\labelbox
%
\long\def\ptx#1#2#3#4{%
	%
	% make the label.  If it doesn't fit in a standard label size,
	% take room from the right side of the definition.
	%
	\setbox\labelbox=\hbox{\hskip 1em #3}
	\thisrightsize=\rightsize
	\ifdim\wd\labelbox>\maxlabelwidth  % label doesn't fit,
                                           % steal space from right def
		\dimen0=\wd\labelbox
		\advance\dimen0 by -\maxlabelwidth
		\advance\thisrightsize by -\dimen0
	\else
		\setbox\labelbox=\hbox to \maxlabelwidth{%
			\hfil \unhbox\labelbox}
	\fi
	%
	% split off the part that fits from each side of the entry
	%
	\setbox\leftside=\vbox{\hbadness=10000
		\parindent 0pt
		\parfillskip=0pt
		\hsize=\leftsize
		\leftskip 0pt plus 2em
		\spaceskip.3333em \xspaceskip.5em\relax
		\hskip 0pt plus \leftsize #1\par
	}
	\loop\ifvbox\leftside
		\setbox\leftextra=\box\leftbox
		\setbox\leftbox=\vsplit\leftside to 10pt
	\repeat
	\unvbox\leftbox
	\setbox\leftbox=\lastbox
	\setbox\leftbox=\hbox{\unhbox\leftbox}
	%
	\ifvoid\leftextra
	\else
		\unvbox\leftextra
		\setbox\leftextra=\lastbox
		\setbox\leftextra=\hbox{%
			\unhbox\leftextra\unskip
		}
	\fi
	%
	% right side
	%
	\setbox\rightextra=
		\vbox{\parshape=2 0pt \thisrightsize 0pt \maxdimen
			\leftskip=0pt
                        \rightskip=0pt plus \thisrightsize\relax #2
		}
	\setbox\rightbox=\vsplit\rightextra to 10pt
	\unvbox\rightbox
	\setbox\rightbox=\lastbox
	\setbox\rightbox=\hbox{\unhbox\rightbox}
	%
	\ifvoid\rightextra
	\else
		\unvbox\rightextra
		\setbox\rightextra=\lastbox
		\setbox\rightextra=\hbox{\unhbox\rightextra
                        \unskip\unskip\unpenalty}
	\fi
	%
	%
	% wrap text around to the other side
	%
	\ifvoid\leftextra
	\else
		\setbox\rightbox=\hbox{\unhbox\rightbox
                        \quad\quad\unhbox\leftextra}
	\fi
	\setbox\rightbox=\hbox to \thisrightsize{\unhbox\rightbox
		\hskip 1em minus 1em\dotfill}
	%
	\ifvoid\rightextra
		\setbox\leftbox=\hbox to \leftsize{\hfil\unhbox\leftbox}
	\else
		\setbox\leftbox=\hbox to \leftsize{\unhbox\rightextra
			\hfill
			\unhbox\leftbox
		}
	\fi
	\hbox to \textwidth{%
		\hss
		\hbox{\box\leftbox
			\hskip \centersep
			\box\rightbox
			\box\labelbox
			\hbox to 0pt{\raise 0.7ex
                                      \hbox{\thinspace\fivrm #4\relax}\hss}
		}%
		\hss
	}
}
%
% \com{<csname>}{<definition>}{<type>}
%
\long\outer\def\com#1#2#3{
	\def\\{\char'134}
	\advance\comcount by 1
	\hangindent=\comhangindent\hangafter=1\parindent=0pt
		\setbox0=\hbox{\raisebox{.5ex}{\llap{\small #3}}#1\quad}
		\ifdim\wd0<\comlabelwidth
			\setbox0=\hbox to \comlabelwidth{\box0 \hfil}
		\fi
		\noindent\box0 #2\relax\par
	}
%
%	Our quoting stuff, as close as I could get to a verbatim I liked.
%
%
\catcode`\|=\active
\catcode`\+=\active
%
%
\def+#1+{{\cmdfont \catcode`\$=12 \catcode`\&=12 \catcode`\#=12 \catcode`\%=12%
\catcode`\>=12 \catcode`\_=12 \catcode`\^=12 \catcode`\&=12 \catcode`\\=12%
\frenchspacing\obeyspaces \csname#1\endcsname}}
%
\gdef|#1|{{\cmdfont \catcode`\$=12 \catcode`\&=12 \catcode`\#=12 \catcode`\%=12%
\catcode`\>=12 \catcode`\_=12 \catcode`\^=12 \catcode`\&=12\catcode`\\=12%
\frenchspacing\obeyspaces \string #1}}
