This patch is meant to be a TEST ONLY of footnotes at the bottom of
commit9cc7f76cb53f6f22844619efff966d13d4790327
authorMike Solomon <mike@apollinemike.com>
Sun, 6 Mar 2011 15:56:59 +0000 (6 10:56 -0500)
committerMike Solomon <mike@apollinemike.com>
Sun, 6 Mar 2011 15:56:59 +0000 (6 10:56 -0500)
tree81cb61e2c9a85a487ad1e163644ea3ec7a970ebd
parent6ed02e03cfc43650ee06f49e5246ee8e1ff872ba
This patch is meant to be a TEST ONLY of footnotes at the bottom of
the page and, as a result, it does NOT print any annotations, which will
hopefully be added in the not-too-distant future.

The basic way this patch works is by adding a field in System and
Line_details that allows for footnotes on any given system to be taken
into account during LilyPond's vertical spacing routines.

For grobs that only ever print once on one system, this is easy.

For spanners, this becomes trickier if the spanner breaks over multiple
lines.  Currently, the parameter spanner-placement, which slides between
-1 and 1, controls the broken spanner to which the footnote applies.
This is done so that LEFT will guarantee placement on the first spanner
and RIGHT will guarantee placement on the second spanner.

For items that have break-visibility set, an is_visible function
in the Balloon_interface checks to see if a given item is actually on
a line, only printing the footnote if both the annotation and the
object being annotated have break-visibility set to #t for that
particular place.

In markups that are not part of a score, the mechanism is entirely
different.  A stencil, called `footnote', is passed to ly:make-stencil.
This stencil is never printed in the actual markup but is fished out
of the stencil when the markup's Prob is created and added as a footnote.

To study this code, the best place to start would be
page-layout-problem.cc.  Any function with the world `footnote' in its
name will show you the trace of many other functions in all these other
files through which footnotes move to their final destination of the
bottom of the page.
31 files changed:
input/regression/footnote-break-visibility.ly [new file with mode: 0644]
input/regression/footnote-spanner.ly [new file with mode: 0644]
input/regression/footnote.ly [new file with mode: 0644]
lily/constrained-breaking.cc
lily/dynamic-align-engraver.cc
lily/footnote-engraver.cc [new file with mode: 0644]
lily/include/constrained-breaking.hh
lily/include/page-breaking.hh
lily/include/page-layout-problem.hh
lily/include/page-spacing.hh
lily/include/paper-system.hh
lily/include/system.hh
lily/page-breaking.cc
lily/page-layout-problem.cc
lily/page-spacing.cc
lily/paper-book.cc
lily/paper-system.cc
lily/stencil-interpret.cc
lily/system.cc
ly/engraver-init.ly
ly/music-functions-init.ly
ly/paper-defaults-init.ly
scm/define-event-classes.scm
scm/define-grob-interfaces.scm
scm/define-grob-properties.scm
scm/define-grobs.scm
scm/define-markup-commands.scm
scm/define-music-properties.scm
scm/define-music-types.scm
scm/define-stencil-commands.scm
scm/output-lib.scm