Skip to main content

The PreTeXt Guide

Subsection 44.4.11 HTML Search

The
/publication/html/search
element can have the following attributes:
  • @variant: a string specifying how search queries are handled. Possible values are textbook, reference, default and none. For historical reasons, using the value default is synonymous with using textbook, so it is not necessary. If you do not specify this entry, then that is equivalent to setting the value to textbook. This is search provided natively.
  • @google-cx: a Google cx number, gained from configuring search for a site. Setting this attribute to a non-empty string is the signal to add the relevant code for a search box in the masthead.
Note that if you elect both native search and Google search the two search boxes will overlay each other and one will not be usable. See Section 29.8 and Section 29.9 (respectively) for more.