Section 29.8 Native Search
Client-side search is supported natively by a Javascript library. Search results are tuned to leverage the structure of your PreTeXt project. As such, development and support will favor this approach over our legacy support for an online service (Section 29.9).
There are two tunings of search.
- Textbook
- This is the default. Results are presented in order of appearance, on the assumption that a reader is following the text in a linear order and knows their current location. Visual clues will reflect the relevance of each result.
- Reference
- This assumes a document is more like a reference work and is accessed “randomly.” Results are not in order of appearnce, but rather early results will likely be more relevant.
Employing a switch in the publication file will provide search boxes (top banner, lower-right corner) and all the supporting infrastructure. See Subsection 44.4.11 for details.