Added a new config directive `html-local-head', which permits me to
[sgt/halibut] / doc / output.but
CommitLineData
16ea3abe 1\C{output} Halibut output formats
2
339cbe09 3This chapter describes each of Halibut's current \i{output formats}.
4It gives some general information about the format, and also
5describes all the \i{configuration directives} which are specific to
6that format.
16ea3abe 7
8\H{output-text} Plain text
9
339cbe09 10This output format generates the document as a single \i{plain text}
9ec43d08 11file. No table of contents or index is generated.
16ea3abe 12
16ea3abe 13The precise formatting of the text file can be controlled by a
14variety of configuration directives. They are listed in the
15following subsections.
16
0a6347b4 17\S{output-text-file} Output file name
18
19\dt \I{\cw{\\cfg\{text-filename\}}}\cw{\\cfg\{text-filename\}\{}\e{filename}\cw{\}}
20
21\dd Sets the \i{output file name} in which to store the text file.
22This directive is implicitly generated if you provide a file name
23parameter after the command-line option \i\c{--text} (see
24\k{running-options}).
25
16ea3abe 26\S{output-text-dimensions} Indentation and line width
27
28This section describes the configuration directives which control
339cbe09 29the \i{horizontal dimensions} of the output text file: how much
16ea3abe 30paragraphs are indented by and how long the lines are.
31
339cbe09 32\dt \I{\cw{\\cfg\{text-width\}}}\cw{\\cfg\{text-width\}\{}\e{width}\cw{\}}
16ea3abe 33
339cbe09 34\dd Sets the \I{text width}width of the main part of the document,
35in characters. This width will be used for wrapping paragraphs and
36for centring titles (if you have asked for titles to be centred -
37see \k{output-text-headings}). This width does \e{not} include the
38left indentation set by \cw{\\cfg\{text-indent\}}; if you specify an
16ea3abe 39indent of 8 and a width of 64, your maximum output line length will
40be 72.
41
339cbe09 42\dt \I{\cw{\\cfg\{text-indent\}}}\cw{\\cfg\{text-indent\}\{}\e{indent}\cw{\}}
16ea3abe 43
339cbe09 44\dd Sets the left \i{indentation} for the document. If you set this
45to zero, your document will look like an ordinary text file as
46someone with a text editor might have written it; if you set it
47above zero, the text file will have a \i{margin} down the left in
48the style of some printed manuals, and you can then configure the
49section numbers to appear in this margin (see
50\k{output-text-headings}).
16ea3abe 51
339cbe09 52\dt \I{\cw{\\cfg\{text-indent-code\}}}\cw{\\cfg\{text-indent-code\}\{}\e{indent}\cw{\}}
16ea3abe 53
54\dd Specifies how many extra characters of indentation (on top of
339cbe09 55the normal left indent) should be given to \I{code paragraphs,
56indentation} code paragraphs.
16ea3abe 57
339cbe09 58\dt \I{\cw{\\cfg\{text-list-indent\}}}\cw{\\cfg\{text-list-indent\}\{}\e{indent}\cw{\}}
16ea3abe 59
60\dd Specifies how many extra spaces should be used to indent the
339cbe09 61bullet or number in a \I{bulletted list, indentation}bulletted or
62\I{numbered list, indentation}numbered \I{list, indentation}list.
63The actual body of the list item will be indented by this much
64\e{plus} the value configured by \cw{\\cfg\{text-listitem-indent\}}.
16ea3abe 65
339cbe09 66\dt \I{\cw{\\cfg\{text-listitem-indent\}}}\cw{\\cfg\{text-listitem-indent\}\{}\e{indent}\cw{\}}
16ea3abe 67
68\dd Specifies how many extra spaces should be used to indent the
69body of a list item, over and above the number configured in
70\cw{\\cfg\{text-list-indent\}}.
71
339cbe09 72\dt \I{\cw{\\cfg\{text-indent-preamble\}}}\cw{\\cfg\{text-indent-preamble\}\{}\e{boolean}\cw{\}}
16ea3abe 73
339cbe09 74\dd When this is set to \c{true}, the document \i{preamble} (i.e. any
16ea3abe 75paragraphs appearing before the first chapter heading) will be
76indented to the level specified by \cw{\\cfg\{text-indent\}}. If
77this setting is \c{false}, the document preamble will not be
78indented at all from the left margin.
79
339cbe09 80\S{output-text-headings} \ii{Configuring heading display}
16ea3abe 81
82The directives in this section allow you to configure the appearance
83of the title, chapter and section headings in your text file.
84
339cbe09 85Several of the directives listed below specify the \i{alignment} of
86a heading. These alignment options have three possible values:
16ea3abe 87
339cbe09 88\dt \i\c{left}
16ea3abe 89
90\dd Align the heading to the very left of the text file (column zero).
91
339cbe09 92\dt \i\c{leftplus}
16ea3abe 93
94\dd Align the section title to the left of the main display region
95(in other words, indented to the level specified by
96\cw{\\cfg\{text-indent\}}). The section \e{number} is placed to the
97left of that (so that it goes in the margin if there is room).
98
339cbe09 99\dt \i\c{centre}
16ea3abe 100
101\dd Centre the heading.
102
103Also, several of the directives below specify how a title should be
339cbe09 104\I{underlining}underlined. The parameter to one of these directives
db662ca1 105should be either blank (\cw{\{\}}) or a piece of text which will be
106repeated to produce the underline. So you might want to specify, for
107example, \cw{\\text-title-underline\{=\}} but
108\cw{\\text-chapter-underline\{\-\}}.
109
110You can also specify more than one underline setting, and Halibut
111will choose the first one that the output character set supports.
112So, for example, you could write
65f95f6c 113\cw{\\text-chapter-underline\{\\u203e\}\{\-\}}, and Halibut would use
db662ca1 114the Unicode \q{OVERLINE} character where possible and fall back to
115the ASCII minus sign otherwise.
16ea3abe 116
339cbe09 117\dt \I{\cw{\\cfg\{text-title-align\}}}\cw{\\cfg\{text-title-align\}\{}\e{alignment}\cw{\}}
16ea3abe 118
119\dd Specifies the alignment of the overall document title: \c{left},
120\c{leftplus} or \c{centre}.
121
bdc961c7 122\dt \I{\cw{\\cfg\{text-title-underline\}}}\cw{\\cfg\{text-title-underline\}\{}\e{underline-text}\cw{\}}
16ea3abe 123
124\dd Specifies how the overall document title should be underlined.
125
339cbe09 126\dt \I{\cw{\\cfg\{text-chapter-align\}}}\cw{\\cfg\{text-chapter-align\}\{}\e{alignment}\cw{\}}
16ea3abe 127
128\dd Specifies the alignment of chapter and appendix headings.
129
bdc961c7 130\dt \I{\cw{\\cfg\{text-chapter-underline\}}}\cw{\\cfg\{text-chapter-underline\}\{}\e{underline-text}\cw{\}}
16ea3abe 131
132\dd Specifies how chapter and appendix headings should be underlined.
133
339cbe09 134\dt \I{\cw{\\cfg\{text-chapter-numeric\}}}\cw{\\cfg\{text-chapter-numeric\}\{}\e{boolean}\cw{\}}
16ea3abe 135
136\dd If this is set to \c{true}, then chapter headings will not
137contain the word \q{Chapter} (or whatever other word you have
138defined in its place - see \k{input-sections} and \k{input-config});
139they will just contain the chapter \e{number}, followed by the
140chapter title. If you set this to \c{false}, chapter headings will
141be prefixed by \q{Chapter} or equivalent.
142
339cbe09 143\dt \I{\cw{\\cfg\{text-chapter-suffix\}}}\cw{\\cfg\{text-chapter-suffix\}\{}\e{text}\cw{\}}
16ea3abe 144
145\dd This specifies the suffix text to be appended to the chapter
146number, before displaying the chapter title. For example, if you set
b7747050 147this to \cq{:\_}, then the chapter title might look something
16ea3abe 148like \q{Chapter 2: Doing Things}.
149
339cbe09 150\dt \I{\cw{\\cfg\{text-section-align\}}}\cw{\\cfg\{text-section-align\}\{}\e{level}\cw{\}\{}\e{alignment}\cw{\}}
16ea3abe 151
152\dd Specifies the alignment of section headings at a particular
153level. The \e{level} parameter specifies which level of section
154headings you want to affect: 0 means first-level headings (\c{\\H}),
1551 means second-level headings (\c{\\S}), 2 means the level below
156that (\c{\\S2}), and so on. The \e{alignment} parameter is treated
157just like the other alignment directives listed above.
158
bdc961c7 159\dt \I{\cw{\\cfg\{text-section-underline\}}}\cw{\\cfg\{text-section-underline\}\{}\e{level}\cw{\}\{}\e{underline-text}\cw{\}}
16ea3abe 160
161\dd Specifies how to underline section headings at a particular level.
162
339cbe09 163\dt \I{\cw{\\cfg\{text-section-numeric\}}}\cw{\\cfg\{text-section-numeric\}\{}\e{level}\cw{\}\{}\e{boolean}\cw{\}}
16ea3abe 164
165\dd Specifies whether section headings at a particular level should
166contain the word \q{Section} or equivalent (if \c{false}), or should
167be numeric only (if \c{true}).
168
339cbe09 169\dt \I{\cw{\\cfg\{text-section-suffix\}}}\cw{\\cfg\{text-section-suffix\}\{}\e{level}\cw{\}\{}\e{text}\cw{\}}
16ea3abe 170
339cbe09 171\dd Specifies the \I{suffix text, in section titles}suffix text to
172be appended to section numbers at a particular level, before
173displaying the section title.
16ea3abe 174
db662ca1 175\S{output-text-characters} Configuring the characters used
176
6b4dfd74 177\dt \I\cw{\\cfg\{text-charset\}}\cw{\\cfg\{text-charset\}\{}\e{character set name}\cw{\}}
178
179\dd This tells Halibut what \i{character set} the output should be
180in. Any Unicode characters representable in this set will be output
181verbatim; any other characters will not be output and their
182\i{fallback text} (if any) will be used instead.
183
184\lcont{
185
186The character set names are the same as for
187\cw{\\cfg\{input-charset\}} (see \k{input-config}). However, unlike
188\cw{\\cfg\{input-charset\}}, this directive affects the \e{entire}
189output; it's not possible to switch encodings halfway through.
190
191}
192
db662ca1 193\dt \I{\cw{\\cfg\{text-bullet\}}}\cw{\\cfg\{text-bullet\}\{}\e{text}\cw{\}}[\cw{\{}\e{text}...\cw{\}}]
194
195\dd This specifies the text which should be used as the \i{bullet}
196in bulletted lists. It can be one character
197(\cw{\\cfg\{text-bullet\}\{-\}}), or more than one
198(\cw{\\cfg\{text-bullet\}\{(*)\}}).
199
200\lcont{
201
6069815a 202Like \cw{\\cfg\{quotes\}} (see \k{input-config}), you can specify multiple
203possible options after this command, and Halibut will choose the first one
204which the output character set supports. For example, you might write
db662ca1 205\cw{\\cfg\{text-bullet\}\{\\u2022\}\{\\u00b7\}\{*\}}, in which case
206Halibut would use the Unicode \q{BULLET} character where possible,
207fall back to the ISO-8859-1 \q{MIDDLE DOT} if that wasn't available,
208and resort to the ASCII asterisk if all else failed.
209
210}
211
212\dt \I{\cw{\\cfg\{text-rule\}}}\cw{\\cfg\{text-rule\}\{}\e{text}\cw{\}}[\cw{\{}\e{text}...\cw{\}}]
213
214\dd This specifies the text which should be used for drawing
215\i{horizontal rules} (generated by \i\c{\\rule}; see
216\k{input-rule}). It can be one character, or more than one. The
217string you specify will be repeated to reach the required width, so
b7747050 218you can specify something like \cq{-=} to get a rule that looks
db662ca1 219like \cw{-=-=-=}.
220
221\lcont{
222
223Like \cw{\\cfg\{text-bullet\}}, you can specify multiple fallback
224options in this command.
225
226}
227
228\dt \I{\cw{\\cfg\{text-quotes\}}}\cw{\\cfg\{text-quotes\}\{}\e{open-quote}\cw{\}\{}\e{close-quote}\cw{\}}[\cw{\{}\e{open-quote}\cw{\}\{}\e{close-quote}...\cw{\}}]
229
6069815a 230\dd This specifies a set of quote characters for the text backend,
231overriding any defined by \cw{\\cfg\{quotes\}}. It has the same syntax
232(see \k{input-config}).
db662ca1 233
234\lcont{
235
6069815a 236In this backend, these quotes will also be used to mark text enclosed
237in the \c{\\c} command (see \k{input-code}).
db662ca1 238
239}
240
241\dt \I{\cw{\\cfg\{text-emphasis\}}}\cw{\\cfg\{text-emphasis\}\{}\e{start-emph}\cw{\}\{}\e{end-emph}\cw{\}}[\cw{\{}\e{start-emph}\cw{\}\{}\e{end-emph}...\cw{\}}]
242
5b1d0032 243\dd This specifies the characters which should be used to surround
db662ca1 244emphasised text (written using the \c{\\e} command; see
245\k{input-emph}).
246
247\lcont{
248
249You should separately specify the start-emphasis and end-emphasis
250text, each of which can be more than one character if you want.
251Also, like \cw{\\cfg\{text-quotes\}}, you can specify multiple pairs
252of fallback options in this command, and Halibut will always use a
253matching pair.
254
255}
256
16ea3abe 257\S{output-text-misc} Miscellaneous configuration options
258
db662ca1 259\dt \I{\cw{\\cfg\{text-list-suffix\}}}\cw{\\cfg\{text-list-suffix\}\{}\e{text}\cw{\}}
260
261\dd This text is appended to the number on a \i{numbered list} item
262(see \k{input-list-number}). So if you want to label your lists as
263\q{1)}, \q{2)} and so on, then you would write
264\cw{\\cfg\{text-list-suffix\}\{)\}}.
265
339cbe09 266\dt \I{\cw{\\cfg\{text-versionid\}}}\cw{\\cfg\{text-versionid\}\{}\e{boolean}\cw{\}}
16ea3abe 267
339cbe09 268\dd If this is set to \c{true}, \i{version ID paragraphs} (defined
269using the \i\c{\\versionid} command - see \k{input-blurb}) will be
270included at the bottom of the text file. If it is set to \c{false},
271they will be omitted completely.
16ea3abe 272
16ea3abe 273\# FIXME: code indentation is configurable, therefore \quote
274\# indentation probably ought to be as well.
275
276\# FIXME: text-indent-* should be consistently named.
277
278\S{output-text-defaults} Default settings
279
339cbe09 280The \i{default settings} for Halibut's plain text output format are:
16ea3abe 281
0a6347b4 282\c \cfg{text-filename}{output.txt}
283\c
16ea3abe 284\c \cfg{text-width}{68}
285\c \cfg{text-indent}{7}
286\c \cfg{text-indent-code}{2}
287\c \cfg{text-list-indent}{1}
288\c \cfg{text-listitem-indent}{3}
289\c \cfg{text-indent-preamble}{false}
290\c
291\c \cfg{text-title-align}{centre}
db662ca1 292\c \cfg{text-title-underline}{\u2550}{=}
16ea3abe 293\c
294\c \cfg{text-chapter-align}{left}
db662ca1 295\c \cfg{text-chapter-underline}{\u203e}{-}
16ea3abe 296\c \cfg{text-chapter-numeric}{false}
297\c \cfg{text-chapter-suffix}{: }
298\c
299\c \cfg{text-section-align}{0}{leftplus}
300\c \cfg{text-section-underline}{0}{}
301\c \cfg{text-section-numeric}{0}{true}
302\c \cfg{text-section-suffix}{0}{ }
303\c
304\c \cfg{text-section-align}{1}{leftplus}
305\c \cfg{text-section-underline}{1}{}
306\c \cfg{text-section-numeric}{1}{true}
307\c \cfg{text-section-suffix}{1}{ }
308\c
309\c ... and so on for all section levels below this ...
310\e iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
db662ca1 311\c
6b4dfd74 312\c \cfg{text-charset}{ASCII}
db662ca1 313\c \cfg{text-bullet}{\u2022}{-}
314\c \cfg{text-rule}{\u2500}{-}
315\c \cfg{text-quotes}{\u2018}{\u2019}{`}{'}
316\c \cfg{text-emphasis}{_}{_}
317\c
318\c \cfg{text-list-suffix}{.}
319\c \cfg{text-versionid}{true}
16ea3abe 320
321\H{output-html} HTML
322
9ec43d08 323\# FIXME: this probably needs major revision due to the new HTML
324backend
325
339cbe09 326This output format generates an \i{HTML} version of the document. By
16ea3abe 327default, this will be in multiple files, starting with
328\c{Contents.html} and splitting the document into files by chapter
329and/or subsection. You can configure precisely how the text is split
330between HTML files using the configuration commands described in
331this section. In particular, you can configure Halibut to output one
0a6347b4 332single HTML file instead of multiple ones.
16ea3abe 333
339cbe09 334Strictly speaking, the output format is \i{XHTML} 1.0 Transitional,
16ea3abe 335which is why all of the configuration directives start with the word
336\c{xhtml} rather than \c{html}.
337
0a6347b4 338\S{output-html-file} Controlling the output file names
339
340\dt \I{\cw{\\cfg\{xhtml-contents-filename\}}}\cw{\\cfg\{xhtml-contents-filename\}\{}\e{filename}\cw{\}}
341
342\dd Sets the \i{output file name} in which to store the top-level
343contents page. Since this is the first page a user ought to see when
344beginning to read the document, a good choice in many cases might be
fc8e7adb 345\c{index.html} (although this is not the default, for historical
0a6347b4 346reasons).
347
348\dt \I{\cw{\\cfg\{xhtml-index-filename\}}}\cw{\\cfg\{xhtml-index-filename\}\{}\e{filename}\cw{\}}
349
350\dd Sets the file name in which to store the document's index.
351
352\dt \I{\cw{\\cfg\{xhtml-template-filename\}}}\cw{\\cfg\{xhtml-template-filename\}\{}\e{template}\cw{\}}
353
354\dd Provides a \i{template} to be used when constructing the file
355names of each chapter or section of the document. This template
356should contain at least one \i\e{formatting command}, in the form of
357a per cent sign followed by a letter. (If you need a literal per
358cent sign, you can write \c{%%}.)
359
360\lcont{
361
362The formatting commands used in this template are:
363
da090173 364\dt \I{%N-upper}\c{%N}
0a6347b4 365
366\dd Expands to the visible title of the section, with white space
b7747050 367removed. So in a chapter declared as \cq{\\C\{fish\} Catching
368Fish}, this formatting command would expand to
369\cq{CatchingFish}.
0a6347b4 370
371\dt \i\c{%n}
372
373\dd Expands to the type and number of the section, without white
b7747050 374space. So in chapter 1 this would expand to \cq{Chapter1}; in
375section A.4.3 it would expand to \cq{SectionA.4.3}, and so on.
0a6347b4 376If the section has no number (an unnumbered chapter created using
377\c{\\U}), this directive falls back to doing the same thing as
378\c{%N}.
379
380\dt \i\c{%b}
381
382\dd Expands to the bare number of the section. So in chapter 1 this
b7747050 383would expand to \cq{1}; in section A.4.3 it would expand to
384\cq{A.4.3}, and so on. If the section has no number (an
0a6347b4 385unnumbered chapter created using \c{\\U}), this directive falls back
386to doing the same thing as \c{%N}.
387
388\dt \i\c{%k}
389
390\dd Expands to the internal keyword specified in the section title.
b7747050 391So in a chapter declared as \cq{\\C\{fish\} Catching Fish}, this
392formatting command would expand to \cq{fish}. If the section has
0a6347b4 393no keyword (an unnumbered chapter created using \c{\\U}), this
394directive falls back to doing the same thing as \c{%N}.
395
396These formatting directives can also be used in the
397\cw{\\cfg\{xhtml-template-fragment\}} configuration directive (see
398\k{output-html-misc}).
399
400}
401
402\dt \I{\cw{\\cfg\{xhtml-single-filename\}}}\cw{\\cfg\{xhtml-single-filename\}\{}\e{filename}\cw{\}}
403
404\dd Sets the file name in which to store the entire document, if
405Halibut is configured (using \c{\\cfg\{xhtml-leaf-level\}\{0\}} to
406produce a single self-contained file. Both this directive \e{and}
407\c{\\cfg\{xhtml-leaf-level\}\{0\}} are implicitly generated if you
408provide a file name parameter after the command-line option
409\i\c{--html} (see \k{running-options}).
410
16ea3abe 411\S{output-html-split} Controlling the splitting into HTML files
412
413By default, the HTML output from Halibut is split into multiple
414files. Each file typically contains a single chapter or section and
415everything below it, unless subsections of that chapter are
416themselves split off into further files.
417
418Most files also contain a contents section, giving hyperlinks to the
419sections in the file and/or the sections below it.
420
421The configuration directives listed below allow you to configure the
422splitting into files, and the details of the contents sections.
423
339cbe09 424\dt \I{\cw{\\cfg\{xhtml-leaf-level\}}}\cw{\\cfg\{xhtml-leaf-level\}\{}\e{depth}\cw{\}}
16ea3abe 425
426\dd This setting indicates the depth of section which should be
339cbe09 427given a \I{leaf file}\q{leaf} file (a file with no sub-files). So if
428you set it to 1, for example, then every chapter will be given its
429own HTML file, plus a top-level \i{contents file}. If you set this
430to 2, then each chapter \e{and} each \c{\\H} section will have a
431file, and the chapter files will mostly just contain links to their
432\i{sub-file}s.
16ea3abe 433
434\lcont{
435
436If you set this option to zero, then the whole document will appear
437in a single file. If you do this, Halibut will call that file
339cbe09 438\i\c{Manual.html} instead of \i\c{Contents.html}.
16ea3abe 439
0a6347b4 440This option is automatically set to zero if you provide a file name
441parameter after the command-line option \i\c{--html} (see
442\k{running-options}), because you have specified a single file name
443and so Halibut assumes you want the whole document to be placed in
444that file.
445
16ea3abe 446}
447
339cbe09 448\dt \I{\cw{\\cfg\{xhtml-contents-depth\}}}\cw{\\cfg\{xhtml-contents-depth-}\e{level}\cw{\}\{}\e{depth}\cw{\}}
16ea3abe 449
339cbe09 450\dd This directive allows you to specify how \I{depth of
451contents}deep the contents section in a particular file should go.
16ea3abe 452
453\lcont{
454
455The \e{level} parameter indicates which level of contents section
456you are dealing with. 0 denotes the main contents section in the
457topmost file \c{Contents.html}; 1 denotes a contents section in a
458chapter file; 2 is a contents section in a file containing a \c{\\H}
459heading, and so on. Currently you can't go below level 5 (which
460corresponds to a \c{\\S3} heading).
461
462The \e{depth} parameter indicates the maximum depth of heading which
463will be shown in this contents section. Again, 1 denotes a chapter,
4642 is a \c{\\H} heading, 3 is a \c{\\S} heading, and so on.
465
466So, for example: \cw{\\cfg\{xhtml-contents-depth-1\}\{3\}} instructs
467Halibut to put contents links in chapter files for all sections down
468to \c{\\S} level, but not to go into any more detail than that.
469
470}
471
472\# FIXME: this is utterly ghastly. For a start, it should include
473\# the level as a separate argument, like the text section config
474\# directives. Secondly, it shouldn't be limited in depth!
475
339cbe09 476\dt \I{\cw{\\cfg\{xhtml-leaf-contains-contents\}}}\cw{\\cfg\{xhtml-leaf-contains-contents\}\{}\e{boolean}\cw{\}}
16ea3abe 477
478\dd If you set this to \c{true}, then each leaf file will contain
479its own contents section which summarises the text within it.
480
339cbe09 481\dt \I{\cw{\\cfg\{xhtml-leaf-smallest-contents\}}}\cw{\\cfg\{xhtml-leaf-smallest-contents\}\{}\e{number}\cw{\}}
16ea3abe 482
483\dd Contents sections in leaf files are not output at all if they
484contain very few entries (on the assumption that it just isn't worth
485bothering). This directive configures the minimum number of entries
486required in a leaf contents section to make Halibut bother
487generating it at all.
488
489\S{output-html-html} Including pieces of your own HTML
490
491The directives in this section allow you to supply pieces of
339cbe09 492\I{HTML}\i{verbatim HTML} code, which will be included in various
493parts of the output files.
16ea3abe 494
339cbe09 495\dt \I{\cw{\\cfg\{xhtml-head-end\}}}\cw{\\cfg\{xhtml-head-end\}\{}\e{HTML text}\cw{\}}
16ea3abe 496
497\dd The text you provide in this directive is placed at the end of
339cbe09 498the \i\cw{<HEAD>} section of each output HTML file. So this is a
499good place to put, for example, a link to a \i{CSS} \i{stylesheet}.
16ea3abe 500
9acfce4f 501\dt \I{\cw{\\cfg\{xhtml-local-head\}}}\cw{\\cfg\{xhtml-local-head\}\{}\e{HTML text}\cw{\}}
502
503\dd This configuration directive is local: you specify it within a
504document section, and it acts on that section only.
505
506\lcont{
507
508The text you provide in this directive is placed at the end of the
509\i\cw{<HEAD>} section of whichever output HTML file contains the
510section in which the directive was placed. You can specify this
511directive multiple times in multiple sections if you like.
512
513This directive is particularly useful for constructing \i{MacOS
514on-line help}, which is mostly normal HTML but which requires a
515special \i\cw{<META NAME="AppleTitle">} tag in the topmost source
516file. You can arrange this by placing this configuration directive
517in the preamble or the introduction section, something like this:
518
519\c \cfg{html-local-head}{<meta name="AppleTitle"
520\c content="MyApp Help">}
521
522}
523
339cbe09 524\dt \I{\cw{\\cfg\{xhtml-body-tag\}}}\cw{\\cfg\{xhtml-body-tag\}\{}\e{HTML text}\cw{\}}
16ea3abe 525
526\dd The text you provide in this directive is used in place of the
339cbe09 527\i\cw{<BODY>} tag in each output file. So if you wanted to define a
528\i{background colour}, for example, you could write
16ea3abe 529\cw{\\cfg\{xhtml-body-tag\}\{<body bg="#123456">\}}.
530
339cbe09 531\dt \I{\cw{\\cfg\{xhtml-body-start\}}}\cw{\\cfg\{xhtml-body-start\}\{}\e{HTML text}\cw{\}}
16ea3abe 532
533\dd The text you provide in this directive is placed at the
339cbe09 534beginning of the \i\cw{<BODY>} section of each output HTML file. So
535if you intend your HTML files to be part of a web site with a
536standard \i{house style}, and the style needs a \i{header} at the
537top of every page, this is where you can add that header.
16ea3abe 538
339cbe09 539\dt \I{\cw{\\cfg\{xhtml-body-end\}}}\cw{\\cfg\{xhtml-body-end\}\{}\e{HTML text}\cw{\}}
16ea3abe 540
339cbe09 541\dd The text you provide in this directive is placed at the end of
542the \i\cw{<BODY>} section of each output HTML file. So if you intend
543your HTML files to be part of a web site with a standard \i{house
544style}, and the style needs a \i{footer} at the bottom of every
545page, this is where you can add that footer.
16ea3abe 546
339cbe09 547\dt \I{\cw{\\cfg\{xhtml-address-start\}}}\cw{\\cfg\{xhtml-address-start\}\{}\e{HTML text}\cw{\}}
16ea3abe 548
549\dd The text you provide in this directive is placed at the
339cbe09 550beginning of the \i\cw{<ADDRESS>} section at the bottom of each
551output HTML file. This might be a good place to put authors'
552\i{contact details}, for example.
16ea3abe 553
339cbe09 554\dt \I{\cw{\\cfg\{xhtml-address-end\}}}\cw{\\cfg\{xhtml-address-end\}\{}\e{HTML text}\cw{\}}
16ea3abe 555
339cbe09 556\dd The text you provide in this directive is placed at the end of
557the \i\cw{<ADDRESS>} section at the bottom of each output HTML file,
558after the version IDs (if present).
16ea3abe 559
339cbe09 560\dt \I{\cw{\\cfg\{xhtml-navigation-attributes\}}}\cw{\\cfg\{xhtml-navigation-attributes\}\{}\e{HTML attributes}\cw{\}}
16ea3abe 561
562\dd The text you provide in this directive is included inside the
339cbe09 563\cw{<P>} tag containing the \i{navigation links} at the top of each
564page (\i{\q{Previous}} / \i{\q{Contents}} / \i{\q{Next}}). So if you
565wanted the navigation links to have a particular CSS style, you
566could write
16ea3abe 567\cw{\\cfg\{xhtml-navigation-attributes\}\{class="foo"\}}, and the
568navigation-links paragraph would then begin with the tag \cw{<p
569class="foo">}.
570
339cbe09 571\S{output-html-headings} \ii{Configuring heading display}
16ea3abe 572
339cbe09 573\dt \I{\cw{\\cfg\{xhtml-chapter-numeric\}}}\cw{\\cfg\{xhtml-chapter-numeric\}\{}\e{boolean}\cw{\}}
16ea3abe 574
575\dd If this is set to \c{true}, then chapter headings will not
576contain the word \q{Chapter} (or whatever other word you have
577defined in its place - see \k{input-sections} and \k{input-config});
578they will just contain the chapter \e{number}, followed by the
579chapter title. If you set this to \c{false}, chapter headings will
580be prefixed by \q{Chapter} or equivalent.
581
339cbe09 582\dt \I{\cw{\\cfg\{xhtml-chapter-suffix\}}}\cw{\\cfg\{xhtml-chapter-suffix\}\{}\e{text}\cw{\}}
16ea3abe 583
584\dd This specifies the suffix text to be appended to the chapter
585number, before displaying the chapter title. For example, if you set
b7747050 586this to \cq{:\_}, then the chapter title might look something
16ea3abe 587like \q{Chapter 2: Doing Things}.
588
78c73085 589\dt \I{\cw{\\cfg\{xhtml-section-numeric\}}}\cw{\\cfg\{xhtml-section-numeric\}\{}\e{level}\cw{\}\{}\e{boolean}\cw{\}}
16ea3abe 590
591\dd Specifies whether section headings at a particular level should
592contain the word \q{Section} or equivalent (if \c{false}), or should
593be numeric only (if \c{true}). The \e{level} parameter specifies
594which level of section headings you want to affect: 0 means
595first-level headings (\c{\\H}), 1 means second-level headings
596(\c{\\S}), 2 means the level below that (\c{\\S2}), and so on.
597
78c73085 598\dt \I{\cw{\\cfg\{xhtml-section-suffix\}}}\cw{\\cfg\{xhtml-section-suffix\}\{}\e{level}\cw{\}\{}\e{text}\cw{\}}
16ea3abe 599
600\dd Specifies the suffix text to be appended to section numbers at a
601particular level, before displaying the section title.
602
603\S{output-html-misc} Miscellaneous options
604
0a6347b4 605\dt \I{\cw{\\cfg\{xhtml-template-fragment\}}}\cw{\\cfg\{xhtml-template-fragment\}\{}\e{template}\cw{\}}
606
607\dd This directive lets you specify a \i{template}, with exactly the
608same syntax used in \cw{\\cfg\{xhtml-template-filename\}} (see
fc8e7adb 609\k{output-html-file}), to be used for the anchor names (\i\cw{<A
610NAME="...">}) used to allow URLs to refer to specific sections
b7747050 611within a particular HTML file. So if you set this to \cq{%k},
fc8e7adb 612for example, then each individual section in your document will be
0a6347b4 613addressable by means of a URL ending in a \c{#} followed by your
614internal section keyword.
615
339cbe09 616\dt \I{\cw{\\cfg\{xhtml-versionid\}}}\cw{\\cfg\{xhtml-versionid\}\{}\e{boolean}\cw{\}}
16ea3abe 617
339cbe09 618\dd If this is set to \c{true}, \i{version ID paragraphs} (defined using
619the \i\c{\\versionid} command - see \k{input-blurb}) will be included
620visibly in the \i\cw{<ADDRESS>} section at the bottom of each HTML
16ea3abe 621file. If it is set to \c{false}, they will be omitted completely.
622
623\# FIXME: surely it would be better to include them in HTML
624\# comments? The only question is whether they should be _visible_.
625
339cbe09 626\dt \I{\cw{\\cfg\{xhtml-suppress-address\}}}\cw{\\cfg\{xhtml-suppress-address\}\{}\e{boolean}\cw{\}}
16ea3abe 627
339cbe09 628\dd If this is set to \c{true}, the \i\cw{<ADDRESS>} section at the
16ea3abe 629bottom of each HTML file will be omitted completely. (This will
339cbe09 630therefore also cause \i{version IDs} not to be included.)
16ea3abe 631
339cbe09 632\dt \I{\cw{\\cfg\{xhtml-author\}}}\cw{\\cfg\{xhtml-author\}\{}\e{text}\cw{\}}
16ea3abe 633
339cbe09 634\dd The text supplied here goes in a \I{\cw{<META>} tags}\cw{<META
635name="author">} tag in the output HTML files, so that browsers which
636support this can automatically identify the \i{author} of the document.
16ea3abe 637
339cbe09 638\dt \I{\cw{\\cfg\{xhtml-description\}}}\cw{\\cfg\{xhtml-description\}\{}\e{text}\cw{\}}
16ea3abe 639
339cbe09 640\dd The text supplied here goes in a \I{\cw{<META>} tags}\cw{<META
641name="description">} tag in the output HTML files, so that browsers
642which support this can easily pick out a brief \I{description, of
643document}description of the document.
16ea3abe 644
645\S{output-html-defaults} Default settings
646
339cbe09 647The \i{default settings} for Halibut's HTML output format are:
16ea3abe 648
0a6347b4 649\c \cfg{xhtml-contents-filename}{Contents.html}
650\c \cfg{xhtml-index-filename}{IndexPage.html}
651\c \cfg{xhtml-template-filename}{%n.html}
652\c \cfg{xhtml-single-filename}{Manual.html}
653\c \cfg{xhtml-template-fragment}{%b}
654\c
16ea3abe 655\c \cfg{xhtml-leaf-level}{2}
656\c \cfg{xhtml-leaf-contains-contents}{false}
657\c \cfg{xhtml-leaf-smallest-contents}{4}
658\c \cfg{xhtml-contents-depth-0}{2}
659\c \cfg{xhtml-contents-depth-1}{3}
660\c \cfg{xhtml-contents-depth-2}{4}
661\c \cfg{xhtml-contents-depth-3}{5}
662\c \cfg{xhtml-contents-depth-4}{6}
663\c \cfg{xhtml-contents-depth-5}{7}
664\c
665\c \cfg{xhtml-head-end}{}
666\c \cfg{xhtml-body-tag}{<body>}
667\c \cfg{xhtml-body-start}{}
668\c \cfg{xhtml-body-end}{}
669\c \cfg{xhtml-address-start}{}
670\c \cfg{xhtml-address-end}{}
671\c \cfg{xhtml-navigation-attributes}{}
672\c
673\c \cfg{xhtml-versionid}{true}
674\c \cfg{xhtml-suppress-address}{false}
675\c \cfg{xhtml-author}{}
676\c \cfg{xhtml-description}{}
677\c
678\c \cfg{xhtml-chapter-numeric}{false}
679\c \cfg{xhtml-chapter-suffix}{: }
680\c
681\c \cfg{xhtml-section-numeric}{0}{true}
682\c \cfg{xhtml-section-suffix}{0}{ }
683\c
684\c \cfg{xhtml-section-numeric}{1}{true}
685\c \cfg{xhtml-section-suffix}{1}{ }
686\c
687\c ... and so on for all section levels below this ...
688\e iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
689
690\H{output-whlp} Windows Help
691
339cbe09 692This output format generates data that can be used by the \i{Windows
0a6347b4 693Help} program \cw{WINHELP.EXE}. There are two actual files
694generated, one ending in \c{.hlp} and the other ending in \c{.cnt}.
695
6b4dfd74 696Currently, the output is harcoded to be in the \q{\i{Win1252}}
697character set.
6069815a 698
0a6347b4 699The Windows Help output format supports the following configuration
700directives:
701
6b4dfd74 702\S{output-whlp-file} Output file name
703
0a6347b4 704\dt \I{\cw{\\cfg\{winhelp-filename\}}}\cw{\\cfg\{winhelp-filename\}\{}\e{filename}\cw{\}}
705
706\dd Sets the \i{output file name} in which to store the man page.
707This directive is implicitly generated if you provide a file name
708parameter after the command-line option \i\c{--winhelp} (see
709\k{running-options}).
710
711\lcont{
712
713Your output file name should end with \c{.hlp}; if it doesn't,
714Halibut will append it. Halibut will also generate a contents file
715(ending in \c{.cnt}) alongside the file name you specify.
716
717}
16ea3abe 718
6b4dfd74 719\S{output-whlp-characters} Configuring the characters used
720
721\dt \I{\cw{\\cfg\{winhelp-bullet\}}}\cw{\\cfg\{winhelp-bullet\}\{}\e{text}\cw{\}}[\cw{\{}\e{text}\cw{\}}...]
722
723\dd Specifies the text to use as the \i{bullet} in bulletted lists.
724You can specify multiple fallback options. Works exactly like the
725\cw{\\cfg\{text-bullet\}} directive (see
726\k{output-text-characters}).
727
728\dt \I{\cw{\\cfg\{winhelp-quotes\}}}\cw{\\cfg\{winhelp-quotes\}\{}\e{open-quote}\cw{\}\{}\e{close-quote}\cw{\}}[\cw{\{}\e{open-quote}\cw{\}\{}\e{close-quote}...\cw{\}}]
729
730\dd Specifies the quotation marks to use, overriding any
731\cw{\\cfg\{quotes\}} directive. You can specify multiple
732fallback options. Works exactly like the \cw{\\cfg\{text-quotes\}}
733directive (see \k{output-text-characters}).
734
735\S{output-whlp-misc} Miscellaneous configuration options
736
6069815a 737\dt \I{\cw{\\cfg\{winhelp-contents-titlepage\}}}\cw{\\cfg\{winhelp-contents-titlepage\}\{}\e{title}\cw{\}}
738
739\dd Sets the text used to describe the help page containing the blurb
740(see \k{input-blurb}) and table of contents.
741
742\dt
743\I{\cw{\\cfg\{winhelp-section-suffix\}}}\cw{\\cfg\{winhelp-section-suffix\}\{}\e{text}\cw{\}}
744
745\dd Specifies the \I{suffix text, in section titles}suffix text to
746be appended to section numbers, before displaying the section title.
747(Applies to all levels.)
748
749\dt \I{\cw{\\cfg\{winhelp-list-suffix\}}}\cw{\\cfg\{winhelp-list-suffix\}\{}\e{text}\cw{\}}
750
751\dd This text is appended to the number on a \i{numbered list} item,
752in exactly the same way as \cw{\\cfg\{text-list-suffix\}} (see
6069815a 753\k{output-text-characters}).
754
339cbe09 755\dt \I{\cw{\\cfg\{winhelp-topic\}}}\cw{\\cfg\{winhelp-topic\}\{}\e{topic-name}\cw{\}}
16ea3abe 756
339cbe09 757\dd This directive defines a Windows \i{Help topic} name in the current
16ea3abe 758section. Topic names can be used by the program invoking
759\cw{WINHELP.EXE} to jump straight to a particular section. So you
339cbe09 760can use this for \i{context-sensitive help}.
16ea3abe 761
762\lcont{
763
764For example, if you used this directive in a particular section:
765
766\c \cfg{winhelp-topic}{savingfiles}
767
768then a Windows application could invoke Windows Help to jump to that
769particular section in the help file like this:
770
771\c WinHelp(hwnd, "mydoc.hlp", HELP_COMMAND,
772\c (DWORD)"JI(`',`savingfiles')");
773
774You can use this configuration directive many times, in many
775different subsections of your document, in order to define a lot of
776different help contexts which you can use in this way.
777
778}
779
6b4dfd74 780\S{output-whlp-defaults} Default settings
781
0a6347b4 782The \i{default settings} for the Windows Help output format are:
783
784\c \cfg{winhelp-filename}{output.hlp}
6b4dfd74 785\c
786\c \cfg{winhelp-bullet}{\u2022}{-}
787\c \cfg{winhelp-quotes}{\u2018}{\u2019}{"}{"}
788\c
6069815a 789\c \cfg{winhelp-contents-titlepage}{Title page}
790\c \cfg{winhelp-section-suffix}{: }
791\c \cfg{winhelp-list-suffix}{.}
0a6347b4 792
793and no \c{\\cfg\{winhelp-topic\}} directives anywhere.
794
16ea3abe 795\H{output-man} Unix \cw{man} pages
796
339cbe09 797This output format generates a Unix \i{\cw{man} page}. That is to say,
798it generates \i\c{nroff} input designed to work with the \c{-mandoc}
16ea3abe 799macro package.
800
801The available configuration options for this format are as follows:
802
6b4dfd74 803\S{output-man-file} Output file name
804
0a6347b4 805\dt \I{\cw{\\cfg\{man-filename\}}}\cw{\\cfg\{man-filename\}\{}\e{filename}\cw{\}}
806
807\dd Sets the \i{output file name} in which to store the man page.
808This directive is implicitly generated if you provide a file name
809parameter after the command-line option \i\c{--man} (see
810\k{running-options}).
811
6b4dfd74 812\S{output-man-identity} Configuring headers and footers
813
339cbe09 814\dt \I{\cw{\\cfg\{man-identity\}}}\cw{\\cfg\{man-identity\}\{}\e{text}\cw{\}\{}\e{text...}\cw{\}}
16ea3abe 815
339cbe09 816\dd This directive is used to generate the initial \i{\c{.TH}
817directive} that appears at the top of a \cw{man} page. It expects to
818be followed by some number of brace pairs containing text, which will
819be used in the \i{headers} and \i{footers} of the formatted output.
16ea3abe 820
821\lcont{
822
823A traditional order for the arguments appears to be:
824
825\n The name of the program.
826
827\n The (numeric) manual section.
828
829\n The date that the \cw{man} page was written.
830
831\n The name of any containing suite of which the program is a part.
832
339cbe09 833\n The name of the \i{author} of the \cw{man} page.
16ea3abe 834
835For example, a typical \cw{man} page might contain
836
fc8e7adb 837\c \cfg{man-identity}{make-foo}{1}{June 2003}{foo-utils}{Fred
838\c Bloggs}
16ea3abe 839
840}
841
6b4dfd74 842\S{output-man-headings} Configuring heading display
843
339cbe09 844\dt \I{\cw{\\cfg\{man-headnumbers\}}}\cw{\\cfg\{man-headnumbers\}\{}\e{boolean}\cw{\}}
16ea3abe 845
339cbe09 846\dd If this is set to \c{true}, then \i{section headings} in the
847\cw{man} page will have their \i{section numbers} displayed as usual. If
16ea3abe 848set to \c{false}, the section numbers will be omitted. (\cw{man}
849pages traditionally have section names such as \q{SYNOPSIS},
850\q{OPTIONS} and \q{BUGS}, and do not typically number them, so
851\c{false} is the setting which conforms most closely to normal
852\cw{man} style.)
853
339cbe09 854\dt \I{\cw{\\cfg\{man-mindepth\}}}\cw{\\cfg\{man-mindepth\}\{}\e{depth}\cw{\}}
16ea3abe 855
856\dd If this is set to a number greater than 0, then section headings
857\e{higher} than the given depth will not be displayed. If it is set
858to zero, all section headings will be displayed as normal.
859
860\lcont{
861
862The point of this is so that you can use the same Halibut input file
863to generate a quick-reference \cw{man} page for a program, \e{and} to
864include that \cw{man} page as an appendix in your program's full manual.
865If you are to include the \cw{man} page as an appendix, then the internal
866headings within the page will probably need to be at \c{\\H} or
867\c{\\S} level; therefore, when you format that input file on its own
868to create the \cw{man} page itself, you will need to have defined a
869\c{\\C} and possibly a \c{\\H} heading beforehand, which you don't
870want to see displayed.
871
872Here's an example. You might have a file \c{appendix.but}, which
873simply says
874
875\c \A{manpages} \cw{man} pages for the Foo tool suite
876\c
877\c \cfg{man-mindepth}{2}
878
879Then you have a file \c{make-foo.but}, and probably others like it
880as well, each of which looks something like this:
881
fc8e7adb 882\c \cfg{man-identity}{make-foo}{1}{June 2003}{foo-utils}{Fred
883\c Bloggs}
16ea3abe 884\c
885\c \H{man-foo} \cw{man} page for \c{make-foo}
886\c
887\c \S{man-foo-name} NAME
888\c
889\c \c{make-foo} - create Foo files for the Foo tool suite
890\c
891\c \S{man-foo-synopsis} SYNOPSIS
892\c
893\c ... and so on ...
894\e iiiiiiiiiiiiiiiii
895
896So when you're generating your main manual, you can include
897\c{appendix.but} followed by \c{make-foo.but} and any other \cw{man}
898pages you have, and your \cw{man} pages will be formatted neatly as
899part of an appendix. Then, in a separate run of Halibut, you can
900just do
901
902\c halibut appendix.but make-foo.but
903
904and this will generate a \cw{man} page \c{output.1}, in which the
905headings \q{\cw{man} pages for the Foo tool suite} and \q{\cw{man}
906page for \c{make-foo}} will not be displayed because of the
907\c{man-mindepth} directive. So the first visible heading in the
908output \cw{man} page will be \q{NAME}, exactly as a user would
909expect.
910
911}
912
6b4dfd74 913\S{output-man-characters} Configuring the characters used
914
6069815a 915\dt \I{\cw{\\cfg\{man-charset\}}}\cw{\\cfg\{man-charset\}\{}\e{character set}\cw{\}}
916
917\dd Specifies what character set the output should be in, similarly to
6b4dfd74 918\cw{\\cfg\{text-charset\}} (see \k{output-text-characters}).
6069815a 919
920\# FIXME: you're probably on your own in making sure that it's
921sensible to output man pages in that charset.
922
923\dt \I{\cw{\\cfg\{man-bullet\}}}\cw{\\cfg\{man-bullet\}\{}\e{text}\cw{\}}[\cw{\{}\e{text}\cw{\}}...]
924
925\dd Specifies the text to use as the \i{bullet} in bulletted lists.
926You can specify multiple fallback options. Works exactly like the
927\cw{\\cfg\{text-bullet\}} directive (see \k{output-text-characters}).
928
929\dt \I{\cw{\\cfg\{man-quotes\}}}\cw{\\cfg\{man-quotes\}\{}\e{open-quote}\cw{\}\{}\e{close-quote}\cw{\}}[\cw{\{}\e{open-quote}\cw{\}\{}\e{close-quote}...\cw{\}}]
930
931\dd Specifies the quotation marks to use, overriding any
932\cw{\\cfg\{quotes\}} directive. You can specify multiple
933fallback options. Works exactly like the \cw{\\cfg\{text-quotes\}}
934directive (see \k{output-text-characters}).
935
6b4dfd74 936\S{output-man-defaults} Default settings
937
339cbe09 938The \i{default settings} for the \cw{man} page output format are:
16ea3abe 939
0a6347b4 940\c \cfg{man-filename}{output.1}
6b4dfd74 941\c
16ea3abe 942\c \cfg{man-identity}{}
6b4dfd74 943\c
16ea3abe 944\c \cfg{man-headnumbers}{false}
945\c \cfg{man-mindepth}{0}
6b4dfd74 946\c
6069815a 947\c \cfg{man-charset}{ASCII}
948\c \cfg{man-bullet}{\u2022}{o}
949\c \cfg{man-quotes}{\u2018}{\u2019}{"}{"}
43f61c25 950
951\H{output-info} GNU \c{info}
952
953This output format generates files which can be used with the \i{GNU
954\c{info}} program.
955
956There are typically multiple output files: a primary file whose name
957usually ends in \c{.info}, and one or more subsidiary files whose
958names have numbers on the end, so that they end in \c{.info-1},
959\c{.info-2} and so on. Alternatively, this output format can be
960configured to output a single large file containing the whole
961document.
962
963The \c{info} output format supports the following configuration
964directives:
965
6b4dfd74 966\S{output-info-file} Controlling the output filenames
967
43f61c25 968\dt \I{\cw{\\cfg\{info-filename\}}}\cw{\\cfg\{info-filename\}\{}\e{filename}\cw{\}}
969
970\dd Sets the output file name in which to store the \c{info} file.
971This directive is implicitly generated if you provide a file name
972parameter after the command-line option \i\c{--info} (see
973\k{running-options}).
974
975\lcont{
976
977The suffixes \c{-1}, \c{-2}, \c{-3} and so on will be appended to
978your output file name to produce any subsidiary files required.
979
980Note that \c{info} files refer to their own names internally, so
981these files cannot be \I{renaming \c{info} files}renamed after
982creation and remain useful.
983
984}
985
6b4dfd74 986\dt \I{\cw{\\cfg\{info-max-file-size\}}}\cw{\\cfg\{info-max-file-size\}\{}\e{bytes}\cw{\}}
987
988\dd Sets the preferred \i{maximum file size} for each subsidiary
989file. As a special case, if you set this to zero, there will be no
990subsidiary files and the whole document will be placed in a single
991self-contained output file. (However, note that this file can still
992not be renamed usefully.)
993
994\lcont{
995
996The preferred maximum file size is only a guideline. Halibut may be
997forced to exceed it if a single section of the document is larger
998than the maximum size (since individual \c{info} nodes may not be
999split between files).
1000
1001}
1002
1003\S{output-info-dimensions} Indentation and line width
1004
5b1d0032 1005\dt \I{\cw{\\cfg\{info-width\}}}\cw{\\cfg\{info-width\}\{}\e{width}\cw{\}}
1006
1007\dd Sets the \I{text width}width of the main part of the document,
1008in characters. Works exactly like the \cw{\\cfg\{text-width\}}
1009directive (see \k{output-text-dimensions}).
1010
1011\dt \I{\cw{\\cfg\{info-indent-code\}}}\cw{\\cfg\{info-indent-code\}\{}\e{indent}\cw{\}}
1012
1013\dd Specifies the extra indentation for \I{code paragraphs,
1014indentation} code paragraphs. Works exactly like the
1015\cw{\\cfg\{text-indent-code\}} directive (see
1016\k{output-text-dimensions}).
1017
1018\dt \I{\cw{\\cfg\{info-index-width\}}}\cw{\\cfg\{info-index-width\}\{}\e{width}\cw{\}}
1019
1020\dd Specifies how much horizontal space to leave in the index node
1021for the text of \i{index terms}, before displaying the sections the
1022terms occur in.
1023
1024\dt \I{\cw{\\cfg\{info-list-indent\}}}\cw{\\cfg\{info-list-indent\}\{}\e{indent}\cw{\}}
1025
1026\dd Specifies the extra indentation before the bullet or number in a
1027\I{bulletted list, indentation}\I{numbered list, indentation}list
1028item. Works exactly like the \cw{\\cfg\{text-list-indent\}}
1029directive (see \k{output-text-dimensions}).
1030
1031\dt \I{\cw{\\cfg\{info-listitem-indent\}}}\cw{\\cfg\{info-listitem-indent\}\{}\e{indent}\cw{\}}
1032
1033\dd Specifies the additional indentation before the body of a list
1034item. Works exactly like the \cw{\\cfg\{text-listitem-indent\}}
1035directive (see \k{output-text-dimensions}).
1036
6b4dfd74 1037\S{output-info-headings} Configuring heading display
6069815a 1038
5b1d0032 1039\dt \I{\cw{\\cfg\{info-section-suffix\}}}\cw{\\cfg\{info-section-suffix\}\{}\e{text}\cw{\}}
1040
1041\dd Specifies the suffix text to be appended to each section number
1042before displaying the section title. For example, if you set this to
b7747050 1043\cq{:\_}, then a typical section title might look something like
5b1d0032 1044\q{Section 3.1: Something Like This}.
1045
1046\dt \I{\cw{\\cfg\{info-underline\}}}\cw{\\cfg\{info-underline\}\{}\e{text}\cw{\}}[\cw{\{}\e{text}\cw{\}}...]
1047
1048\dd Specifies the text to be used to underline section titles. Works
1049very much like the \cw{\\cfg\{text-chapter-underline\}} directive
1050(see \k{output-text-headings}). You can specify more than one
1051option, and Halibut will choose the first one supported by the
1052character set.
1053
6b4dfd74 1054\S{output-info-characters} Controlling the characters used
1055
1056\dt \I{\cw{\\cfg\{info-charset\}}}\cw{\\cfg\{info-charset\}\{}\e{character set}\cw{\}}
1057
1058\dd Specifies what character set the output should be in, similarly to
1059\cw{\\cfg\{text-charset\}} (see \k{output-text-characters}).
1060
1061\# FIXME: if you try sufficiently hard, you can probably find an
1062output encoding that will break the info format by trampling on its
1063special characters. So either don't do that, or tell us what we should
1064do about it.
1065
5b1d0032 1066\dt \I{\cw{\\cfg\{info-bullet\}}}\cw{\\cfg\{info-bullet\}\{}\e{text}\cw{\}}[\cw{\{}\e{text}\cw{\}}...]
1067
1068\dd Specifies the text to use as the \i{bullet} in bulletted lists.
1069You can specify multiple fallback options. Works exactly like the
1070\cw{\\cfg\{text-bullet\}} directive (see
1071\k{output-text-characters}).
1072
1073\dt \I{\cw{\\cfg\{info-rule\}}}\cw{\\cfg\{info-rule\}\{}\e{text}\cw{\}}[\cw{\{}\e{text}\cw{\}}...]
1074
1075\dd Specifies the text used to draw \i{horizontal rules}. You can
1076specify multiple fallback options. Works exactly like the
1077\cw{\\cfg\{text-rule\}} directive (see \k{output-text-characters}).
1078
1079\dt \I{\cw{\\cfg\{info-quotes\}}}\cw{\\cfg\{info-quotes\}\{}\e{open-quote}\cw{\}\{}\e{close-quote}\cw{\}}[\cw{\{}\e{open-quote}\cw{\}\{}\e{close-quote}...\cw{\}}]
1080
6069815a 1081\dd Specifies the quotation marks to use, overriding any
1082\cw{\\cfg\{quotes\}} directive. You can specify multiple
5b1d0032 1083fallback options. Works exactly like the \cw{\\cfg\{text-quotes\}}
1084directive (see \k{output-text-characters}).
1085
1086\dt \I{\cw{\\cfg\{info-emphasis\}}}\cw{\\cfg\{info-emphasis\}\{}\e{start-emph}\cw{\}\{}\e{end-emph}\cw{\}}[\cw{\{}\e{start-emph}\cw{\}\{}\e{end-emph}...\cw{\}}]
1087
1088\dd Specifies how to display emphasised text. You can specify
1089multiple fallback options. Works exactly like the
1090\cw{\\cfg\{text-emphasis\}} directive (see
1091\k{output-text-characters}).
1092
6b4dfd74 1093\S{output-info-misc} Miscellaneous configuration options
1094
5b1d0032 1095\dt \I{\cw{\\cfg\{info-list-suffix\}}}\cw{\\cfg\{info-list-suffix\}\{}\e{text}\cw{\}}
1096
1097\dd Specifies the text to append to the item numbers in a
1098\i{numbered list}. Works exactly like the
1099\cw{\\cfg\{text-list-suffix\}} directive (see
1100\k{output-text-misc}).
1101
43f61c25 1102\dt \I{\cw{\\cfg\{info-dir-entry\}}}\cw{\\cfg\{info-dir-entry\}\{}\e{section}\cw{\}\{}\e{short
1103name}\cw{\}\{}\e{long name}\cw{\}}[\cw{\{}\e{keyword}\cw{\}}]
1104
1105\dd Constructs an \i\cw{INFO-DIR-ENTRY} section and places it in the
1106header of the Info file. This mechanism is used to automatically
1107generate the \i{\c{dir} file} at the root of a Unix system's
1108\c{info} collection.
1109
1110\lcont{
1111
1112The parameters to this directive are:
1113
1114\dt \e{section}
1115
1116\dd Specifies the section of the \c{dir} file in which you want your
1117document referenced. For example, \q{Development}, or \q{Games}, or
1118\q{Miscellaneous}.
1119
1120\dt \e{short name}
1121
1122\dd Specifies a short name for the directory entry, which will
1123appear at the start of the menu line.
1124
1125\dt \e{long name}
1126
1127\dd Specifies a long name for the directory entry, which will appear
1128at the end of the menu line.
1129
1130\dt \e{keyword}
1131
1132\dd This parameter is optional. If it is present, then the directory
1133entry will cause a jump to a particular subsection of your document,
1134rather than starting at the top. The subsection will be the one
1135referred to by the given keyword (see \k{input-sections} for details
1136about assigning keywords to document sections).
1137
1138For example, in a document describing many game programs, the
1139configuration directive
1140
fc8e7adb 1141\c \cfg{info-dir-entry}{Games}{Chess}{Electronic chess
1142\c game}{chess}
43f61c25 1143
1144might produce text in the \c{dir} file looking something like this:
1145
1146\c Games
1147\c * Chess: (mygames)Chapter 3. Electronic chess game
1148
1149if the output file were called \c{mygames.info} and the keyword
1150\c{chess} had been used to define Chapter 3 of the document.
1151
1152}
0287083a 1153
6b4dfd74 1154\S{output-info-defaults} Default settings
1155
5b1d0032 1156The \i{default settings} for the \c{info} output format are:
1157
1158\c \cfg{info-filename}{output.info}
6b4dfd74 1159\c \cfg{info-max-file-size}{65536}
5b1d0032 1160\c
1161\c \cfg{info-width}{70}
1162\c \cfg{info-indent-code}{2}
1163\c \cfg{info-index-width}{40}
1164\c \cfg{info-list-indent}{1}
1165\c \cfg{info-listitem-indent}{3}
9ec43d08 1166\c
5b1d0032 1167\c \cfg{info-section-suffix}{: }
5b1d0032 1168\c \cfg{info-underline}{\u203e}{-}
6b4dfd74 1169\c
1170\c \cfg{info-charset}{ASCII}
5b1d0032 1171\c \cfg{info-bullet}{\u2022}{-}
1172\c \cfg{info-rule}{\u2500}{-}
1173\c \cfg{info-quotes}{\u2018}{\u2019}{`}{'}
1174\c \cfg{info-emphasis}{_}{_}
1175\c
1176\c \cfg{info-list-suffix}{.}
5b1d0032 1177
1178and no \cw{\\cfg\{info-dir-entry\}} directives.
1179
9ec43d08 1180\H{output-paper} Paper formats
1181
1182These output formats (currently PostScript and PDF) generate printable
1183manuals. As such, they share a number of configuration directives.
1184
1185\S{output-ps} \i{PostScript}
0287083a 1186
1187This output format generates a printable manual in PostScript format.
1188
9ec43d08 1189There is one configuration option specific to PostScript:
0287083a 1190
1191\dt \I{\cw{\\cfg\{ps-filename\}}}\cw{\\cfg\{ps-filename\}\{}\e{filename}\cw{\}}
1192
1193\dd Sets the \i{output file name} in which to store the PostScript
1194file. This directive is implicitly generated if you provide a file
1195name parameter after the command-line option \i\c{--ps} (see
1196\k{running-options}).
1197
1198The \i{default settings} for the PostScript output format are:
1199
1200\c \cfg{ps-filename}{output.ps}
1201
9ec43d08 1202\S{output-pdf} \i{PDF}
0287083a 1203
1204This output format generates a printable manual in PDF format. This
1205should look exactly identical to the PostScript output (see
1206\k{output-ps}), but also uses some PDF interactive features to
1207provide an outline of all the document's sections and clickable
1208cross-references between sections.
1209
9ec43d08 1210There is one configuration option specific to PDF:
0287083a 1211
1212\dt \I{\cw{\\cfg\{pdf-filename\}}}\cw{\\cfg\{pdf-filename\}\{}\e{filename}\cw{\}}
1213
1214\dd Sets the \i{output file name} in which to store the PDF file.
1215This directive is implicitly generated if you provide a file name
1216parameter after the command-line option \i\c{--pdf} (see
1217\k{running-options}).
1218
1219The \i{default settings} for the PDF output format are:
1220
1221\c \cfg{pdf-filename}{output.pdf}
9ec43d08 1222
1223\S{output-paper-dimensions} Configuring layout and \i{measurements}
1224
1225All measurements are in PostScript \i{points} (72 points to the inch).
1226
1227\S2{output-paper-pagesize} Page properties
1228
1229\dt \I{\cw{\\cfg\{paper-page-width\}}}\cw{\\cfg\{paper-page-width\}\{}\e{points}\cw{\}}
1230
1231\dt \I{\cw{\\cfg\{paper-page-height\}}}\cw{\\cfg\{paper-page-height\}\{}\e{points}\cw{\}}
1232
1233\dd Specify the absolute limits of the paper.
1234
1235\dt \I{\cw{\\cfg\{paper-left-margin\}}}\cw{\\cfg\{paper-left-margin\}\{}\e{points}\cw{\}}
1236
1237\dt \I{\cw{\\cfg\{paper-top-margin\}}}\cw{\\cfg\{paper-top-margin\}\{}\e{points}\cw{\}}
1238
1239\dt \I{\cw{\\cfg\{paper-right-margin\}}}\cw{\\cfg\{paper-right-margin\}\{}\e{points}\cw{\}}
1240
1241\dt \I{\cw{\\cfg\{paper-bottom-margin\}}}\cw{\\cfg\{paper-bottom-margin\}\{}\e{points}\cw{\}}
1242
1243\dd Specify the margins. Most text appears within these margins,
1244except:
1245
1246\lcont{
1247
1248\b Section numbers, which appear in the left margin.
1249
1250\b The footer (containing page numbers), which appears in the bottom
1251margin.
1252
1253}
1254
1255\S2{output-paper-line} Vertical spacing
1256
1257\dt \I{\cw{\\cfg\{paper-base-leading\}}}\cw{\\cfg\{paper-base-leading\}\{}\e{points}\cw{\}}
1258
1259\dd Specifies the amount of space between lines of text within a
1260paragraph. (So, if the font size is 12pt and there is 2pt of leading,
1261there will be 14pt between successive baselines.)
1262
1263\dt \I{\cw{\\cfg\{paper-base-para-spacing\}}}\cw{\\cfg\{paper-base-para-spacing\}\{}\e{points}\cw{\}}
1264
1265\dd Specifies the amount of vertical space between paragraphs. (The
1266vertical space between paragraphs does \e{not} include
1267\c{paper-base-leading}.)
1268
1269\S2{output-paper-indentation} Indentation
1270
1271\dt \I{\cw{\\cfg\{paper-list-indent\}}}\cw{\\cfg\{paper-list-indent\}\{}\e{points}\cw{\}}
1272
1273\dd Specifies the indentation of the bullet or number in a
1274\I{bulletted list, indentation}bulletted or \I{numbered list,
1275indentation}numbers \I{list, indentation}list, similarly to
1276\cw{\\cfg\{text-list-indent\}} (see \k{output-text-dimensions}).
1277
1278\dt \I{\cw{\\cfg\{paper-listitem-indent\}}}\cw{\\cfg\{paper-listitem-indent\}\{}\e{points}\cw{\}}
1279
1280\dd Specifies the \e{extra} indentation for the body of a list item,
1281over and above the amount configured in \cw{\\cfg\{paper-list-indent\}}.
1282
1283\# FIXME: doesn't actually work, AFAICT.
1284
1285\dt \I{\cw{\\cfg\{paper-quote-indent\}}}\cw{\\cfg\{paper-quote-indent\}\{}\e{points}\cw{\}}
1286
1287\dd Specifies the amount of indentation for a level of quoting. Used
1288for \cw{\\quote} (see \k{input-quote}) and code quotes with \cw{\\c}
1289(see \k{input-code}).
1290
1291\S2{output-paper-headings} Headings
1292
1293\dt \I{\cw{\\cfg\{paper-chapter-top-space\}}}\cw{\\cfg\{paper-chapter-top-space\}\{}\e{points}\cw{\}}
1294
ab7d6241 1295\dd Specifies the space between the top margin and the top of the
1296chapter heading. (Each chapter begins on a new page.)
9ec43d08 1297
1298\dt \I{\cw{\\cfg\{paper-chapter-underline-thickness\}}}\cw{\\cfg\{paper-chapter-underline-thickness\}\{}\e{points}\cw{\}}
1299
1300\dd Specifies the vertical thickness of the black rule under chapter
1301headings.
1302
1303\dt \I{\cw{\\cfg\{paper-chapter-underline-depth\}}}\cw{\\cfg\{paper-chapter-underline-depth\}\{}\e{points}\cw{\}}
1304
1305\dd Specifies the distance between the base of the chapter heading and
1306the \e{base} of the underlying rule.
1307
1308\dt \I{\cw{\\cfg\{paper-sect-num-left-space\}}}\cw{\\cfg\{paper-sect-num-left-space\}\{}\e{points}\cw{\}}
1309
1310\dd Specifies the distance between the left margin and the \e{right}
1311of section numbers (which are in the left margin).
1312
1313\S2{output-paper-index} Contents and index
1314
1315\dt \I{\cw{\\cfg\{paper-contents-index-step\}}}\cw{\\cfg\{paper-contents-index-step\}\{}\e{points}\cw{\}}
1316
1317\dt \I{\cw{\\cfg\{paper-contents-margin\}}}\cw{\\cfg\{paper-contents-margin\}\{}\e{points}\cw{\}}
1318
1319\# FIXME: I do not know what dees one does. (I couldn't get either of
1320them to do anything obvious, although the source indicates they should
1321do something.)
1322
1323\dt \I{\cw{\\cfg\{paper-leader-separation\}}}\cw{\\cfg\{paper-leader-separation\}\{}\e{points}\cw{\}}
1324
1325\dd Specifies the horizontal spacing between dots in \i\e{leaders}
1326(the dotted lines that appear between section headings and page
1327numbers in the table of contents).
1328
1329\dt \I{\cw{\\cfg\{paper-footer-distance\}}}\cw{\\cfg\{paper-footer-distance\}\{}\e{points}\cw{\}}
1330
1331\dd Specifies the distance between the bottom margin and the \e{base}
1332of the footer (which contains page numbers).
1333
1334\dt \I{\cw{\\cfg\{paper-index-columns\}}}\cw{\\cfg\{paper-index-columns\}\{}\e{columns}\cw{\}}
1335
1336\dd Specifies the number of columns the index should be divided into.
1337
1338\# FIXME: with this set to 1, the right-alignment of some index entry
1339page numbers in the Halibut manual is decidedly wonky.
1340
1341\dt \I{\cw{\\cfg\{paper-index-gutter\}}}\cw{\\cfg\{paper-index-gutter\}\{}\e{points}\cw{\}}
1342
1343\dd Specifies the amount of \I{gutter} horizontal space between index
1344columns.
1345
1346\dt \I{\cw{\\cfg\{paper-index-minsep\}}}\cw{\\cfg\{paper-index-minsep\}\{}\e{points}\cw{\}}
1347
1348\dd Specifies the minimum allowable horizontal space between an index
1349entry and its page number. If the gap is smaller, the page number is
1350moved to the next line.
1351
1352\S2{output-paper-fonts} Fonts
1353
1354\dt \I{\cw{\\cfg\{paper-base-font-size\}}}\cw{\\cfg\{paper-base-font-size\}\{}\e{points}\cw{\}}
1355
1356\dd Specifies the font size of body text.
1357
1358\# FIXME: actually, this doesn't appear to do anything at all - most
1359font sizes are still hardcoded.
1360
1361\dt \I{\cw{\\cfg\{paper-pagenum-font-size\}}}\cw{\\cfg\{paper-pagenum-font-size\}\{}\e{points}\cw{\}}
1362
1363\dd Specifies the font size to use for page numbers.
1364
1365\S2{output-paper-misc} Miscellaneous
1366
1367\dt \I{\cw{\\cfg\{paper-rule-thickness\}}}\cw{\\cfg\{paper-rule-thickness\}\{}\e{points}\cw{\}}
1368
1369\dd Specifies the vertical thickness of the rule produced by the
1370\cw{\\rule} command (see \k{input-rule}). (Note that no extra space is
1371reserved for thicker rules.)
1372
1373\S{output-paper-characters} Configuring the characters used
1374
1375\dt \I{\cw{\\cfg\{paper-bullet\}}}\cw{\\cfg\{paper-bullet\}\{}\e{text}\cw{\}}[\cw{\{}\e{text}\cw{\}}...]
1376
1377\dd Specifies the text to use as the \i{bullet} in bulletted lists.
1378You can specify multiple fallback options. Works exactly like the
1379\cw{\\cfg\{text-bullet\}} directive (see
1380\k{output-text-characters}).
1381
1382\dt \I{\cw{\\cfg\{paper-quotes\}}}\cw{\\cfg\{paper-quotes\}\{}\e{open-quote}\cw{\}\{}\e{close-quote}\cw{\}}[\cw{\{}\e{open-quote}\cw{\}\{}\e{close-quote}...\cw{\}}]
1383
1384\dd Specifies the quotation marks to use, overriding any
1385\cw{\\cfg\{quotes\}} directive. You can specify multiple
1386fallback options. Works exactly like the \cw{\\cfg\{text-quotes\}}
1387directive (see \k{output-text-characters}).
1388
1389\S{output-paper-defaults} Default settings for paper formats
1390
1391The default page size corresponds to 210\_\u00D7{x}\_297\_mm, i.e.,
1392\i{A4 paper}.
1393
1394\c \cfg{paper-page-width}{595}
1395\c \cfg{paper-page-height}{841}
1396\c
1397\c \cfg{paper-left-margin}{72}
1398\c \cfg{paper-top-margin}{72}
1399\c \cfg{paper-right-margin}{72}
1400\c \cfg{paper-bottom-margin}{108}
1401\c
1402\c \cfg{paper-base-leading}{1}
1403\c \cfg{paper-base-para-spacing}{10}
1404\c
1405\c \cfg{paper-list-indent}{6}
1406\c \cfg{paper-listitem-indent}{18}
1407\c \cfg{paper-quote-indent}{18}
1408\c
1409\c \cfg{paper-chapter-top-space}{72}
1410\c \cfg{paper-chapter-underline-thickness}{3}
1411\c \cfg{paper-chapter-underline-depth}{14}
1412\c \cfg{paper-sect-num-left-space}{12}
1413\c
1414\c \cfg{paper-contents-index-step}{24}
1415\c \cfg{paper-contents-margin}{84}
1416\c \cfg{paper-leader-separation}{12}
1417\c \cfg{paper-footer-distance}{32}
1418\c \cfg{paper-index-columns}{2}
1419\c \cfg{paper-index-gutter}{36}
1420\c \cfg{paper-index-minsep}{18}
1421\c
1422\c \cfg{paper-base-font-size}{12}
1423\c \cfg{paper-pagenum-font-size}{12}
1424\c
1425\c \cfg{paper-rule-thickness}{1}
1426\c
1427\c \cfg{paper-bullet}{\u2022}{-}
1428\c \cfg{paper-quotes}{\u2018}{\u2019}{'}{'}