|
|
1.1 root 1: % Support for writing UNIX-style documentation (based on webmac.tex)
2:
3:
4: \catcode`\@=11 % for a little while
5:
6:
7: % More fonts
8:
9: \font\sixteentex=amtex10 scaled\magstep2
10: \font\twelvetex=amtex10 scaled\magstep1
11: \font\tentex=amtex10
12: \font\eighttex=amtex10
13:
14: \def\curfont{%
15: \ifcase\font@no
16: \rm\or
17: \it\or
18: \sl\or
19: \bf\or
20: \tt\or
21: \sc\or
22: \sf\or
23: \tx
24: \else \errmessage{font madness}\fi
25: }
26:
27: \chardef\AM=`\& % ampersand
28: \chardef\BS=`\\ % backslash
29: \chardef\LB=`\{ % left brace
30: \chardef\RB=`\} % right brace
31: \def\LQ{{\tt\char'22}} % left quote
32: \def\RQ{{\tt\char'23}} % right quote
33: \def\SP{{\tt\char`\ }} % space
34: \chardef\TL=`\~ % tilde
35: \chardef\UL=`\_ % underline
36:
37: \def\everypointsize#1#2{%
38: \def\tx{%
39: \font@no=8
40: \csname#1tex\endcsname
41: \let\&=\AM \let\\=\BS \let\{=\LB \let\`=\LQ
42: \let\}=\RB \let\'=\RQ \let\ =\SP \let\~=\TL
43: \let\_=\UL
44: }%
45: }
46:
47: \curtype
48:
49:
50: % Standard Characters
51:
52: \def\#{\hbox{\tt\char`\#}} % parameter sign
53: \def\${\hbox{\tt\char`\$}} % dollar sign
54: \def\%{\hbox{\tt\char`\%}} % percent sign
55: \def\^{\ifmmode\mathchar"222 \else\char`^ \fi} % pointer or hat
56:
57:
58: % Examples
59:
60: \def\eg#1{\hbox{\tx``#1''}} % in-line
61:
62: \def\example#1\endexample{% % multi-line
63: $$%
64: \displayindent=\leftskip
65: \advance\displayindent by1.5\parindent
66: \let\\=\cr
67: \tabskip=0pt
68: \halign{%
69: \leftline{\tx\ignorespaces##\unskip}\cr
70: #1\cr
71: }$$%
72: }
73:
74:
75: % Miscellany
76:
77: \def\pgm#1{{\it#1}} % UNIX programs
78: \def\man#1(#2){\pgm{#1\/}(#2)} % manual entries
79: \def\arg#1{\hbox{\tx`{}#1'{}}} % arguments to programs
80: \def\switch#1{\hbox{\tx`{}-#1'{}}} % switches to programs
81: \def\file#1{\hbox{\sl#1}} % filename
82: \def\bq#1{`{}#1`{}} % back-quoted command
83:
84:
85: % Commonly used software systems
86:
87: \def\EMACS/{{\sf EMACS}}
88: \def\INFO/{{\sf INFO}}
89: \def\MLisp/{{\sf MLisp}}
90:
91: \def\MH/{{\sf MH}}
92: \def\mh#1{{\sf mh.#1}}
93: \def\context/{\file{context}}
94: \def\profile/{\file{.mh\_profile}}
95: \def\whatnow/{{\tx What now?\/}}
96:
97: \def\MMDF/{{\sf MMDF}}
98: \def\MMDFII/{{\sf MMDF-II}}
99:
100: \def\AMSPPT.STY/{{\tt amsppt.sty}}
101: \ifundefined{AmsTeX}
102: \def\AmSTeX{%
103: $\cal A$\kern-.1667em\lower.5ex\hbox{$\cal M$}\kern-.125em
104: $\cal S$-\TeX
105: }%
106: \fi
107:
108: \def\DISS.STY/{{\tt diss.sty}}
109: \def\PhDTeX{PhD-\TeX}
110:
111: \def\ROFF/{{\sf ROFF}}
112:
113: \def\TTYD/{{\sf TTYD}}
114:
115:
116: \catcode`\@=12 % back to normal
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.