lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)


From: Mike Solomon
Subject: Re: Reduces algorithm time by prefinding footnoted grobs (issue4213042)
Date: Sun, 27 Feb 2011 16:32:13 -0500

On Feb 27, 2011, at 4:24 PM, address@hidden wrote:

> On 2011/02/27 04:11:56, MikeSol wrote:
> 
> 
> http://codereview.appspot.com/4213042/diff/40001/lily/footnote-engraver.cc
>> File lily/footnote-engraver.cc (right):
> 
> 
> http://codereview.appspot.com/4213042/diff/40001/lily/footnote-engraver.cc#newcode60
>> lily/footnote-engraver.cc:60: Grob * b = make_item ("Footnote",
> event->self_scm
>> ());
>> On 2011/02/26 18:23:05, Neil Puttock wrote:
>> > make the item at the same level as the parent (see
> Parenthesis_engraver)
>> I don't get what you mean - sorry :(
> 
> Don't worry, it doesn't work. :)
> 
> From parenthesis-engraver.cc:
> 
> Engraver *eng = dynamic_cast<Engraver*> (info.origin_translator ());
> Item *paren = eng->make_item ("ParenthesesItem", victim->self_scm ());
> 
> This created the ParenthesesItem from the same engraver which created
> the item being parenthesized (so it gets overrides at the same context
> level, despite the Parentheses_engraver being added to the Score
> context)
> 
> I thought it would make sense to do the same for Footnote_engraver (by
> placing it in the Score context), but this doesn't work properly due to
> the way the engraver captures acknowledged grobs (it doesn't care what
> context they come from, so you'd end up with annotations on grobs in
> separate voices if they occur at the same timestep).
> 
> Cheers,
> Neil
> 
> http://codereview.appspot.com/4213042/

Thanks to both Neil & Joe for spending a good deal of time mulling over this 
code and making sure it works.

To the rest of the list - please send me any and all comments!  Some gotchyas:

1)      No automatic numbering (I have a sense of how to do it w/ `delay' and 
`force' in scheme, but I'd need two 8 hour days to get it done.  I'd also have 
to read through several scores to see what standard practice is w/ this).
2)      The annotations attached to grobs sometimes have odd spacing effects, 
in which case the workaround is to drop the annotation and simply use a 
TextScript to refer to the footnote.  As I get a sense of how people use this 
thing, I'll be able to better refine how its spacing works.

Cheers,
MS


reply via email to

[Prev in Thread] Current Thread [Next in Thread]