Skip to content
LpdfDocsv0.36-r1119.4

Lpdf is pre-release. The XML schema and SDK APIs can change between releases.

Footnote

A footnote is a note at the bottom of the page. Write it where its number goes: an fn inside a text shows a small raised number in the line, and the words it holds go at the bottom of the page where that number lands, under a short rule. The engine numbers the notes.

<text>The lamp-keepers of the northern coast kept a record of every evening they lit the harbor<fn>The record is kept in the museum at the old customs house, in forty volumes.</fn>, and the record grew longer than the harbor itself.</text>

fn takes no attributes. It holds words and spans, so a note can have a styled part:

<text>When a storm did come, the entries ran past the margin<fn>Some are written crosswise over the ruling, and a few <span font="Helvetica-Oblique">on the back of the page</span>.</fn>.</text>

The notes of a page stand at the bottom of it, in the order of their numbers, under a short rule. The number in the text is plain text in a smaller size, raised, and at the end of a line it stays with the word before it.

A page with notes has less room for its text. When the notes of a page would crowd out a line, the line moves to the next page with its note, and the page it leaves ends a little early. A note is always whole and on the page of its number. A note taller than a page is cut at the page.

An element taller than a page that can’t split, such as a frame, a box with paginate="no" or a grid row, is cut at the bottom of the page (see Pagination rules), and a number cut off there has no note, on that page or any other. A text splits across pages instead, so its numbers keep their notes. A number the cut runs through keeps its note. The notes of the numbers cut off take no room, so the page shows more of the element. With footnote-counter="page" the numbers shown run on 1, 2, … without a gap; with section and document the numbers cut off are skipped, and the next note goes on from the number after them.

footnote-counter says where the numbers start over. It is an attribute of the document, for all its sections, and of a section, which overrides the document.

Value The numbers start over
page on every page
section in every section. This is the default
document never: they run on through the document

A section that counts across the document goes on from the notes of the earlier sections that do. A section that counts its own, or by page, takes none of them.

<lpdf version="1">
<document size="a4" footnote-counter="document">
<section>
<layout margin="48pt">
<text>This section is the first to count across the document<fn>The first note of the document.</fn>.</text>
</layout>
</section>
<section>
<layout margin="48pt">
<text>This one goes on from the section before<fn>The second note of the document: its number is 2.</fn>.</text>
</layout>
</section>
<section footnote-counter="section">
<layout margin="48pt">
<text>And this one counts its own<fn>Numbered 1 again.</fn>.</text>
</layout>
</section>
</document>
</lpdf>

Only a text of the layout can hold an fn. A footnote in a table, in a region or in a text-at is an error that says so: put the footnotes in the texts of the layout, outside tables and regions. A region repeats on every page, so a note in it would have no page of its own.