|
|
1.1 root 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: |environment(tc_heading;
27: clear string EH OH PH,
28: new.page odd, tab.stops \nWuR,
29: divert.string Ts;
30:
31: inline off, size +4, font.family helvetica, center on,
32: font bold, string Ts, font roman,
33: center off, font.family times, size -4, inline on,
34: minimum.lines,
35: clear string Rs,
36: contents section 1 Rs Ts,
37: set string EH "\(ts\s9\\nP\(ts\(ts\f2",
38: add string.from.string EH Ts,
39: add string EH "\fP\s0\(ts",
40: set string OH "\(ts\s9\f2",
41: add string.from.string OH Ts,
42: add string OH "\fP\(ts\(ts\\nP\s0\(ts")
43: |comment<summary: tc_heading (tc program heading)>
44:
45: |environment(index_placement;
46: clear string EH OH PH,
47: new.page odd, spacing on, blank.lines 2i,
48: set string Ts "INDEX", inline off,
49: size +4, inline on, font.family helvetica, blank.lines .25i,
50: tab.stops \nWuR,
51: font bold, tab, string Ts, new.line,
52: font roman, font.family times, size -4, inline on,
53: minimum.lines 1.25i, paragraph,
54: clear string Rs,
55: contents section 1 Rs Ts,
56: set string EH "\(ts\s9\\nP\(ts\(ts\f2",
57: add string.from.string EH Ts,
58: add string EH "\fP\s0\(ts",
59: set string OH "\(ts\s9\f2",
60: add string.from.string OH Ts,
61: add string OH "\fP\(ts\(ts\\nP\s0\(ts",
62: minimum.lines;)
63: |comment<summary: index_placement (put the index here)>
64:
65: |environment(reference_placement;
66: |ifvalue sawreference on [
67: clear string EH OH PH,
68: new.page odd, spacing on, blank.lines 2i,
69: set string Ts "REFERENCES", inline off,
70: size +4, inline on, font.family helvetica, blank.lines .25i,
71: tab.stops \nWuR,
72: font bold, tab, string Ts, new.line,
73: font roman, font.family times, size -4, inline on,
74: minimum.lines 1.25i, paragraph,
75: clear string Rs,
76: contents section 1 Rs Ts,
77: set string EH "\(ts\s9\\nP\(ts\(ts\f2",
78: add string.from.string EH Ts,
79: add string EH "\fP\s0\(ts",
80: set string OH "\(ts\s9\f2",
81: add string.from.string OH Ts,
82: add string OH "\fP\(ts\(ts\\nP\s0\(ts",
83: reference.placement
84: ];
85:
86: sawreference off)
87: |comment<summary: reference_placement (produce references here)>
88:
89:
90:
91: |environment(chapter;
92: clear string EH OH PH,
93: new.page odd, spacing on, blank.lines 2i,
94: incr CH,
95: clear S0 S1 S2
96: S3,
97: set string Ts "Chapter ",
98: add string.from.number Ts CH,
99: inline off, size +10, font.family helvetica,
100: tab.stops \nWuR,
101: tab, string Ts,
102: divert.string Ts;
103:
104: sectioning bychapter,
105: inline off, size +4, font.family helvetica, blank.lines .25i,
106: tab.stops \nWuR,
107: font bold, tab, string Ts, new.line,
108: font roman, font.family times, size -4, inline on,
109: minimum.lines 1.25i, paragraph,
110: store string.from.number Rs CH,
111: contents section 1 Rs Ts,
112: set string EH "\(ts\s9\\nP\(ts\f2",
113: add string.from.string EH Ts,
114: add string EH "\(tsChapter ",
115: add string.from.number EH CH,
116: add string EH "\fP\s0\(ts",
117: set string OH "\(ts\s9\f2Chapter ",
118: add string.from.number OH CH,
119: add string OH "\(ts",
120: add string.from.string OH Ts,
121: add string OH "\fP\(ts\\nP\s0\(ts")
122: |comment<summary: chapter (numbered chapter; IT)>
123:
124: |environment(section;
125: divert.string Ts;
126:
127: minimum.lines 2, protect, incr S0,
128: clear S1 S2 S3,
129: font bold,
130: |ifvalue sectioning bychapter [
131: number CH, text ".",
132: ]
133: |ifvalue sectioning byappendix [
134: number AC, text ".",
135: ]
136: number S0,
137: |ifvalue sectioning bysection [
138: text ".",
139: ]
140: text " ", string Ts, font roman,
141: paragraph,
142: clear string Rs,
143: |ifvalue sectioning bychapter [
144: store string.from.number Rs CH,
145: add string Rs ".",
146: ]
147: |ifvalue sectioning byappendix [
148: store string.from.number Rs AC,
149: add string Rs ".",
150: ]
151: add string.from.number Rs S0,
152: |ifvalue sectioning bysection [
153: contents section 1 Rs Ts,
154: ]
155: |ifvalue sectioning bychapter [
156: contents section 2 Rs Ts,
157: ]
158: |ifvalue sectioning byappendix [
159: contents section 2 Rs Ts,
160: ]
161: set string OH "\(ts\s9\f2Section ",
162: |ifvalue sectioning bychapter [
163: add string.from.number OH CH,
164: add string OH ".",
165: ]
166: |ifvalue sectioning byappendix [
167: add string.from.number OH AC,
168: add string OH ".",
169: ]
170: add string.from.number OH S0,
171: add string OH "\(ts",
172: add string.from.string OH Ts,
173: add string OH "\fP\(ts\\nP\s0\(ts")
174: |comment<summary: section (numbered section; IT)>
175:
176: |environment(appendix;
177: clear string EH OH PH,
178: new.page odd, spacing on, blank.lines 2i,
179: number format AC A, incr AC,
180: clear S0 S1 S2
181: S3,
182: set string Ts "Appendix ",
183: add string.from.number Ts AC,
184: inline off, size +4, font.family helvetica,
185: tab.stops \nWuR,
186: font bold, tab, string Ts, font roman,
187: divert.string Rs;
188:
189: sectioning byappendix,
190: inline off, size +4, font.family helvetica, blank.lines .25i,
191: tab.stops \nWuR,
192: font bold, tab, string Rs, new.line,
193: font roman, font.family times, size -4, inline on,
194: minimum.lines 1.25i, paragraph,
195: store string.from.number Rs AC,
196: contents section 1 Rs Ts,
197: set string EH "\(ts\s9\\nP\(ts\f2",
198: add string.from.string EH Ts,
199: add string EH "\(tsAppendix ",
200: add string.from.number EH AC,
201: add string EH "\fP\s0\(ts",
202: set string OH "\(ts\s9\f2Appendix ",
203: add string.from.number OH AC,
204: add string OH "\(ts",
205: add string.from.string OH Ts,
206: add string OH "\fP\(ts\\nP\s0\(ts")
207: |comment<summary: appendix (numbered appendix; IT)>
208:
209: |environment(unnumbered_chapter;
210: clear string EH OH PH,
211: new.page odd, spacing on, blank.lines 2i,
212: divert.string Ts;
213:
214: sectioning bychapter,
215: inline off, size +4, font.family helvetica, blank.lines .25i,
216: tab.stops \nWuR,
217: font bold, tab, string Ts, new.line,
218: font roman, font.family times, size -4, inline on,
219: minimum.lines 1.25i, paragraph,
220: clear string Rs,
221: contents section 1 Rs Ts,
222: set string EH "\(ts\s9\\nP\(ts\(ts\f2",
223: add string.from.string EH Ts,
224: add string EH "\fP\s0\(ts",
225: set string OH "\(ts\s9\f2",
226: add string.from.string OH Ts,
227: add string OH "\fP\(ts\(ts\\nP\s0\(ts")
228: |comment<summary: unnumbered_chapter (unnumbered chapter)>
229:
230: |environment(unnumbered_section;
231: divert.string Ts;
232:
233: minimum.lines 2, protect, font bold,
234: string Ts, font roman,
235: paragraph,
236: clear string Rs,
237: |ifvalue sectioning bysection [
238: contents section 1 Rs Ts,
239: ]
240: |ifvalue sectioning bychapter [
241: contents section 2 Rs Ts,
242: ]
243: |ifvalue sectioning byappendix [
244: contents section 2 Rs Ts,
245: ]
246: set string OH "\(ts\s9\f2",
247: add string.from.string OH Ts,
248: add string OH "\fP\(ts\(ts\\nP\s0\(ts")
249: |comment<summary: unnumbered_section (unnumbered section)>
250:
251: |environment(unnumbered_appendix;
252: clear string EH OH PH,
253: divert.string Ts;
254:
255: new.page odd, spacing on, blank.lines 2i,
256: sectioning byappendix,
257: inline off, size +4, font.family helvetica, blank.lines .25i,
258: tab.stops \nWuR,
259: font bold, tab, string Ts, new.line,
260: font roman, font.family times, size -4, inline on,
261: minimum.lines 1.25i, paragraph,
262: clear string Rs,
263: contents section 1 Rs Ts,
264: set string EH "\(ts\s9\\nP\(ts\(ts\f2",
265: add string.from.string EH Ts,
266: add string EH "\fP\s0\(ts",
267: set string OH "\(ts\s9\f2",
268: add string.from.string OH Ts,
269: add string OH "\fP\(ts\(ts\\nP\s0\(ts")
270: |comment<summary: unnumbered_appendix (unnumbered appendix)>
271:
272: |environment(:document;
273: line.length 5i,
274: page.length 9.5i,
275: clear string EH OH PH, reference.option rp;)
276:
277: |environment(:document_save;
278: ;)
279:
280: |environment(:document_restore;
281: ;)
282:
283: |macro(top.of.page;
284: [
285: '\" ;P page number register TEMP
286: . de TP
287: ' sp
288: . af ;P \\gP \" save format of P
289: . af P 1 \" normal format for next line
290: . nr ;P \\nP \" must use different name for P
291: . af P \\g(;P \" restore format to P
292: . af ;P 1 \" normal format for control register
293: ' sp 2
294: . if \\n(;P-1 .tl \\*(PH \" output headers
295: . if !\\n(;P%2 .tl \\*(EH
296: . if \\n(;P%2 .tl \\*(OH
297: ' sp .75i
298: . rr ;P \" free storage
299: ..
300: ])
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.