4.2 Setting output file and directory names
The manual name is constructed by stripping the ‘.texi’,
‘.txi’, ‘.texinfo’, or ‘.txinfo’ extension from the Texinfo file
name.
By default, texi2html generates the manual file in the current
directory if the manual isn't split. A ‘.html’ file extension is appended
to the manual name.
If the manual is split the files are put in a directory named after the
manual name. The file name is constructed using the manual name as basename.
An underscore followed by a number is appended
to the basename for each files corresponding with sectioning elements, with the
exception of the top element. For the top element there is nothing appended.
The files containing special elements pages
have an underscore and a 3 letter code corresponding to their content
(‘toc’ for table of contents, ‘abt’ for about, ‘ovr’ for
overview, ‘fot’ for footnotes if they are separated) appended.
Lastly, an ‘.html’ file extension is appended.
Thus, if the texinfo file ‘afile.texi’ is processed and split at chapters
into 3 files, the generated files (in directory ‘afile’) will be:
| | afile.html --> @node Top or @top section
afile_1.html --> Chapter 1
afile_2.html --> Chapter 2
afile_toc.html --> Table of Contents
afile_abt.html --> About Page
|
This default behavior may be modified by several command line options. If the
output isn't split, the prefix file name may be overrided by the
‘--output’ command line option (variable
$OUT). If the output
is split, and
‘--output’ is set, the files are placed in the directory
specified by the argument to the option.
The basename may be overridden with
‘--prefix’ (variable
$PREFIX). If
‘--short-ext’ is given, ‘.htm’ is appended
instead of ‘.html’ in the final step (variable
$SHORTEXTN).
The
‘--top-file’ option
overrides the top element file name (variable
$TOP_FILE). This can
be used to name the top element file ‘index.html’. Similarly,
‘--toc-file’ changes the name of the table of contents file (variable
$TOC_FILE).
Reusing the example above, but this time calling texi2html like so:
| | $ texi2html -split chapter -prefix manual -short-ext -top-file index.htm -toc-file contents.htm afile.texi
|
we get, in ‘manual’:
| | index.htm --> @node Top or @top section
manual_1.htm --> Chapter 1
manual_2.htm --> Chapter 2
contents.htm --> Table of Contents
manual_abt.htm --> About Page
|
The file names generated by texi2html differ from those generated
by makeinfo. makeinfo uses the node name to construct
the file names while splitting at nodes. It is possible to get the same
behaviour out of texi2html by specifying the
‘--node-files’ option (variable
$NODE_FILES). If the output
isn't split at nodes, texi2html will still output files named after
the nodes, without real content but redirecting to the right file.
The default is false for this option.
This trick enables the generated HTML manual to be a
target for the cross-references of other manuals generated by
makeinfo or texi2html.
Doku-Base
This document was created by Netzdino using texi2html.
|