summaryrefslogtreecommitdiff
path: root/macros/plain/contrib/zztex/tex/zzplain.tex
blob: a24aa80139b3f7dc0129b76721c7d8822401ff3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
% Module:    ZzTeX Plain TeX Compatibility
%
% Synopsis:  This module contains definitions necessary for
%            compatibility with Plain TeX.  The only goal is to
%            allow ZzTeX to run on top of Plain TeX.
%
% Author:    Paul C. Anagnostopoulos
% Created:   24 July 1991
%
% Copyright 1989--2020 by Paul C. Anagnostopoulos
% under The MIT License (opensource.org/licenses/MIT)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\if \definedp{\dospecials}
  \let \znext = \relax
\else
  \let \znext = \endinput
\fi
\znext

\def \zplainerror {%
  \error{plaintex}{Cannot use this Plain TeX feature in ZzTeX}}

%                       Definitions
%                       -----------


\catcode`\@ = \catletter
\zremovePlaindef \p@
\definedimen{\p@}{1pt}
\zremovePlaindef \z@
\definedimen{\z@}{0pt}
\zremovePlaindef \z@skip
\defineskip{\z@skip}{0pt plus 0pt minus 0pt}
\catcode`\@ = \catactive

\let \beginsection = \zplainerror

\let \bye = \zplainerror

\let \eject = \zplainerror

\let \leavevmode = \ensurepar

\let \normalbottom = \zplainerror

\let \raggedright = \zplainerror

\let \supereject = \zplainerror

\let \ttraggedright = \zplainerror

%                       Eliminate Fonts
%                       --------- -----

  \tcounta = 0
  \loop
    \zclearfam{\tcounta}%
    \increment \tcounta
  \if \lssp{\tcounta}{16}\repeat

  \let \rm  = \relax
  \let \mit = \relax
  \let \it  = \relax
  \let \sl  = \undefined  \let \slfam = \undefined
  \let \bf  = \relax
  \let \tt  = \relax