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