| 1 |
\C{running} Running Halibut |
| 2 |
|
| 3 |
\I{running Halibut}In the simplest case, running Halibut is very |
| 4 |
easy. You provide a set of input files on its \i{command line}, and |
| 5 |
it produces a set of output files. |
| 6 |
|
| 7 |
\c $ halibut intro.but gettingstarted.but reference.but index.but |
| 8 |
\e bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
| 9 |
|
| 10 |
This will generate a large set of \i{output files}: |
| 11 |
|
| 12 |
\b \i\c{output.txt} will be a \i{plain text} version of the input |
| 13 |
document. |
| 14 |
|
| 15 |
\b \i\c{output.chm} will be a Windows \i{HTML Help} version of the |
| 16 |
same thing. (Note that to do this Halibut does not require any |
| 17 |
external software such as a \i{Help compiler}. It \e{directly} |
| 18 |
generates Windows HTML Help files, and therefore it doesn't need to be |
| 19 |
run on Windows to do so: it can generate them even when run from an |
| 20 |
automated script on a Unix machine.) |
| 21 |
|
| 22 |
\b \i\c{output.hlp} and \i\c{output.cnt} will be an old-style |
| 23 |
\i{Windows Help} version of the same thing. (Most of the text is in |
| 24 |
\c{output.hlp}; \c{output.cnt} contains additional contents data |
| 25 |
used by the Windows help topic selector. If you lose the latter, the |
| 26 |
former should still be usable, but it will look less modern.) |
| 27 |
|
| 28 |
\b \c{output.1} will be a Unix \i{\cw{man} page}. |
| 29 |
|
| 30 |
\b The set of files \c{*.html} will contain an \i{HTML} version of |
| 31 |
the document. If you have configured Halibut to generate more than |
| 32 |
one HTML file (the default), then the file \c{Contents.html} will be |
| 33 |
the topmost one that users should be directed to initially. If you |
| 34 |
have configured Halibut to generate a single file, it will be called |
| 35 |
\c{Manual.html}. |
| 36 |
|
| 37 |
\b \c{output.info}, and some additional files \c{output.info\-1}, |
| 38 |
\c{output.info\-2} etc., will be files suitable for use with GNU |
| 39 |
\c{info}. |
| 40 |
|
| 41 |
\b \c{output.pdf} will be a printable PDF manual. |
| 42 |
|
| 43 |
\b \c{output.ps} will be a printable PostScript manual. |
| 44 |
|
| 45 |
\H{running-options} \ii{Command-line options} |
| 46 |
|
| 47 |
Halibut supports command-line options in case you don't want to use |
| 48 |
all of Halibut's \i{output formats}, or you want to configure the |
| 49 |
names of your \i{output files}, or you want to supply additional |
| 50 |
configuration on the command line. The supported options are listed |
| 51 |
here. |
| 52 |
|
| 53 |
Firstly, there are options which indicate which of the output |
| 54 |
formats you want Halibut to generate: |
| 55 |
|
| 56 |
\dt \i\cw{--text}[\cw{=}\e{filename}] |
| 57 |
|
| 58 |
\dd Specifies that you want to generate plain text output. You can |
| 59 |
optionally specify a file name (e.g. \c{\-\-text=myfile.txt}), in |
| 60 |
which case Halibut will change the name of the output file as well. |
| 61 |
|
| 62 |
\dt \i\cw{--html}[\cw{=}\e{filename}] |
| 63 |
|
| 64 |
\dd Specifies that you want to generate HTML output. You can |
| 65 |
optionally specify a file name (e.g. \c{\-\-html=myfile.html}), in |
| 66 |
which case Halibut will change the name of the output file as well. |
| 67 |
Specifying a file name here will also cause the HTML to be output in |
| 68 |
\e{only} one file, instead of the usual behaviour of producing |
| 69 |
multiple files with links between them. If you want to produce |
| 70 |
multiple files and configure their names, you will need to use the |
| 71 |
more complete file name configuration directives given in |
| 72 |
\k{output-html-file} (although you may want to do so on the command |
| 73 |
line, using the \c{-C} option). |
| 74 |
|
| 75 |
\dt \i\cw{--xhtml}[\cw{=}\e{filename}] |
| 76 |
|
| 77 |
\dd Synonym for \c{--html}. |
| 78 |
|
| 79 |
\dt \i\cw{--chm}[\cw{=}\e{filename}] |
| 80 |
|
| 81 |
\dd Specifies that you want to generate Windows HTML Help |
| 82 |
output. You can optionally specify a file name (e.g. |
| 83 |
\c{\-\-chm=myfile.chm}), in which case Halibut will change the |
| 84 |
name of the output file as well. |
| 85 |
|
| 86 |
\dt \i\cw{--winhelp}[\cw{=}\e{filename}] |
| 87 |
|
| 88 |
\dd Specifies that you want to generate old-style Windows Help |
| 89 |
output. You can optionally specify a file name (e.g. |
| 90 |
\c{\-\-winhelp=myfile.hlp}), in which case Halibut will change the |
| 91 |
name of the output file as well. |
| 92 |
|
| 93 |
\lcont{ |
| 94 |
|
| 95 |
Your output file name should end with \c{.hlp}; if it doesn't, |
| 96 |
Halibut will append it. Halibut will also generate a contents file |
| 97 |
(ending in \c{.cnt}) alongside the file name you specify. |
| 98 |
|
| 99 |
} |
| 100 |
|
| 101 |
\dt \i\cw{--whlp}[\cw{=}\e{filename}] |
| 102 |
|
| 103 |
\dd Synonym for \c{\-\-winhelp}. |
| 104 |
|
| 105 |
\dt \i\cw{--hlp}[\cw{=}\e{filename}] |
| 106 |
|
| 107 |
\dd Synonym for \c{\-\-winhelp}. |
| 108 |
|
| 109 |
\dt \i\cw{--man}[\cw{=}\e{filename}] |
| 110 |
|
| 111 |
\dd Specifies that you want to generate \cw{man} page output. You |
| 112 |
can optionally specify a file name (e.g. \c{\-\-man=myfile.5}), in |
| 113 |
which case Halibut will change the name of the output file as well. |
| 114 |
|
| 115 |
\dt \i\cw{--info}[\cw{=}\e{filename}] |
| 116 |
|
| 117 |
\dd Specifies that you want to generate GNU \c{info} output. You can |
| 118 |
optionally specify a file name (e.g. \c{\-\-info=myfile.info}), in |
| 119 |
which case Halibut will change the name of the output file as well. |
| 120 |
|
| 121 |
\lcont{ |
| 122 |
|
| 123 |
Unless the \c{info} output format is configured not to (see |
| 124 |
\k{output-info}), Halibut will divide the \c{info} output into many |
| 125 |
small files. The extra files will have numeric suffixes on their |
| 126 |
names; so, for example, \c{output.info} might be accompanied by |
| 127 |
additional files \c{output.info\-1}, \c{output.info\-2} and so on. |
| 128 |
|
| 129 |
} |
| 130 |
|
| 131 |
\dt \i\cw{--pdf}[\cw{=}\e{filename}] |
| 132 |
|
| 133 |
\dd Specifies that you want to generate PDF output. You |
| 134 |
can optionally specify a file name (e.g. \c{\-\-pdf=myfile.pdf}), in |
| 135 |
which case Halibut will change the name of the output file as well. |
| 136 |
|
| 137 |
\dt \i\cw{--ps}[\cw{=}\e{filename}] |
| 138 |
|
| 139 |
\dd Specifies that you want to generate PostScript output. You |
| 140 |
can optionally specify a file name (e.g. \c{\-\-ps=myfile.ps}), in |
| 141 |
which case Halibut will change the name of the output file as well. |
| 142 |
|
| 143 |
If you do not specify any of the above options, Halibut will simply |
| 144 |
produce \e{all} of its output formats. |
| 145 |
|
| 146 |
Also, there is an option which allows you to specify an arbitrary |
| 147 |
\i\c{\\cfg} configuration directive (see \k{input-config}): |
| 148 |
|
| 149 |
\dt \i\cw{-C}\e{config-directive}\cw{:}\e{value}[\cw{:}\e{value}...] |
| 150 |
|
| 151 |
\dd The text following \c{\-C} is expected to be a colon-separated |
| 152 |
list of strings. (If you need a literal colon, you can escape it |
| 153 |
with a backslash: \c{\\:}. If you need a literal \e{backslash}, you |
| 154 |
can do the same: \c{\\\\}.) These strings are used as the parts of a |
| 155 |
\c{\\cfg} directive. So, for example, the option |
| 156 |
|
| 157 |
\lcont{ |
| 158 |
|
| 159 |
\c -Ctext-section-align:2:leftplus |
| 160 |
|
| 161 |
will translate into the configuration directive |
| 162 |
|
| 163 |
\c \cfg{text-section-align}{2}{leftplus} |
| 164 |
|
| 165 |
(Note that your shell may also take an interest in backslashes, |
| 166 |
particularly under Unix. You may find that the backslash with which |
| 167 |
you escape a colon must be doubled in order to make the shell pass |
| 168 |
it to Halibut at all, and to pass a doubled backslash to Halibut you |
| 169 |
might have to type four backslashes on your shell command line. This |
| 170 |
is not part of Halibut's own behaviour, and it cannot do anything |
| 171 |
about it.) |
| 172 |
|
| 173 |
Configuration directives created in this way take effect after all |
| 174 |
other input has been processed. (In most cases, this has the effect of |
| 175 |
overriding any other instances of the directive in the input.) |
| 176 |
|
| 177 |
} |
| 178 |
|
| 179 |
The options which set the output file names actually work by |
| 180 |
implicitly generating these configuration directives. When you |
| 181 |
specify \c{\-\-text=myfile.txt}, for example, Halibut treats it |
| 182 |
identically to \c{\-\-text \-Ctext-filename:myfile.txt}. The Windows |
| 183 |
Help and man page formats work similarly. HTML is slightly |
| 184 |
different, since it also arranges for single-file output if you pass |
| 185 |
a filename to \c{\-\-html}; so \c{\-\-html=myfile.html} is equivalent to |
| 186 |
\c{\-\-html \-Chtml-single-filename:myfile.html \-Chtml-leaf-level:0}. |
| 187 |
(See \k{output} for explanations of all these configuration |
| 188 |
directives.) |
| 189 |
|
| 190 |
In addition to these, there are also a few other options: |
| 191 |
|
| 192 |
\dt \i\cw{--input-charset}\cw{=}\e{charset} |
| 193 |
|
| 194 |
\dd Changes the default assumed \i{character set} for all input files from |
| 195 |
ASCII to something else. (\cw{\-Cinput-charset} cannot be used for |
| 196 |
this, as \cw{\-C} directives are processed after all other input, so |
| 197 |
wouldn't affect any files.) |
| 198 |
|
| 199 |
\lcont{ |
| 200 |
|
| 201 |
Any \cw{\\cfg\{input-charset\}} directives within input files override |
| 202 |
this option. |
| 203 |
|
| 204 |
See \k{input-config} for more information about the input character set. |
| 205 |
|
| 206 |
} |
| 207 |
|
| 208 |
\dt \I{character sets, enumerating}\i\cw{--list-charsets} |
| 209 |
|
| 210 |
\dd List character sets known to Halibut. |
| 211 |
|
| 212 |
\dt \i\cw{--list-fonts} |
| 213 |
|
| 214 |
\dd List fonts known to Halibut, both those it intrinsically knows about |
| 215 |
and those found in its input files. |
| 216 |
|
| 217 |
\dt \i\cw{--help} |
| 218 |
|
| 219 |
\dd Print a brief help message and exit immediately. (Don't confuse |
| 220 |
this with \c{\-\-winhelp}!) |
| 221 |
|
| 222 |
\dt \i\cw{--version} |
| 223 |
|
| 224 |
\dd Print information about Halibut's version number and exit |
| 225 |
immediately. |
| 226 |
|
| 227 |
\dt \i\cw{--licence} |
| 228 |
|
| 229 |
\dd Display Halibut's licence (see also \k{licence}) and exit |
| 230 |
immediately. |
| 231 |
|
| 232 |
\dt \cw{--license} |
| 233 |
|
| 234 |
\dd US English alternative spelling of \c{\-\-licence}. |
| 235 |
|
| 236 |
\dt \i\cw{--precise} |
| 237 |
|
| 238 |
\dd Report column numbers as well as line numbers when reporting |
| 239 |
errors in the Halibut input files. |