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>L.text(NoAttr, [ 'The lamp-keepers of the northern coast kept a record of every evening they lit the harbor', L.fn(NoAttr, ['The record is kept in the museum at the old customs house, in forty volumes.']), ', and the record grew longer than the harbor itself.',])L.text(NoAttr, [ 'The lamp-keepers of the northern coast kept a record of every evening they lit the harbor', L.fn(NoAttr, ['The record is kept in the museum at the old customs house, in forty volumes.']), ', and the record grew longer than the harbor itself.'])L.text(NoAttr, List.of( "The lamp-keepers of the northern coast kept a record of every evening they lit the harbor", L.fn(NoAttr, List.of("The record is kept in the museum at the old customs house, in forty volumes.")), ", and the record grew longer than the harbor itself."))L.Text(NoAttr, [ "The lamp-keepers of the northern coast kept a record of every evening they lit the harbor", L.Fn(NoAttr, ["The record is kept in the museum at the old customs house, in forty volumes."]), ", and the record grew longer than the harbor itself.",])L::text(NoAttr, [ 'The lamp-keepers of the northern coast kept a record of every evening they lit the harbor', L::fn(NoAttr, ['The record is kept in the museum at the old customs house, in forty volumes.']), ', and the record grew longer than the harbor itself.',])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>L.text(NoAttr, [ 'When a storm did come, the entries ran past the margin', L.fn(NoAttr, ['Some are written crosswise over the ruling, and a few ', L.span({ font: 'Helvetica-Oblique' }, ['on the back of the page']), '.']), '.',])L.text(NoAttr, [ 'When a storm did come, the entries ran past the margin', L.fn(NoAttr, ['Some are written crosswise over the ruling, and a few ', L.span(SpanAttr(font='Helvetica-Oblique'), ['on the back of the page']), '.']), '.'])L.text(NoAttr, List.of( "When a storm did come, the entries ran past the margin", L.fn(NoAttr, List.of("Some are written crosswise over the ruling, and a few ", L.span(new SpanAttr().font("Helvetica-Oblique"), List.of("on the back of the page")), ".")), "."))L.Text(NoAttr, [ "When a storm did come, the entries ran past the margin", L.Fn(NoAttr, ["Some are written crosswise over the ruling, and a few ", L.Span(new() { Font = "Helvetica-Oblique" }, ["on the back of the page"]), "."]), ".",])L::text(NoAttr, [ 'When a storm did come, the entries ran past the margin', L::fn(NoAttr, ['Some are written crosswise over the ruling, and a few ', L::span(new SpanAttr(font: 'Helvetica-Oblique'), ['on the back of the page']), '.']), '.',])Where the notes go
Section titled “Where the notes go”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.
Numbering
Section titled “Numbering”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>L.document({ size: 'a4', footnoteCounter: 'document' }, [ L.section(NoAttr, [ L.layout({ margin: '48pt' }, [ L.text(NoAttr, [ 'This section is the first to count across the document', L.fn(NoAttr, ['The first note of the document.']), '.', ]), ]), ]), L.section(NoAttr, [ L.layout({ margin: '48pt' }, [ L.text(NoAttr, [ 'This one goes on from the section before', L.fn(NoAttr, ['The second note of the document: its number is 2.']), '.', ]), ]), ]), L.section({ footnoteCounter: 'section' }, [ L.layout({ margin: '48pt' }, [ L.text(NoAttr, [ 'And this one counts its own', L.fn(NoAttr, ['Numbered 1 again.']), '.', ]), ]), ]),])L.document(DocumentAttr(size='a4', footnote_counter='document'), [ L.section(NoAttr, [ L.layout(LayoutAttr(margin='48pt'), [ L.text(NoAttr, [ 'This section is the first to count across the document', L.fn(NoAttr, ['The first note of the document.']), '.' ]) ]) ]), L.section(NoAttr, [ L.layout(LayoutAttr(margin='48pt'), [ L.text(NoAttr, [ 'This one goes on from the section before', L.fn(NoAttr, ['The second note of the document: its number is 2.']), '.' ]) ]) ]), L.section(SectionAttr(footnote_counter='section'), [ L.layout(LayoutAttr(margin='48pt'), [ L.text(NoAttr, [ 'And this one counts its own', L.fn(NoAttr, ['Numbered 1 again.']), '.' ]) ]) ])])L.document(new DocumentAttr().size("a4").footnoteCounter("document"), List.of( L.section(NoAttr, List.of( L.layout(new LayoutAttr().margin("48pt"), List.of( L.text(NoAttr, List.of( "This section is the first to count across the document", L.fn(NoAttr, List.of("The first note of the document.")), "." )) )) )), L.section(NoAttr, List.of( L.layout(new LayoutAttr().margin("48pt"), List.of( L.text(NoAttr, List.of( "This one goes on from the section before", L.fn(NoAttr, List.of("The second note of the document: its number is 2.")), "." )) )) )), L.section(new SectionAttr().footnoteCounter("section"), List.of( L.layout(new LayoutAttr().margin("48pt"), List.of( L.text(NoAttr, List.of( "And this one counts its own", L.fn(NoAttr, List.of("Numbered 1 again.")), "." )) )) ))))L.Document(new() { Size = "a4", FootnoteCounter = "document" }, [ L.Section(NoAttr, [ L.Layout(new() { Margin = "48pt" }, [ L.Text(NoAttr, [ "This section is the first to count across the document", L.Fn(NoAttr, ["The first note of the document."]), ".", ]), ]), ]), L.Section(NoAttr, [ L.Layout(new() { Margin = "48pt" }, [ L.Text(NoAttr, [ "This one goes on from the section before", L.Fn(NoAttr, ["The second note of the document: its number is 2."]), ".", ]), ]), ]), L.Section(new() { FootnoteCounter = "section" }, [ L.Layout(new() { Margin = "48pt" }, [ L.Text(NoAttr, [ "And this one counts its own", L.Fn(NoAttr, ["Numbered 1 again."]), ".", ]), ]), ]),])L::document(new DocumentAttr(size: 'a4', footnoteCounter: 'document'), [ L::section(NoAttr, [ L::layout(new LayoutAttr(margin: '48pt'), [ L::text(NoAttr, [ 'This section is the first to count across the document', L::fn(NoAttr, ['The first note of the document.']), '.', ]), ]), ]), L::section(NoAttr, [ L::layout(new LayoutAttr(margin: '48pt'), [ L::text(NoAttr, [ 'This one goes on from the section before', L::fn(NoAttr, ['The second note of the document: its number is 2.']), '.', ]), ]), ]), L::section(new SectionAttr(footnoteCounter: 'section'), [ L::layout(new LayoutAttr(margin: '48pt'), [ L::text(NoAttr, [ 'And this one counts its own', L::fn(NoAttr, ['Numbered 1 again.']), '.', ]), ]), ]),])Where a footnote can go
Section titled “Where a footnote can go”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.