A loaded document or multi-chapter book, returned by file:book() and dir:book(). Mount it to render the current chapter; address elements by their document id.
Render the current chapter into a scrollable page view and return its root element. Unmount via root:remove(); a book mounts once at a time. Inside a card button it raises, building nothing, when the page has chapter navigation, a link, an interactive widget or a press handler, which take focus or the pointer from the card.
Prev/next navigation row. Its step buttons are named by the datumhue-book-previous-chapter and datumhue-book-next-chapter messages.
ligatures
boolean
true
Whether the font may join signs such as >= or -> into one shape in the book's text: prose, listings, the text of elements, the chapter list and navigation. False draws each of their characters as typed, whatever an element on the page sets. A chart's labels keep the font's joined signs.
Navigate: an integer selects a chapter (1-based) and re-renders the mount; a string scrolls the mounted page to the element with that id. Raises on an unknown chapter or id, and, keeping the current page, on a chapter with a link, an interactive widget or a press handler while the book is mounted inside a card button.
Example
book:mount()
-- A string scrolls to an element; a number shows a chapter.
book:go("reset")
book:go(1)
Re-render against the app's current state: templates and control nodes re-evaluate. With an id, only that element's subtree re-renders in place; without one, the whole mounted page does. Raises when the id names anything but a declared element, or the book is not mounted.
The handle behind the mounted element with this document id — a chart id yields its PlotArea, a line id its Mark, anything else its UiElement. Raises when the id is unknown or the book is not mounted.