summaryrefslogtreecommitdiff
path: root/macros/lamstex/inputs/pcompat.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/lamstex/inputs/pcompat.tex
Initial commit
Diffstat (limited to 'macros/lamstex/inputs/pcompat.tex')
-rw-r--r--macros/lamstex/inputs/pcompat.tex78
1 files changed, 78 insertions, 0 deletions
diff --git a/macros/lamstex/inputs/pcompat.tex b/macros/lamstex/inputs/pcompat.tex
new file mode 100644
index 0000000000..4c30fed5bd
--- /dev/null
+++ b/macros/lamstex/inputs/pcompat.tex
@@ -0,0 +1,78 @@
+% 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 \ No newline at end of file