% PCOMPAT.TEX  VERSION 2.0
% COPYRIGHT (C) 1991 BY THE TEXPLORATORS CORPORATION
% ALL RIGHTS RESERVED

% THIS FILE SHOULD NOT BE CHANGED IN ANY WAY. 

%% This file allows certain modifications that might be desired
%% if a plain TeX file has to be run through LamS-TeX.

%% First of all, once this file is \input, the plain constructions
%% \oldstyle and \cal will no longer be undefined, as they normally
%% are in AmS-TeX. (AmS-TeX's alternatives \oldnos and \Cal can
%% also still be used, though it would be pretty confusing to use 
%% \oldstyle and \oldnos together, or \cal and \Cal together, since 
%% the plain constructions work like font changes, while the 
%% AmS-TeX constructions work like control sequences with an argument.)

%% The \mit command, used for things like \mit\Gamma, is a little 
%% different, since AmS-TeX doesn't regard upper-case Greek letters
%% as ``variables'' that can change fonts.  However, if you type
%%
%%      \variableGreek
%%
%% then \mit can be used in this way.

%% Typing
%%
%%      \plaincases
%%
%% makes \cases have the plain syntax, rather than the AmS-TeX
%% syntax.  Similarly,
%%
%%      \plainmatrix
%%
%% makes \matrix have the plain syntax, rather than the AmS-TeX
%% syntax.  Finally, 
%%
%%      \plainfonts
%%
%% allows \rm, etc, to be used in math formulas, whereas AmS-TeX
%% only allows \rm within \text within a math formula (but remember
%% that $\rm two words$ will not give any spaces between the
%% letters, while AmS-TeX's $\text{\rm two words}$ will).

%% \variableGreek, \plaincases, \plainmatrix, and \plainfonts
%% can each be used within a group, if part of the paper uses
%% plain conventions, while part uses AmS-TeX conventions.

\catcode`\@=11
\def\oldstyle{\fam\@ne\the\textfont\@ne}
\def\cal{\fam\tw@}
{\catcode`\"=12
\gdef\variableGreek{\mathchardef\Gamma="7000
 \mathchardef\Delta="7001
 \mathchardef\Theta="7002
 \mathchardef\Lambda="7003
 \mathchardef\Xi="7004
 \mathchardef\Pi="7005
 \mathchardef\Sigma="7006
 \mathchardef\Upsilon="7007
 \mathchardef\Phi="7008
 \mathchardef\Psi="7009
 \mathchardef\Omega="700A 
 \def\mit{\fam\@ne}}
}
\def\plaincases{%
 \def\cases##1{\left\{\,\vcenter{\normalbaselines\m@th
  \ialign{$####\hfil$&\quad####\hfil\crcr##1\crcr}}\right.}}
\def\plainmatrix{%
 \def\matrix##1{\null\,\vcenter{\normalbaselines\m@th
  \ialign{\hfil$####$\hfil&&\quad\hfil$####$\hfil\crcr
  \mathstrut\crcr\noalign{\kern-\baselineskip}%
  ##1\crcr\mathstrut\crcr\noalign{\kern-\baselineskip}}}\,}%
 \def\pmatrix##1{\left(\matrix{##1}\right)}}
\def\plainfonts{\def\rm{\fam\z@\tenrm}\def\it{\fam\itfam\tenit}%
 \def\sl{\fam\slfam\tensl}\def\bf{\fam\bffam\tenbf}\def\smc{\tensmc}%
 \def\textonlyfont@##1##2{\def##1{\fam\csname\exstring@##1fam\endcsname##2}}}
\catcode`\@=\active
.
