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