Vertical spacing of footnotes: Difference between revisions
Import snippet from LSR |
m New category |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 3: | Line 3: | ||
This snippet fixes the vertical spacing of footnotes. It defines a new command <code>\Footnote</code> that accepts either a markup (for single-line footnotes) or a markup list (for multi-line footnotes). The baseline-to-baseline distance of the lines in multi-line footnotes is controlled by the top-level baseline skip in the paper variable <code>text-font-defaults.baseline-skip</code>. | This snippet fixes the vertical spacing of footnotes. It defines a new command <code>\Footnote</code> that accepts either a markup (for single-line footnotes) or a markup list (for multi-line footnotes). The baseline-to-baseline distance of the lines in multi-line footnotes is controlled by the top-level baseline skip in the paper variable <code>text-font-defaults.baseline-skip</code>. | ||
<lilypond version="2.24 | <lilypond version="2.24" full> | ||
#(define-markup-command (footnote-strut layout props depth) | #(define-markup-command (footnote-strut layout props depth) | ||
(boolean?) | (boolean?) | ||
| Line 130: | Line 130: | ||
[[Category:Paper and layout]] | [[Category:Paper and layout]] | ||
[[Category:Spacing]] | [[Category:Spacing]] | ||
[[Category:Snippet]] | |||
Latest revision as of 23:24, 21 November 2025
Right now, LilyPond's abilities to format footnote text strings are quite limited: each footnote on a page is processed and emitted separately, with some whitespace (footnote-padding) inbetween. footnote-padding is also inserted between the footnote separator markup and the first footnote. A consequence of this very simplistic output model (i.e., using padding and not baseline-to-baseline distances) is uneven vertical spacing if some footnote text doesn't contain both ascenders (like letter ‘d’) and descenders (like letter ‘p’).
This snippet fixes the vertical spacing of footnotes. It defines a new command \Footnote that accepts either a markup (for single-line footnotes) or a markup list (for multi-line footnotes). The baseline-to-baseline distance of the lines in multi-line footnotes is controlled by the top-level baseline skip in the paper variable text-font-defaults.baseline-skip.