On Thu, Feb 24, 2011 at 12:31 PM, Mike Solomon <mike...@ufl.edu> wrote:

> On Feb 23, 2011, at 5:14 PM, joenee...@gmail.com wrote:
>
> >
> >
> http://codereview.appspot.com/4213042/diff/2001/lily/constrained-breaking.cc
> > File lily/constrained-breaking.cc (right):
> >
> >
> http://codereview.appspot.com/4213042/diff/2001/lily/constrained-breaking.cc#newcode555
> > lily/constrained-breaking.cc:555: SCM footnotes = paper->c_variable
> > ("footnotes");
> > As you mentioned in your comment to Reinhold, this has some issues. If
> > you want to get footnotes from markups, you could try adding a
> > footnotes_ field to Stencil (modifing Stencil::add_stencil to
> > concatenate the footnote lists) and then return a blank stencil with
> > some footnotes_ from your "footnotes" markup command.
> >
> > Then when you create a Prob, you can get its footnotes by reading them
> > from the stencil.
> >
> > But I'm not sure this will work and I think it will take a fair amount
> > more effort anyway. Since the rest of the patch is almost ready, maybe
> > it's better to do that in a separate patch.
> >
>
> I fail - I've been trying for 2 hours to implement something like this, and
> it doesn't work.  It's making me thing that a 2.15 task may be redefining
> how & when paper systems are represented internally such that Stencils can
> better talk to their Probs.  I've done everything, from working with the
> expr_ field to various contortions of the output def, and I can't get it up
> and running :(
>

 Yeah, you don't want to modify the output def (most of the internals of the

backend don't happen in a predefined order, so modifying a global structure
like an output def is fraught with peril). Did you try adding an extra field

(in C++) to Stencil? If you add

-  SCM footnotes_ to Stencil,
- scm_gc_mark (footnotes_) to Stencil::mark_smob (for SCM garbage
collection)
- footnotes_ = scm_append (footnotes_, s.footnotes_)
  to Stencil::add_stencil
- a scheme function ly:stencil::make-footnote which takes a stencil
  and creates an empty stencil with the given stencil in its footnote list

then the footnotes should be accessible from the stencil when you make the
Prob.

Cheers,
Joe
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to