Skip to main content

Section 28.9 Single Page HTML

Sometimes you would like a shorter work to be a single file in HTML format. Perhaps it is something self-contained, like a course syllabus, or you desire to attach it easily to an email or other post. This section contains advice and procedures you can use to achieve this.

  • Design your source as an <article>, with or without <section>.

  • Set the chunking option to zero (see Subsection 41.1.1). This will prevent making a separate page for each <section> (or worse).

  • If you set the level for the Table of Contents to zero, there will be no sidebar Table of Contents at all. This does not affect the number of files, but will make the page simpler. Your call. See Subsection 41.1.2.

  • You might want to number some objects consecutively for the whole page, even if you choose to have <section>. And if you do this, you might want to not even number the <section>. None of this affect the number of files, but may make a single page look simpler. See Section 41.2 to see how to accomplish these options.

  • Items that are “born hidden” as knowls, either automatically (<answer>, <fn>, …) or electively (<example>, <warning>, …) are contained in the page, so also do not affect the number of files.

  • Cross-references (<xref>) rely on external files for the content they reveal. Default behavior is to not create knowls when the target is a larger piece of content, such as divisions (<section>, <subsection>), and instead build a traditional hyperlink. Cross-references to smaller items, bibliography entries, and when employed in the index, will create knowls and the necessary external files. (2020-08-09: we could implement a publisher switch to make all cross-references realized as hyperlinks. Make a request on one of the groups.) So until we have a blanket-hyperlink option, do not cross-reference smaller units of content.

  • You will likely get a subdirectory called knowls. As of 2020-08-09 it has many files that are not necessary and we are working to reduce the number to just the essentials. If you are sure you have no cross-references to smaller units of content, then you can delete this directory.

  • An HTML build always makes a index.html file which will cause a webserver to redirect to a page of the publisher's choosing. You can safely delete it.