## Section40.4Online (HTML) Options

These options affect the base conversion to web pages (online, HTML). Many, but not all, will affect subsequent conversions based on HTML, such as a conversion to EPUB or Jupyter notebooks. See Chapter 27 for a more general overview of this conversion, including options that will eventually migrate here.

### Subsection40.4.1HTML Analytics

The

/publication/html/analytics


element can have the following attributes:

• @google-gst: a Google global site tag, and ID you get from Google. Do not copy the identification numbers from another project—be sure to obtain your own for your project.

• @statcounter-project, @statcounter-security: ID numbers you get from StatCounter. Do not copy the identification numbers from another project—be sure to obtain your own for your project.

Setting these attributes to non-empty strings is the signal to add the relevant code to each of the pages of your HTML output. See Section 27.7 for more.

### Subsection40.4.2HTML Base URL

The

/publication/html/baseurl/@href


attribute may be given as a complete URL for the top-level of where HTML output is hosted. Of course, this may be different for different publishers. The value is a directory, and so should end with a slash (path separator). See Subsection 27.1.3 for reasons why you might want to specify this.

### Subsection40.4.3HTML Embedded Calculator

The

/publication/html/calculator


element has the following attributes:

• @model: used to control which calculator is available on every page. Possible values are:

• geogebra-classic

• geogebra-graphing

• geogebra-geometry

• geogebra-3d

• none

See Subsection 27.1.2 for more.

### Subsection40.4.4HTML Index Page

The

/publication/html/index-page


element can have the following attribute:

• @ref: the @xml:id of a division which will be a complete page at whatever level the document is chunked (broken into smaller pages).

An index.html page will be created which redirects immediately to this page. Many webservers will serve this page when a URL stops with the enclosing directory. So the Table of Contents (<book>, <article>) or the <frontmatter> are common choices. See Subsection 27.1.1 for more.

### Subsection40.4.5HTML Knowlization

In a conversion to HTML a wide variety of content can be “born” in a knowl. Publisher switches are specified via multiple attributes of a single

/publication/html/knowl


element, with values of yes (do use a knowl) or no (do not use a knowl, present content normally). For example,

<knowl remark="yes"/>


would make every “remark-like” element occur as a knowl where the content is first introduced. Note that these are distinctly different than cross-reference knowls. For more detail see Section 27.2.

This table gives the various attribute names, the default value, and an indication of the elements affected. Note that some items are automatically born knowled (e.g. footnotes) and so there is no option to control that behavior. Also, items such as <figure>, when included in a <sidebyside> are not influenced by the relevant option and are not born knowled.

### Subsection40.4.6HTML Platforms

The

/publication/html


element can have an attribute @platform with values:

• web: the default, meant for self-hosting with no server configuration, features, or assumptions

• runestone: output meant for hosting on a Runestone server (Chapter 30)

Here platform refers to the server where the HTML output will eventually be hosted. The effect is to create minor variations in the output to take advantage of extra features of the indicated platform.

### Subsection40.4.7HTML Style

The

/publication/html/css


element can have the following attributes:

• @colors: used to construct filename for CSS controlling colors.

• @knowls: used to construct filename for CSS controlling knowls.

• @toc: used to construct filename for CSS controlling the Table of Contents.

• @banner: used to construct filename for CSS controlling the banner (masthead).

In each case the default file is replaced and instead a new filename is formed from the attributes value. For example, the specification

<css colors='bright_red'/>


will cause a CSS file named colors_bright_red.css to replace colors_default.css. The server in use can be configured separately. See Section 27.6 for more.

2019-12-08: at this time we recommend experimenting with only one file at a time.

### Subsection40.4.8HTML Search

The

/publication/html/search


element can have the following attribute:

• @google-cx: a Google cx number, gained from configuring search for a site.

Setting this attributes to a non-empty string is the signal to add the relevant code for a search box in the masthead. See Section 27.8 for more.

### Subsection40.4.9HTML Video Embedding

The

/publication/html/video


element can have the following attribute:

• @privacy: allowed values are yes or no.

Setting this to yes (the default) prevents certain tracking cookies from being used. Currently only supported for videos from YouTube. See Subsection 27.1.4 for more.