Let's not use parentheses in test.but in a way that tempts Halibut
[sgt/halibut] / inputs / test.but
1 \define{eur} \u20AC{EUR }
2
3 \title Halibut: A Test Document With A Stupidly Long Title (worth \eur\.1000)
4 Just To See If Wrapping Titles Works OK. In Fact This Title Will Span Three
5 Lines, Not Just Two. How's That For Ludicrous? More than that, though,
6 we'd like to make it more than 255 characters long so that the PostScript
7 backend has to treat it specially in order to pass it to pdfmark.
8
9 \cfg{xhtml-leaf-smallest-contents}{2}
10 \cfg{xhtml-leaf-contains-contents}
11 {true}
12 \cfg{info-dir-entry}{Sillinesses}{test.but}{Halibut test document}
13 \cfg{info-dir-entry}{Florbles}{test.but}{Subsection of Halibut test
14 document}{sub-sub}
15 \cfg{info-section-underline}{2}{~}
16 \cfg{info-charset}{utf-8}
17 \cfg{man-headnumbers}{true}
18
19 \cfg{contents}{Contents - edited title}
20 \cfg{index}{Index - also edited title}
21
22 This paragraph is not labelled \q{preamble}, but should still appear
23 as it.
24
25 \preamble This manual is a small joke effort, designed to use every
26 feature \#{ comment } that Halibut's input format supports. Creation
27 date \date{%Y.%m.%d} (default format is \date).
28
29 \c Here is a code paragraph in the preamble, just to stress that all
30 \c things are possible. Ooh!
31
32 \copyright Copyright 1999 Simon \#{second comment}Tatham. All rights
33 reserved.
34
35 Here's another \i{preamble paragraph}, which goes after the copyright.
36
37 \define{metacoopt} [this is a nested,
38 multi-line macro, talking about \coopt
39 a bit]
40
41 \define{coopt} co\u00F6{-o}pt
42
43 \versionid $Id$
44
45 \C{ch\\ap} First chapter title; for similar wrapping reasons this
46 chapter title will be ludicrously long. I wonder how much more
47 chapter title I can write before feeling silly.
48
49 This is a para\#{another{} comment}graph of text. It
50 has line\#{yet another one} breaks in between words, multiple
51 spaces (ignored), and \e{emphasised text} as well as \c{code
52 fragments}.
53
54 \#{This is an inline comment alone in a paragraph.}
55
56 \cw{This} is weak code; \cq{this} is quoted code. And \k{head}
57 contains some other stuff. \K{subhead} does too.
58
59 To test the man page back end:
60
61 .Directive
62
63 'Directive
64
65 \cw{.Directive}
66
67 \cw{'Directive}
68
69 \\Sping\\Spong\\Spoing
70
71 \H{head} First section title (very long again, no prizes for
72 guessing the reason why this time, and here's yet more text to pad
73 it out to three lines of output)
74
75 \cfg{winhelp-topic}{M359HPEHGW}
76
77 Here's a code paragraph:
78
79 \c No leading spaces
80 \c One leading space
81 \c Two blank lines follow this one.
82 \c
83 \c
84 \c Two blank lines precede this one.
85 \c Two leading spaces
86 \c We can use \ { and } with impunity here.
87 \c We can use discretionary bold and italic in code paragraphs!
88 \e bbbb iiiiii
89 \c Isn't that ludicrous?
90
91 This is a list:
92
93 \b Ooh.
94
95 \b Aah.
96
97 \lcont{
98
99 This bulletted list contains a list continuation. This is an
100 additional paragraph, or more than one, indented at the same level
101 as the list items, and able to contain nested sublists and other
102 features. For example, here's a code paragraph:
103
104 \c spingle:~$ whoami
105 \c spoggler
106
107 And here's a sublist. Numbered, just for variety.
108
109 \n One.
110
111 \lcont{
112
113 \n 1a.
114
115 \n 1b.
116
117 \lcont{
118 \c Code
119 \c Paragraph
120 }
121
122 \n 1c.
123
124 \lcont{This is an even sillier one: a continuation of a list item in
125 a continuation of a list item in a continuation of a list item!}
126
127 }
128
129 \n Two.
130
131 \n Threeeee!
132
133 }
134
135 \b Eek.
136
137 This is a horizontal rule:
138
139 \rule
140
141 This is a numbered list:
142
143 \n Ooh.
144
145 \n{keyword} Aah.
146
147 \n Eek. \q{Aah} is point \k{keyword}.
148
149 This is a description list:
150
151 \dt FISH
152
153 \dd A piscine creature, often to be found swimming aimlessly around
154 in the sea eating things and not contributing to the global economy.
155
156 \lcont{
157
158 Here's another of those funky list continuation things, just to keep
159 Halibut on its toes.
160
161 }
162
163 \dt BADGER
164
165 \dd A non-piscine creature, often to be found snuffling around on
166 land, not contributing to the global economy, and not even swimming
167 to make up for it. I don't know. These mammals. Pa-thetic.
168
169 \dt "SAUSAGE SALESMAN"
170
171 \dd An exemplary contributor to the global economy. Unless he's CMOT
172 Dibbler.
173
174 This is a much more interesting description list, testing
175 consecutive \c{\\dt}s and consecutive \c{\\dd}s:
176
177 \dt One
178
179 \dt Two
180
181 \dt Three
182
183 \dd Ay
184
185 \dt Four
186
187 \dd Bee
188
189 \dd Cee
190
191 \dd Dee
192
193 A-paragraph-full-of-hyphens-to-test-the-idea-that-word-wrapping-can-happen-somewhere-in-all-this-hyphenatory-nonsense.
194
195 A\-paragraph\-full\-of\-nonbreaking\-hyphens\-to\-test\-the\-idea\-that\-word\-wrapping\-misses\-them.
196
197 A\_paragraph\_full\_of\_nonbreaking\_spaces\_to\_test\_the\_idea\_that\_word\_wrapping\_misses\_them\_too.
198
199 Use of macros: let's talk about \coopt. And about \coopt some more.
200 And a nested macro: \metacoopt.
201
202 A slightly more difficult macro: \eur\.2500.
203
204 Test of input character set switching.
205
206 \n 8859 character in ASCII mode: expect nothing useful. [coöpt]
207
208 \cfg{input-charset}{ISO-8859-1}
209
210 \n 8859 character in 8859 mode: expect the right thing. [coöpt]
211
212 \cfg{input-charset}{UTF-8}
213
214 \n 8859 character in UTF-8 mode: expect the wrong thing. [coöpt]
215
216 \cfg{silliness}{coöpt}
217
218 \n UTF-8 sequence in UTF-8 mode: expect the right thing again. [coöpt]
219
220 \cfg{input-charset}{ASCII}
221
222 Back to ASCII again.
223
224 Oh, while I'm here: some special characters. The \\, \{ and \}
225 characters, to be precise. And their code equivalents, \c{\\},
226 \i\c{\{}, \c{\}}. The ` and ' characters (grave and apostrophe)
227 are special in some output formats.
228
229 Now let's exercise the paper backends a little. This is the entire
230 Adobe Standard Latin character set, which should be enough to cause
231 us to need to encode the main font twice:
232
233 \cfg{input-charset}{ISO-8859-1}
234
235 A Æ Á Â Ä À Å Ã B C Ç D E É Ê Ë È Ð F G H I Í Î Ï Ì J K L \u0141 M N Ñ O Ó Ô Ö
236 \u0152 Ò Ø Õ P Q R S \u0160 T Þ U Ú Û Ü Ù V W X Y Ý \u017d
237 a á â ´ ä æ à & å ^ ~ * @ ã b \\ | \{ \} [ ] ¦ \u2022
238 c \u02c7 ç ¸ ¢ \u02c6 : , © ¤ d \u2020 \u2021 ° ¨ ÷ $ \u02d9 \u0131
239 e é ê ë è 8 \u2026 \u2014 \u2013 = ð ! ¡ f \ufb01 5 \ufb02 \u0192 4 \u2044
240 g ß \u2039 \u203a ` > « » h - \u02dd i í î ï ì j k l \u0142 < ¬
241 m \u2212 \u00B5 × n 9 ñ # o ó ô ö \u0153 ò 1 ½ ¼ ¹ ª º ø õ
242 p \u00b6 ( ) % \u2030 . · + ±
243 q ? ¿ " \u201e \u201c \u201d \u2018 \u2019 \u201a '
244 r ® \u02da s \u0161 \u00A7 ; 7 6 / £ t þ 3 ¾ ³ \u02dc \u2122 2 ²
245 u ú û ü ù _ v w x y ý ÿ ¥ z \u017e 0
246
247 \cfg{input-charset}{ASCII}
248
249 Testing ligatures in normal (fi), empasised (\e{fi}), code (\c{fi}) and
250 weak code (\cw{fi}). The latter two should not be ligated.
251
252 \c Also in a code paragraph (fi) with bold (fi) and italic (fi).
253 \e bb ii
254 \c There should be no ligation there.
255
256 The following pair of characters map to different glyphs with the same name in
257 some Microsoft TrueType fonts: \u0394{(missing)} \u2206{(missing)}
258
259 \S{subhead} First subheading
260
261 So here's a \I{subheading}\I{subsection}subsection. Just
262 incidentally, \q{this} is in quotes. \ii{Those} quotes had better work
263 in all formats.
264
265 We'll try for some Unicode here: \i{Schr\u00F6{oe}dinger}.
266
267 An index tag containing non-alternatived Unicode: \i{\u00BFChe?}
268
269 An invisible index tag: \I{she seems to have an invisible tag}yeah.
270
271 An index tag inside another tag: jackdaws love my \e{big \i{sphinx}}
272 of quartz.
273
274 Similarly, we should support things like hyperlinks
275 \e{\W{http://www.tartarus.org/}{at the beginning} of emphasised sections},
276 and \e{in the \W{http://www.tartarus.org/}{middle} of them}, and also
277 \e{at the \W{http://home.att.net/~cecw/lastpage.htm}{end}}.
278
279 \#{FIXME: Unfortunately, we still don't quite do the right thing with
280 references:
281 How about a \e{reference to \k{subhead} here}? And at
282 \e{the end: \k{subhead}} and \e{\k{subhead}: the start}?
283 }
284
285 \S2{sub-sub}{Florble} Smaller heading still
286
287 A tiny section. Awww. How cute. Actually, this one's a \e{florble},
288 and here's a reference to it: \k{sub-sub}.
289
290 \A{app} Needless appendix
291
292 \# \cfg{winhelp-topic}{Y5VQEXZQVJ} (uncomment this and it clashes)
293
294 Here's an \i{appendix}, for no terribly good reason at all. See
295 __\k{book}__ (please excuse those underscores, I'm testing
296 whitespace).
297
298 It also contains a \W{http://www.tartarus.org/}{hyperlink}.
299
300 Also I'm going to index \i\c{-output} to ensure that its two
301 components are displayed as a joined-up code fragment in the index.
302
303 Here are \I{testone}some \I{testtwo}subsections \I{testthree}with
304 silly chapter titles and interesting use of Unicode. The Unicode
305 oddities are in the titles rather than the body text because that
306 way I get to test their handling in the PDF document outline.
307
308 \H{app-one} The 1024 \u00D7{x} 768 screen resolution
309
310 Err.
311
312 \H{app-two} How about Spongletech\u2122{(TM)}?
313
314 Umm.
315
316 \# I'm going to label one of these with a carefully chosen fragment
317 \# name "i1", because I know this will also be generated as an index
318 \# fragment name and this allows me to test the fragment name clash
319 \# detection.
320 \#
321 \# To actually run this test you need to configure html-leaf-level
322 \# to 0 and html-template-fragment to %k.
323
324 \H{i1} Or just Erd\u0151{\u00F6{o}}s?
325
326 Ahh.
327
328 \H{app-\\two} Section with inconvenient keyword
329
330 If you apply this file together with \cw{doc/chm.but}, this section
331 should test \cw{html_sanitise_filename()}.
332
333 \U Bibliography
334
335 \B{book} Some text describing a book.
336
337 \B{nocite} Some text describing a book. This text should appear in
338 the document even though there is no \cw{\\k} citing it.
339
340 \BR{book} [SillyCitation]
341 \BR{uncited} Badger.
342
343 \nocite{nocite}
344
345 \B{uncited} If this text appears, there's an actual error.
346
347 \# This is a comment.
348
349 \# Now for the index section.
350
351 \IM{she seems to have an invisible tag}{appendix} Invisible tags
352 and/or appendices
353
354 \# The display forms of these three index terms differ only in case.
355 \# This is a fiddly special case in the Windows Help backend,
356 \# because Windows Help's index mechanism is case-insensitive...
357
358 \IM{testone} Test
359 \IM{testtwo} TesT
360 \IM{testthree} test