Skip to main content

Section 28.2 Knowled Content

A knowl is a feature of the online conversion. It is text that you can click on, and nearby some content is revealed. You can click it again to hide that content. You can find a variety of examples in the Sample Article, or other PreTeXt projects.

Knowls come in two different types:

  • A born-hidden knowl or born-as knowl is content that is contained in a knowl at the location where it first appears. Typical examples are footnotes, hints to exercises, or proofs of theorems. In other words, these small units of content are “hidden” behind knowls in the location where they naturally belong. Some content (e.g. footnotes and exercise solutions) are always knowled, while other content (e.g. an inline exercise) can be knowled, or not, as a choice made by the publisher via the Publisher's File (Section 27.1). For exact details on influencing knowlization see the reference material in Subsection 41.4.5.

  • By contrast, a cross-reference knowl or an xref knowl is content that is a duplicate of some other content, in another location, as a result of an author making an <xref> cross-reference in their source. So a cross-reference in Chapter 8 to Example 4.6 will open the content of the example in the knowl, rather than transporting the reader backwards four chapters. If the reader does want to see the example in its original context in Chapter 4, then the knowl finishes with an in-context link that functions as a traditional hyperlink. Almost every cross-reference is a knowl, except when the target is a division—then a traditional hyperlink is used, since rendering an entire division as a knowl is unwieldy.

The presence of the in-context link is one way to tell the difference between the two. Locators in the index (Section 28.5) are mostly cross-reference knowls. Knowls are used a few other places, such as in a list of notation.

An author does not need to be conscious of knowls. The structure and content of the document should not “be aware” that there will be knowls in the online output. But instead the publisher has control over whether or not certain medium-sized pieces of content (examples, exercises, figures, etc.) are born as knowls or not.

Note that some of these switches are for broad categories of items, for example, choosing to knowl theorems will also knowl <lemma>s, <corollary>s, <fact>s, and more. See Subsection 41.4.5 for precise details. This choice applies document-wide, there is no plan to support electing this on a case-by-case basis.