Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "lib/overview"

Generation involves two different steps:

  1. The package entry for Overview.xhtml may contain a properties attribute; see manifest item properties for further details.
  2. Due to the rigidity of the iBook reader, the DOM tree has to change: all children of the <body> should be encapsulated into a top level block element (we use <div role="main">). This is because iBook imposes a zero padding on the body element, and that cannot be controlled by the user; the introduction of the top level block element allows for suitable CSS adjustments in the common css file.

Index

Functions

generate_overview_item

  • Generate the resource entry for the Overview.xhtml item into the package; that includes setting the various manifest item properties (see manifest item properties).

    The following properties are set, if applicable:

    • mathml: there is an explicit usage of mathml.
    • scripted: there are active scripts.
    • svg: there is explicit svg usage.
    • remote-resources: there are remote resources, typically video, audio, or images.

    The function also modifies the DOM tree by introducing a <main> element right as a child of body, and adding the fixed toc-inline class to ensure that the body occupies the whole width of the viewport.

    Parameters

    Returns ResourceRef[]

    • a single element array with the resource definition of the Overview.xhtml entry