Section 28.1 HTML Publisher Options
The conversion to HTML always creates a file named
index.html. We do this because if a reader requests the URL
then most modern web servers will automatically return the page
So you can advertise the shorter version to potential readers. What is in
index.html? Simple code to redirect to another one of your pages. Which one? Any one you like!
<publication> element of your publisher file (Section 27.1) include an
<html> element, with a child element
<index-page> having an attribute
@ref. The value must be the
@xml:id of a division which is rendered as an entire web page at the requested level of chunking. See Subsection 41.4.4 for details on specifying this option.
For example, if a
<book> is being chunked into
<chapter>, and your source has
then you can set
ref="birds" and the page for that chapter will be the default page for the shorter URL. In practice, you probably really want a page that looks like the front matter or a Table of Contents.
The default is to first have
index.html redirect to a page for the
<frontmatter>, and if this is not possible, then it will redirect to a page for the top-level of your content. If your document is short or simple, you may just have a single web page. You could choose to not distribute the
index.html file and then just use a concise and descriptive
@xml:id for your top-level element (e.g.
<article>) to fashion an attractive URL that points to your shorter work.
Subsection 28.1.2 Embedded Calculator
You may elect to have an embedded online calculator in each page of your online version. It will appear in the right margin, and will stay there as a reader scrolls the page up and down. A button near the masthead can be used to contol visibility. By default no calculator is available, so you need to explicitly request this feature. As of 2020-05-30 there are four calculators available from the GeoGebra Project 1 . See Subsection 41.4.3 for details on specifying this option.
Subsection 28.1.3 Base URL
The base URL of a hosted version of HTML output may be specified as an entry in a publisher file. Then certain aspects of other output (typically PDF/LaTeX) will link to corresponding aspects of the HTML output. See Subsection 41.4.2 for the specifics of this entry. Examples of use include links from Asymptote graphics (Section 29.5).
Subsection 28.1.4 Privacy Options for Video Embedding
When videos are embedded in HTML from sites like YouTube or Vimeo, they come with whatever tracking cookies these sites want to include. Some of these can be helpful; for example, to let the viewer keep track of what they have watched. Others are designed to target advertising, and load when the page loads, rather than when the video plays, which can increase the time it takes for your book to load.
Currently YouTube offers an “enhanced privacy mode” that disables tracking cookies on page load. The assumption is that publishers will want to protect their readers' privacy and optimage page load time, so this mode is turned on by default for YouTube videos. It is not known to be available for other platforms, but can be added if this changes. Note that the behavior and appearance of your videos may change slightly depending on which option you choose.
<publication> element of your publisher file include an
<html> element, with a child element
<video> having an attribute
@privacy. The value must be either
yes (use enhanced privacy, if available), or
no (allow all tracking cookies). If your publisher file does not have this element (or you do not have a publisher file) you will get a warning message, and the default will be used. See Subsection 41.4.9 for details on specifying this option.