Fixing footnote number placement
Tina Petzel <[email protected]>
| Newsgroups | gmane.comp.gnu.lilypond.devel,gmane.comp.gnu.lilypond.general |
|---|---|
| Message-ID | <2068800.tdWV9SEqCh@archbox> |
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
footnote-alignment.pdf
(application/pdf, 34 KB) - not displayed
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEET9lQp3Sisy/pK6sBnDUJWyIflYEFAmmAtPMACgkQnDUJWyIf lYEigQ/+IwJgFXJZYaZsQIjmusghLdfn10AloYUGcxp/dm607PgmyvdHVw+R27DH vFenujXeuIJTpEakVWoMVsopwsCXO3bovdOvGDiQGQXYqlqRJ+ziKno7hE4PkuZO bjRCCYEpTdJvTNXuxUsYXd4pTDwHoZzLQpwUGpSg4aqBlse2f8Uzjma5LTm9ZuW2 1UmayiuFeqp43LvblhWw2XAw/n93mgG5CjWKKczTBFtqPdPc1ga+f/DWrUYW7MDl 6CDe9P7lp/WT802+WYa+jiKyjurIUTNWZmOCIjyIqY+2rL2d2dz4z4e4ekBTIpJP tf/In4limXxhtyTmk3jtFOLIZdBBqbzwtKY0IePy9NesX8OSaj7jRInUVMHVnHwv 4Vqps6UjuxqJ05rN++A8J9eg1JfgOlWCxUDjRfrCcwhvnCM89uEi0pYHliy7Ltn8 0jOoGHkUpyEbblkkTPPOxlnPz832uW0SgBmNU/fRAnry+mv8T7C2ajPaqCDhZ4fo ltP/gUk4+t55kP75OyaZNAQFKdiOQtRyMdxCndMhFnh/ct7R/s3u7FHNsZwc0aX+ RSY6IQty0/6bKU0W0/xiFs6/AqTkaVjSMgm8lpT38OWi05HHW8GpqFZKzjlx89bI yDjtIZZr3fQ7cZsyzalQ2lMNCotYww8hF6kYhTWhdXDdeSqh68M= =hRxH -----END PGP SIGNATURE-----