21.2 HTML Splitting

When splitting output at nodes (which is the default), texi2any writes HTML output into (basically) one output file per Texinfo source @node.

Each output file name is the node name with spaces replaced by ‘-’’s and special characters changed to ‘_’ followed by their code point in hex (see HTML Cross-references). This is to make it portable and easy to use as a file name. In the unusual case of two different nodes having the same name after this treatment, they are written consecutively to the same file, with HTML anchors so each can be referred to independently.

If texi2any is run on a system which does not distinguish case in file names, nodes which are the same except for case (e.g., ‘index’ and ‘Index’) will also be folded into the same output file with anchors. You can also pretend to be on a case insensitive filesystem by setting the customization variable CASE_INSENSITIVE_FILENAMES.

It is also possible to split at chapters or sections with --split (see Invoking texi2any from a Shell). In that case, the file names are constructed after the name of the node associated with the relevant sectioning command. Also, unless --no-node-files is specified, a redirection file is output for every node in order to more reliably support cross-references to that manual (see HTML Cross-references).

When splitting, the HTML output files are written into a subdirectory. The subdirectory name is derived from the base name (that is, any extension is removed), with _html postpended. For example, HTML output for gcc.texi would be written into a subdirectory named ‘gcc_html/’. The subdirectory name is based on @setfilename or on the input file name (see Setting the Output File Name).

In any case, the top-level output file within the directory is always named ‘index.html’.

Monolithic output (--no-split) is named according to @setfilename, if present (with any ‘.info’ extension replaced with ‘.html’), --output (the argument is used literally), or based on the input file name as a last resort (see Setting the Output File Name).