Debian Codegraph @

texmf-dist/tex/psizzl/base/macros.Psizzl

raw
1 % MACROS PSIZZL - macros for use with Psizzl
2 %
3 % begin rewrite of PLAIN macros
4 % end rewrite of PLAIN macros
5 \hyphenation{mac-ro}%
6 \catcode`\@=11
7 \chardef\l@tter=11
8 \chardef\@oline=5
9 \chardef\@ther=12
10 \chardef\c@ntrol=00
11 % unlock macro names with @ key
12 \def\unlock{\catcode`\@=\l@tter}% @ character can be used in macro names
13 % lock up the macros
14 \def\lock{\catcode`\@=\@ther}% macros using this character are now locked
15 %
16 \def\c@tAactive{\catcode`\&=\active}%
17 \def\c@tAalign{\catcode`\&=4}{\c@tAalign\gdef\h@tAalign{&}}%
18 {\c@tAactive\gdef\l@tAalign{\let&\h@tAalign}}%
19 \def\c@tAset{\c@tAactive\ifnum\c@tAactive\l@tAalign\fi}%
20 %
21 \def\c@tMother{\catcode`\^^M=\@ther}%
22 \def\c@tMeoline{\catcode`\^^M=\@oline}%
23 \def\c@tMactive{\catcode`\^^M=\active}%
24 {\c@tMactive%
25 \gdef\l@tMother{\let ^^M=\h@tMother}%
26 \gdef\l@tMspace{\let ^^M=\space}%
27 \gdef\h@tMactive{^^M}%
28 }%
29 {\c@tMother\gdef\h@tMother{^^M}}%
30 \newlinechar`\^^M
31 %
32 \def\c@tVset{\ifnum\catcode`|=\active\l@tVother\fi}%
33 \def\c@tVcontrol{\catcode`|=\c@ntrol}%
34 \def\c@tVactive{\catcode`|=\active}%
35 \def\c@tVother{\catcode`|=\@ther}%
36 {\c@tVother\gdef\h@tVother{|}}%
37 {\c@tVactive\gdef\l@tVother{\let|\h@tVother}\gdef\l@tVzero{\let|=0}}%
38 %
39 {\catcode`\%=\@ther\gdef\percent{%}}%
40 \def\c@tBother{\catcode`\\=\@ther}%
41 \def\c@tBactive{\catcode`\\=\active}%
42 \def\c@tBcontrol{\catcode`\\=\c@ntrol}%
43 \def\c@tLQactive{\catcode`\`=\active}%
44 \def\c@tCactive{\catcode`\^=\active}%
45 {\c@tCactive\gdef\l@tCzero{\let^=0}}%
46 {% \outer plaintex macros not to be recognized during a \write
47 \let\settabs=0\let\+=0\let\beginsection=0\let\proclaim=0\let\bye=0%
48 \gdef\l@tplain{% all \outer and all that use \ifmmode
49 \let\settabs=0\let\+=0\let\beginsection=0\let\proclaim=0\let\bye=0%
50 \let~=0\let\footnote0%
51 \let\strut0\let\dots0\let\ph@nt0\let\smash0%
52 }%
53 }%
54 \def\l@twrite{\l@tplain\let\underscore=0}%
55 %
56 \def\Psizzl{%
57 P%
58 \kern-.30em\lower.70ex\hbox{s}%
59 \kern-.08em\lower.0 ex\hbox{i}%
60 \kern-.05em\lower.0 ex\hbox{z}%
61 \kern-.17em\lower.5 ex\hbox{z}%
62 \kern-.09em\lower.2 ex\hbox{l}%
63 }%
64 \def\fmtreset{}\def\fmtuser{my\fmtname\relax}%
65 \def\fmtjob{%
66 \CMS{CP SMSG GJMSINK PSIZZLLL \fmtversion\space\jobname}%
67 \message{This is \fmtname, Version \fmtversion}%
68 \fmtreset
69 \input\fmtuser
70 }%
71 \everyjob={\fmtjob}%
72 %
73 % cute and otherwise desirable-to-have macros
74 %
75 \newif\iftemp % scratch if macro
76 \newcount\tempcount% scratch count register
77 \def\diagnostics{%
78 %\tracingonline\@ne
79 \tracingcommands\tw@\tracingstats\tw@
80 \tracingpages\@ne
81 %\tracingoutput\@ne\tracinglostchars\@ne
82 \tracingmacros\@ne\tracingparagraphs\@ne
83 %\tracingrestores\@ne
84 %\showboxbreadth\maxdimen\showboxdepth\maxdimen
85 %\errorstopmode
86 }%
87 \def\adddef#1#2{%
88 \toks\z@=\expandafter{#1}\toks\@ne={#2}%
89 \xdef#1{\the\toks\z@\the\toks\@ne}%
90 }%
91 \def\logit#1{\immediate\write-1{\meaning#1}}%
92 %
93 \def\endp@ge{\par \vfill \eject}%
94 \def\endle@f{\endp@ge\ifodd\pageno\else\hrule height\z@\endp@ge\fi}%
95 \let\endpage\endp@ge\let\endleaf\endp@ge
96 %
97 \def\underscore#1{$\underline{\smash{\hbox{#1}}}$}%
98 %
99 \def\leaderfil{\leaders\hbox to 2em{\hss.\hss}\hfil}%
100 %
101 \def\centertitle#1{\par\noindent\hfil #1\hfil\par}% center text
102 %
103 \def\breaktitle{\hfil\par\noindent\hfil}% break text
104 %
105 \def\d@te{\the\day\tie\monthword\tie\the\year}%
106 \def\monthdayyear{% alternate date format
107 \gdef\d@te{\monthword\tie\the\day,\tie\the\year}%
108 }%
109 \def\date#1{\gdef\d@te{#1}}%
110 \def\thedate{\d@te}%
111 \chardef\vx@=60\newcount\hour\newcount\minute
112 \def\fildec#1{\ifnum#1<10 0\fi\the#1}%
113 \def\thetime{% \thetime -> 09:36 e.g.: `This job was run at \thetime.'
114 \hour\time\divide\hour\vx@
115 \minute-\hour\multiply\minute\vx@\advance\minute\time
116 \fildec\hour:\fildec\minute
117 }%
118 \def\bumpcount#1{%
119 \ifnum#1<\z@\let\temp\m@ne\else\let\temp\@ne\fi
120 \global\advance#1\temp
121 }%
122 \def\numorroman#1{%
123 \ifnum#1<\z@\romannumeral-#1\else\number#1\fi
124 }%
125 \def\lapcomma{\llap{,}}%
126 % characters and things
127 %
128 % macro to assist in breaking paragraphs, use in place of \par, or
129 % blank line, terminating the paragraph in question.
130 \def\padline#1{\line{\ #1\ }}%
131 \def\thinhrule{\hrule height.4pt}%
132 \def\thinvrule{\vrule width .4pt}%
133 \def\loosepar{{\tolerance1000\par}}%
134 \def\noraggedright{\rightskip\z@skip\spaceskip\z@skip\xspaceskip\z@skip}%
135 \def\p@int{.}%
136 \def\d@sh{--}%
137 \def\hidenull#1{\setbox\z@=\vbox{#1}\ifdim\ht\z@=\z@\else#1\endline\fi}%
138 \def\translate#1#2#3{%\translate{<Xdimen>}{<Ydimen>}{thing}
139 \vbox to\z@{\offinterlineskip
140 \kern-#2\hbox to\z@{\kern#1{#3}\hss}\vss
141 }%
142 }%
143 % macros for the \CMS command: \write 15
144 \chardef\fift@@n=15
145 \global\chardef\CMSwrite=\fift@@n
146 \wlog{\string\CMSwrite=\string\write\fift@@n}%
147 \outer\def\newwrite{\alloc@7\write\chardef\fift@@n}%
148 \def\CMS{\immediate\write\CMSwrite}%
149 % macros to flag superseded commands
150 \def\supercede#1#2{%
151 \def#1{%
152 \toks@\expandafter{\csname
153 Instead of \string#1, you should use \string#2. \go@on
154 \endcsname}%
155 \errhelp\toks@
156 \errmessage{Psizzl: \string#1 has been superseded by \string#2}#2%
157 }%
158 }%
159 \def\go@on{%
160 Before you run this job again, please change your TeX source file.
161 Do `CONSPIRE CHECK TEX' to see the new command syntax.
162 This is just a warning: you may continue processing by giving a <CR>.
163 }%
164 % following macros flag superseded commands
165 \supercede\memotopic\memosubject
166 \supercede\group\memohead
167 \def\sample#1{{\let\end\relax\input #1 \endpage}\listfile{#1}}%