Hi all,

Lilypond typically has a bit of a problem with (automatic) footnote number 
placement: What is done internally is that footnote numbers are aligned to top 
of the footnote item and then raised by some amount.

This alignment is not actually good when you have text where some elements are 
higher than your typical text line, as would be the case with footnotes 
containing scores or musical symbols, e.g.

%%%
{
  \footnote #'(0 . 2) \markup{ "Editors ¢2:" \rhythm { 8 16 16 8 8 r8 8 8 } }
  c''4
}
%%%

Here the number will be way higher than the E due to the flags of the score, 
looking not good.

The way this is currently implemented does not allow for a way to mitigate 
this. While we can change the raising-amount we can only do it globally. And 
from markup side the only thing we could do is reduce the reported extent, 
which is going to lead to its own set of issues.

So I have taken a few minutes and changed the logic such that things are 
simply aligned by base-line and shifted up by a configurable amount.

See appended file for a demonstration. In my opinion this looks much better, 
and 
in the few cases where you’d want a different behaviour you can control this 
directly from the entered markup (e.g. lower the markup to increase the raise 
of the symbol).

So I think in most cases this is going to perform better, and where it doesn’t 
we can tweak it into place (which we can’t do currently).

Also I have added a `footnote-number-padding` paper variable which allows for 
putting some space between label and footnote.

So now I want to ask for you opinions and if you’d like to see this merged 
into main Lilypond?

Cheers,
Tina

Attachment: footnote-alignment.pdf
Description: Adobe PDF document

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to