Introduce global (cross-backend) \cfg{contents} and \cfg{index}
[sgt/halibut] / inputs / test.but
1 \title Halibut: A Test Document With A Stupidly Long Title Just To
2 See If Wrapping Titles Works OK. In Fact This Title Will Span Three
3 Lines, Not Just Two. How's That For Ludicrous?
4
5 \cfg{xhtml-leaf-smallest-contents}{2}
6 \cfg{xhtml-leaf-contains-contents}{true}
7 \cfg{info-dir-entry}{Sillinesses}{test.but}{Halibut test document}
8 \cfg{info-dir-entry}{Florbles}{test.but}{Subsection of Halibut test
9 document}{sub-sub}
10 \cfg{man-headnumbers}{true}
11
12 \cfg{contents}{Contents(edited)}
13 \cfg{index}{Index(alsoedited)}
14
15 This paragraph is not labelled \q{preamble}, but should still appear
16 as it.
17
18 \preamble This manual is a small joke effort, designed to use every
19 feature \#{ comment } that Halibut's input format supports. Creation
20 date \date{%Y.%m.%d} (default format is \date).
21
22 \c Here is a code paragraph in the preamble, just to stress that all
23 \c things are possible. Ooh!
24
25 \copyright Copyright 1999 Simon \#{second comment}Tatham. All rights
26 reserved.
27
28 Here's another \i{preamble paragraph}, which goes after the copyright.
29
30 \define{metacoopt} [this is a nested,
31 multi-line macro, talking about \coopt
32 a bit]
33
34 \define{coopt} co\u00F6{-o}pt
35
36 \define{eur} \u20AC{EUR }
37
38 \versionid $Id$
39
40 \C{ch\\ap} First chapter title; for similar wrapping reasons this
41 chapter title will be ludicrously long. I wonder how much more
42 chapter title I can write before feeling silly.
43
44 This is a para\#{another{} comment}graph of text. It
45 has line\#{yet another one} breaks in between words, multiple
46 spaces (ignored), and \e{emphasised text} as well as \c{code
47 fragments}.
48
49 \#{This is an inline comment alone in a paragraph.}
50
51 \cw{This} is weak code; \cq{this} is quoted code. And \k{head}
52 contains some other stuff. \K{subhead} does too.
53
54 To test the man page back end:
55
56 .Directive
57
58 'Directive
59
60 \cw{.Directive}
61
62 \cw{'Directive}
63
64 \\Sping\\Spong\\Spoing
65
66 \H{head} First section title (very long again, no prizes for
67 guessing the reason why this time, and here's yet more text to pad
68 it out to three lines of output)
69
70 \cfg{winhelp-topic}{M359HPEHGW}
71
72 Here's a code paragraph:
73
74 \c No leading spaces
75 \c One leading space
76 \c Two blank lines follow this one.
77 \c
78 \c
79 \c Two blank lines precede this one.
80 \c Two leading spaces
81 \c We can use \ { and } with impunity here.
82 \c We can use discretionary bold and italic in code paragraphs!
83 \e bbbb iiiiii
84 \c Isn't that ludicrous?
85
86 This is a list:
87
88 \b Ooh.
89
90 \b Aah.
91
92 \lcont{
93
94 This bulletted list contains a list continuation. This is an
95 additional paragraph, or more than one, indented at the same level
96 as the list items, and able to contain nested sublists and other
97 features. For example, here's a code paragraph:
98
99 \c spingle:~$ whoami
100 \c spoggler
101
102 And here's a sublist. Numbered, just for variety.
103
104 \n One.
105
106 \lcont{
107
108 \n 1a.
109
110 \n 1b.
111
112 \lcont{
113 \c Code
114 \c Paragraph
115 }
116
117 \n 1c.
118
119 \lcont{This is an even sillier one: a continuation of a list item in
120 a continuation of a list item in a continuation of a list item!}
121
122 }
123
124 \n Two.
125
126 \n Threeeee!
127
128 }
129
130 \b Eek.
131
132 This is a horizontal rule:
133
134 \rule
135
136 This is a numbered list:
137
138 \n Ooh.
139
140 \n{keyword} Aah.
141
142 \n Eek. \q{Aah} is point \k{keyword}.
143
144 This is a description list:
145
146 \dt FISH
147
148 \dd A piscine creature, often to be found swimming aimlessly around
149 in the sea eating things and not contributing to the global economy.
150
151 \lcont{
152
153 Here's another of those funky list continuation things, just to keep
154 Halibut on its toes.
155
156 }
157
158 \dt BADGER
159
160 \dd A non-piscine creature, often to be found snuffling around on
161 land, not contributing to the global economy, and not even swimming
162 to make up for it. I don't know. These mammals. Pa-thetic.
163
164 \dt "SAUSAGE SALESMAN"
165
166 \dd An exemplary contributor to the global economy. Unless he's CMOT
167 Dibbler.
168
169 This is a much more interesting description list, testing
170 consecutive \c{\\dt}s and consecutive \c{\\dd}s:
171
172 \dt One
173
174 \dt Two
175
176 \dt Three
177
178 \dd Ay
179
180 \dt Four
181
182 \dd Bee
183
184 \dd Cee
185
186 \dd Dee
187
188 A-paragraph-full-of-hyphens-to-test-the-idea-that-word-wrapping-can-happen-somewhere-in-all-this-hyphenatory-nonsense.
189
190 A\-paragraph\-full\-of\-nonbreaking\-hyphens\-to\-test\-the\-idea\-that\-word\-wrapping\-misses\-them.
191
192 A\_paragraph\_full\_of\_nonbreaking\_spaces\_to\_test\_the\_idea\_that\_word\_wrapping\_misses\_them\_too.
193
194 Use of macros: let's talk about \coopt. And about \coopt some more.
195 And a nested macro: \metacoopt.
196
197 A slightly more difficult macro: \eur\.2500.
198
199 Test of input character set switching.
200
201 \n 8859 character in ASCII mode: expect nothing useful. [coöpt]
202
203 \cfg{input-charset}{ISO-8859-1}
204
205 \n 8859 character in 8859 mode: expect the right thing. [coöpt]
206
207 \cfg{input-charset}{UTF-8}
208
209 \n 8859 character in UTF-8 mode: expect the wrong thing. [coöpt]
210
211 \cfg{silliness}{coöpt}
212
213 \n UTF-8 sequence in UTF-8 mode: expect the right thing again. [coöpt]
214
215 \cfg{input-charset}{ASCII}
216
217 Back to ASCII again.
218
219 Oh, while I'm here: some special characters. The \\, \{ and \}
220 characters, to be precise. And their code equivalents, \c{\\},
221 \i\c{\{}, \c{\}}. The ` and ' characters (grave and apostrophe)
222 are special in some output formats.
223
224 \S{subhead} First subheading
225
226 So here's a \I{subheading}\I{subsection}subsection. Just
227 incidentally, \q{this} is in quotes. \ii{Those} quotes had better work
228 in all formats.
229
230 We'll try for some Unicode here: \i{Schr\u00F6{oe}dinger}.
231
232 An index tag containing non-alternatived Unicode: \i{\u00BFChe?}
233
234 An invisible index tag: \I{she seems to have an invisible tag}yeah.
235
236 \S2{sub-sub}{Florble} Smaller heading still
237
238 A tiny section. Awww. How cute. Actually, this one's a \e{florble},
239 and here's a reference to it: \k{sub-sub}.
240
241 \A{app} Needless appendix
242
243 \# \cfg{winhelp-topic}{Y5VQEXZQVJ} (uncomment this and it clashes)
244
245 Here's an \i{appendix}, for no terribly good reason at all. See
246 __\k{book}__ (please excuse those underscores, I'm testing
247 whitespace).
248
249 It also contains a \W{http://www.tartarus.org/}{hyperlink}.
250
251 Also I'm going to index \i\c{-output} to ensure that its two
252 components are displayed as a joined-up code fragment in the index.
253
254 Here are \I{testone}some \I{testtwo}subsections \I{testthree}with
255 silly chapter titles and interesting use of Unicode. The Unicode
256 oddities are in the titles rather than the body text because that
257 way I get to test their handling in the PDF document outline.
258
259 \H{app-one} The 1024 \u00D7{x} 768 screen resolution
260
261 Err.
262
263 \H{app-two} How about Spongletech\u2122{(TM)}?
264
265 Umm.
266
267 \# I'm going to label one of these with a carefully chosen fragment
268 \# name "i1", because I know this will also be generated as an index
269 \# fragment name and this allows me to test the fragment name clash
270 \# detection.
271 \#
272 \# To actually run this test you need to configure html-leaf-level
273 \# to 0 and html-template-fragment to %k.
274
275 \H{i1} Or just Erd\u0151{\u00F6{o}}s?
276
277 Ahh.
278
279 \U Bibliography
280
281 \B{book} Some text describing a book.
282
283 \B{nocite} Some text describing a book. This text should appear in
284 the document even though there is no \cw{\\k} citing it.
285
286 \BR{book} [SillyCitation]
287 \BR{uncited} Badger.
288
289 \nocite{nocite}
290
291 \B{uncited} If this text appears, there's an actual error.
292
293 \# This is a comment.
294
295 \# Now for the index section.
296
297 \IM{she seems to have an invisible tag}{appendix} Invisible tags
298 and/or appendices
299
300 \# The display forms of these three index terms differ only in case.
301 \# This is a fiddly special case in the Windows Help backend,
302 \# because Windows Help's index mechanism is case-insensitive...
303
304 \IM{testone} Test
305 \IM{testtwo} TesT
306 \IM{testthree} test