I wrote the info backend _days_ ago. About time the manpage stopped
[sgt/halibut] / doc / running.but
CommitLineData
11f2edfa 1\C{running} Running Halibut
2
0a6347b4 3\I{running Halibut}In the simplest case, running Halibut is very
4simple. You provide a set of input files on its \i{command line},
5and it produces a set of output files.
11f2edfa 6
7\c $ halibut intro.but getting-started.but reference.but index.but
8\e bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
9
339cbe09 10This will generate a large set of \i{output files}:
11f2edfa 11
339cbe09 12\b \i\c{output.txt} will be a \i{plain text} version of the input
11f2edfa 13document.
14
339cbe09 15\b \i\c{output.hlp} and \i\c{output.cnt} will be a \i{Windows Help}
16version of the same thing. (Most of the text is in \c{output.hlp};
11f2edfa 17\c{output.cnt} contains additional contents data used by the Windows
18help topic selector. If you lose the latter, the former should still
19be usable, but it will look less modern.)
20
21\lcont{
22Note that Halibut does not require any external software such as a
339cbe09 23\i{Help compiler}. It \e{directly} generates Windows Help files, and
11f2edfa 24therefore it doesn't need to be run on Windows to do so: it can
25generate them even when run from an automated script on a Unix
26machine.
27}
28
339cbe09 29\b \c{output.1} will be a Unix \i{\cw{man} page}.
11f2edfa 30
339cbe09 31\b The set of files \c{*.html} will contain an \i{HTML} version of
32the document. If you have configured Halibut to generate more than
33one HTML file (the default), then the file \c{Contents.html} will be
34the topmost one that users should be directed to initially. If you
35have configured Halibut to generate a single file, it will be called
11f2edfa 36\c{Manual.html}.
37
43f61c25 38\b \c{output.info}, and some additional files \c{output.info-1},
39\c{output.info-2} etc., will be files suitable for use with GNU
40\c{info}.
41
0a6347b4 42\H{running-options} \ii{Command-line options}
43
44Halibut supports command-line options in case you don't want to use
45all of Halibut's \i{output formats}, or you want to configure the
46names of your \i{output files}, or you want to supply additional
47configuration on the command line. The supported options are listed
48here.
49
50Firstly, there are options which indicate which of the output
51formats you want Halibut to generate:
52
53\dt \i\cw{--text}[\cw{=}\e{filename}]
54
55\dd Specifies that you want to generate plain text output. You can
56optionally specify a file name (e.g. \c{--text=myfile.txt}), in
57which case Halibut will change the name of the output file as well.
58
59\dt \i\cw{--html}[\cw{=}\e{filename}]
60
61\dd Specifies that you want to generate HTML output. You can
62optionally specify a file name (e.g. \c{--html=myfile.html}), in
63which case Halibut will change the name of the output file as well.
64Specifying a file name here will also cause the HTML to be output in
65\e{only} one file, instead of the usual behaviour of producing
66multiple files with links between them. If you want to produce
67multiple files and configure their names, you will need to use the
68more complete file name configuration directives given in
69\k{output-html-file} (although you may want to do so on the command
70line, using the \c{-C} option).
71
72\dt \i\cw{--xhtml}[\cw{=}\e{filename}]
73
74\dd Synonym for \c{--html}.
75
76\dt \i\cw{--winhelp}[\cw{=}\e{filename}]
77
43f61c25 78\dd Specifies that you want to generate Windows Help output. You can
0a6347b4 79optionally specify a file name (e.g. \c{--winhelp=myfile.hlp}), in
80which case Halibut will change the name of the output file as well.
81
82\lcont{
83
84Your output file name should end with \c{.hlp}; if it doesn't,
85Halibut will append it. Halibut will also generate a contents file
86(ending in \c{.cnt}) alongside the file name you specify.
87
88}
89
90\dt \i\cw{--whlp}[\cw{=}\e{filename}]
91
92\dd Synonym for \c{--winhelp}.
93
94\dt \i\cw{--hlp}[\cw{=}\e{filename}]
95
96\dd Synonym for \c{--winhelp}.
97
98\dt \i\cw{--man}[\cw{=}\e{filename}]
99
43f61c25 100\dd Specifies that you want to generate \cw{man} page output. You
101can optionally specify a file name (e.g. \c{--man=myfile.5}), in
102which case Halibut will change the name of the output file as well.
103
104\dt \i\cw{--info}[\cw{=}\e{filename}]
105
106\dd Specifies that you want to generate GNU \c{info} output. You can
107optionally specify a file name (e.g. \c{--info=myfile.info}), in
108which case Halibut will change the name of the output file as well.
109
110\lcont{
111
112Unless the \c{info} output format is configured not to (see
113\k{output-info}), Halibut will divide the \c{info} output into many
114small files. The extra files will have numeric suffixes on their
115names; so, for example, \c{output.info} might be accompanied by
116additional files \c{output.info-1}, \c{output.info-2} and so on.
117
118}
0a6347b4 119
67617323 120If you do not specify any of the above options, Halibut will simply
121produce \e{all} of its output formats.
122
0a6347b4 123Also, there is an option which allows you to specify an arbitrary
124\i\c{\\cfg} configuration directive (see \k{input-config}):
125
126\dt \i\cw{-C}\e{config-directive}\cw{:}\e{value}[\cw{:}\e{value}...]
127
128\dd The text following \c{-C} is expected to be a colon-separated
129list of strings. (If you need a literal colon, you can escape it
130with a backslash: \c{\\:}. If you need a literal \e{backslash}, you
131can do the same: \c{\\\\}.) These strings are used as the parts of a
132\c{\\cfg} directive. So, for example, the option
133
134\lcont{
135
136\c -Ctext-section-align:2:leftplus
137
138will translate into the configuration directive
139
140\c \cfg{text-section-align}{2}{leftplus}
141
142}
143
144The options which set the output file names actually work by
145implicitly generating these configuration directives. When you
146specify \c{--text=myfile.txt}, for example, Halibut treats it
147identically to \c{--text -Ctext-filename:myfile.txt}. The Windows
148Help and man page formats work similarly. HTML is slightly
149different, since it also arranges for single-file output if you pass
150a filename to \c{--html}; so \c{--html=myfile.html} is equivalent to
151\c{--html -Cxhtml-single-filename:myfile.html -Cxhtml-leaf-level:0}.
152(See \k{output} for explanations of all these configuration
153directives.)
154
155In addition to these, there are also a few other options:
156
157\dt \i\cw{--help}
158
159\dd Print a brief help message and exit immediately. (Don't confuse
160this with \c{--winhelp}!)
161
162\dt \i\cw{--version}
163
164\dd Print information about Halibut's version number and exit
165immediately.
166
167\dt \i\cw{--licence}
168
169\dd Display Halibut's licence (see also \k{licence}) and exit
170immediately.
171
172\dt \cw{--license}
173
174\dd US English alternative spelling of \c{--licence}.
175
176\dt \i\cw{--precise}
177
178\dd Report column numbers as well as line numbers when reporting
179errors in the Halibut input files.