It is a common requirement to place a piece of content outside the normal flow of the text, optionally with a small marker to alert the reader to its presence. This allows the reader to locate it if necessary without interrupting the flow of the main content. TopLeaf uses the term note to describe this type of material.

There are several types of notes, distinguished by where the content of the note is displayed:

  • the content of a column footnote is displayed at the bottom of a text column.

  • the content of a page footnote is displayed at the bottom of a page.

  • the content of a sidenote appears alongside the place where it is referenced.

  • the content of an endnote appears at the end of the document, or at the end of part of the document (for example, at the end of a chapter).

Footnotes and sidenotes are assigned from controls found on the Content tab. There is no direct support for endnotes, but these can be created as described below.


The distinction between column and page footnotes is most apparent in a multi-column layout.

The following example shows the use of column footnotes:

The following is the same content using page footnotes:

It is possible to have both column and page footnotes present on the same page. When both are present, the page footnotes always appear below the column footnotes.

When using page footnotes it may be necessary to adjust the area used to display the footnote content. The <note-properties/> command can be used to specify the appropriate layout page type to use. Page footnotes can be formatted across two columns by setting an option in the selected layout.

Footnote structure

A footnote consists of:

  • A reference marker in the main content.

  • A label in the footnote display area that identifies the footnote.

  • The body of the footnote containing its content.

In the examples above the reference marker and label are both numbers enclosed in parentheses. The style of these is controlled by note mappings.

In addition, there is an optional separator that appears between the first footnote and the main text. Each type of footnote has a mapping that controls the appearance of the separator. In the examples above the separator is a short horizontal rule.

Footnote numbering starts from 1 and continues throughout the document. Use the <note-properties/> command to control the numbering mode or assign non-numeric footnote markers.

By default, footnotes are implicitly bound. The content of a column footnote is positioned below the column from which it is referenced, whereas the content of a page footnote is positioned on the page from which it is referenced. Use the <note-properties/> command to allow footnotes to split across a column or page boundary.


A sidenote is a block of text and/or graphics rendered adjacent to a reference lline within a data block defined in a page layout. Sidenotes are arranged into the area defined by the layout in the order in which they occur. If there are multiple sidenotes associated with a line then the first one will always be at the same vertical position as the content line. If necessary, extra vertical space will be added before the content line to allow this.

By default, the baseline of the content line is aligned with the baseline of the first line of the sidenote. The <note-properties/> command allows the alignment method to be altered.

The following diagram illustrates sidenote alignment.

The style of the sidenote content is controlled by the $sidenote note mapping. In the above the $sidenote mapping draws a rule below each sidenote. The red lines identify the points in the content which are associated with the sidenotes. Note that the second paragraph has been moved down so that the final sidenote can be aligned correctly.

Unlike a footnote, a sidenote does not usually display a reference marker in the main text, since its vertical position associates it with the content. However, it is possible to create a marker by inserting custom content when the sidenote is defined.

By default, sidenotes are implicitly bound. Use the <note-properties/> command to allow the content of a sidenote to split across a column or page boundary.


There are no mapping properties specifically intended for the creation of endnotes. However, they can be created using custom content in mappings. The following is a summary of what is required. If you are not familiar with the use of custom content consult the Mapping Guide.

  • In the $document mapping set a counter variable to zero, and initialize a variable to contain the notes to an empty string.

    <set var="NoteCount" value="0"/>
    <set var="Notes" string=""/>
  • In the mapping for the note, scan and suppress the note content. Increment the note counter. Emit a note reference, and add the note content to the variable.

    <set var="NoteCount" value="{NoteCount}+1"/>
    <set var="Notes">
        <Note label="{NoteCount}"><content/></Note>
  • At the appropriate place for the notes, emit the notes variable. You will need to create a %Note custom marker to format each note as required.