Data telltales

Data telltales allow you to render location specific information from a document within the context of a page header or footer block. In the following example, the current section number is assigned to a data telltale at the beginning of each document section. When the content is rendered, the value of that data telltale in force at the start of the page is retrieved, then included within a page header:

TopLeaf supports up to nine distinct data telltales at a time. Unlike running heads, each data telltale is an independent unit, and cancelling or redefining one telltale has no effect on the others. Data telltales are typically assigned over and over again, often many times on a single page. You can choose which telltale assignment (for example, first on page or last on page) will appear in a header or footer. Data telltales are cancelled from an End Tag mapping.

The value of a data telltale can be accessed via the command <telltale number="N" mode="M" />, where N is the telltale number (1 to 9) and M is one of the following:

  • predata — the telltale as it was at the beginning of the page, and before any material is set.

  • begin — as for predata, except that it reflects any telltale assignment made in the first paragraph, typically from a heading.

  • first — the value of the first telltale set on the page. If the telltale isn't set on the current page, then as for predata.

  • last — the value of the last active telltale on the page. Is unaffected if the telltale is subsequently cleared.

  • end — as for last, except it will be empty if the telltale was cleared before page end.

For example, let us suppose we are setting a dictionary where the word being defined is assigned to data telltale 3. If the last page begins with a continuation of the word ”zoology”, the first word on the page is “zoom” and the last word on the page is “zymurgy” (after which the telltale is cleared), then:

  • <telltale number="3" mode="begin" /> gives “zoology”

  • <telltale number="3" mode="first" /> gives “zoom”

  • <telltale number="3" mode="last" /> gives “zymurgy”

  • <telltale number="3" mode="end" /> is empty

You can also assign the value of a telltale to a variable using the <set/> command. This allows the telltale content to be tested or manipulated.

It is only valid to retrieve the value of a data telltale from within a Header or Footer block. See Headers & Footers for details of setting up Headers and Footers.