| 1 |
% special macros for use with MFT output |
| 2 |
|
| 3 |
\font\tenlogo=logo10 % font used for the METAFONT logo |
| 4 |
\font\tentex=cmtex10 \hyphenchar\tentex=-1 % font used for strings |
| 5 |
\font\sevenit=cmti7 \scriptfont\itfam=\sevenit |
| 6 |
\def\MF{{\tenlogo META}\-{\tenlogo FONT}} |
| 7 |
|
| 8 |
\parindent=0pt |
| 9 |
\thinmuskip=5mu |
| 10 |
\thickmuskip=6mu plus 6mu |
| 11 |
\mathcode`\|="326A |
| 12 |
|
| 13 |
\def\\#1{{\it#1}} % italic type for identifiers |
| 14 |
\def\0#1#2#3{\hbox{\rm\'{}\kern-.2em\it#1#2#3\/\kern.05em}} % octal constant |
| 15 |
\def\1#1{\mathop{\hbox{\rm#1}}} % operator, in roman type |
| 16 |
\def\2#1{\mathop{\hbox{\bf#1\/\kern.05em}}} % operator, in bold type |
| 17 |
\def\3#1{\,\mathclose{\hbox{\bf#1\/}}} % `fi' and `endgroup' |
| 18 |
\def\4#1{\mathbin{\hbox{\bf#1\/}}} % `step' and `at' |
| 19 |
\def\5#1{\hbox{\bf#1\/}} % `true' and `nullpicture' |
| 20 |
\def\6#1{\mathbin{\rm#1}} % `++' and `scaled' |
| 21 |
\def\7{\hbox\bgroup\nocats\frenchspacing\finstring} % string token |
| 22 |
\def\8#1{\mathrel{\mathcode`\.="8000 \mathcode`\-="8000 |
| 23 |
#1\unkern}} % `..' and `--' |
| 24 |
\def\9{\hfill$\%} % comment separator |
| 25 |
\def\?#1{\mathopen{#1}\;} % `:', `::', and `||:' |
| 26 |
\def\frac#1/#2{\leavevmode\kern.1em |
| 27 |
\raise.5ex\hbox{\the\scriptfont0 #1}\kern-.1em |
| 28 |
/\kern-.15em\lower.25ex\hbox{\the\scriptfont0 #2}} |
| 29 |
|
| 30 |
\mathchardef\AM="2026 % ampersand |
| 31 |
\let\BL=\medskip % space for empty line |
| 32 |
\mathchardef\BS="026E % backslash |
| 33 |
\mathchardef\HA="0222 % hat ("005E not as good) |
| 34 |
\def\PS{\mathbin{+{-}+}} % pythagorean subtraction |
| 35 |
\def\SH{\raise.7ex\hbox{$\scriptstyle\#$}} % sharp sign for sharped units |
| 36 |
\mathchardef\TI="007E % tilde |
| 37 |
|
| 38 |
\chardef\other=12 |
| 39 |
\def\nocats{\catcode`\\=\other \catcode`\{=\other |
| 40 |
\catcode`\}=\other \catcode`\$=\other \catcode`\&=\other |
| 41 |
\catcode`\#=\other \catcode`\%=\other \catcode`\~=\other |
| 42 |
\catcode`\_=\other \catcode`\^=\other} |
| 43 |
\def\finstring"#1"{\tentex"#1"\egroup} |
| 44 |
|
| 45 |
\newbox\shorthyf \setbox\shorthyf=\hbox{-\kern-.05em} |
| 46 |
\mathchardef\period=`\. |
| 47 |
{\catcode`\-=\active \global\def-{\copy\shorthyf\mkern3.9mu} |
| 48 |
\catcode`\.=\active \global\def.{\period\mkern3mu}} |
| 49 |
|
| 50 |
\def\bf{\fam\bffam |
| 51 |
\def\_{\kern.04em\vbox{\hrule width.3em height .6pt}\kern.08em}% |
| 52 |
\tenbf} |
| 53 |
|
| 54 |
\def\join#1${} % say %%\join in .mf file to join lines together |
| 55 |
\def\]{\hskip0pt plus 1filll\ } % say % comment\] to get comment flush left |