% cod style file.  Margins as in tcdmath.sty.
%\oddsidemargin -14pt \evensidemargin -14pt
%Equation stuff removed for compatibility with amsmath.
%COD 3 4 01
\oddsidemargin 0pt \evensidemargin 0pt
\textheight 650pt \textwidth 482pt
\topmargin 0.4cm
%I'm temporarily changing these Colm O Dunlaing 04/02/93
%def\IN{{\blb N}}
\def\IN{{\bf N}}
%def\IZ{{\blb Z}}
\def\IZ{{\bf Z}}
%def\IQ{{\blb Q}}
\def\IQ{{\bf Q}}
%def\IR{{\blb R}}
\def\IR{{\bf R}}
%def\IC{{\blb C}}
\def\IC{{\bf C}}
\def\IH{{\bf H}}
\def\cent{\hbox{\rm c\llap{$|$}}}
% redefinition for theorem (with optional argument) to put number first
\def\@begintheorem#1#2{\rm \trivlist \item[\hskip \labelsep{\bf(#2)\ #1}] \it}
\def\@opargbegintheorem#1#2#3{\rm \trivlist
      \item[\hskip \labelsep{\bf (#2)\ #1\ (#3)}] \it}
\newtheorem{theorem}{Theorem}[section]
\newcommand{\takeanumber}{\refstepcounter{theorem}%
\def\nextnumber{\thetheorem}}
\newcommand{\numpara}{\refstepcounter{theorem}%
\medbreak\noindent{\bf (\thetheorem)\ \ \ }}
\def\endequation{$ \hfill\medbreak }
\def\qedrule{\vrule height0.75em width0.5em depth0.25em}
\def\makeqedrule{\nobreak \ifvmode \relax \else
      \ifdim\lastskip<1.5em \hskip-\lastskip
            \hskip1.5em plus0em minus0.5em \fi \nobreak
      \qedrule\fi}
\let\qed=\makeqedrule

\chardef\other=12
\def\vbinit{\catcode`\\=\other \catcode`\{=\other
  \catcode`\}=\other \catcode`\$=\other \catcode`\&=\other
  \catcode`\#=\other \catcode`\%=\other \catcode`\~=\other
  \catcode`\_=\other \catcode`\^=\other \catcode`\|=\other
  \obeyspaces \obeylines \tt}
{\obeyspaces\gdef {\ }} % \obeyspaces now gives \ , not \space

\def\boxedetext#1{$$\vbox{\hrule \offinterlineskip
  \halign{\strut \vrule \quad \tt ## \hfil
  \quad \vrule \cr
  \omit \vrule height6pt \hfil \vrule height6pt\cr
  #1\omit \vrule height6pt \hfil \vrule height6pt\cr}\hrule}$$}
\outer\def\beginvbox{\begingroup \let\par=\cr \vbinit \boxedfinish}
{\catcode`\|=0 |catcode`|\=\other % | is temporary escape character
  |obeylines % end of line is active
  |gdef|boxedfinish#1^^M#2\endvbox{|boxedetext{#2}|endgroup}}

\def\handletext#1{$$\vbox{\offinterlineskip
  \halign{\strut \quad \tt ## \hfil
  \quad \cr
  \omit \cr \cr
  #1\omit \cr}}$$}
\outer\def\begincode{\begingroup \let\par=\cr \vbinit \vbfinish}
{\catcode`\|=0 |catcode`|\=\other % | is temporary escape character
  |obeylines % end of line is active
  |gdef|vbfinish#1^^M#2\endcode{|handletext{#2}|endgroup}}
