lilypond-devel
[Top][All Lists]
Advanced

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

Re: [patch] \label, page references


From: Han-Wen Nienhuys
Subject: Re: [patch] \label, page references
Date: Sun, 27 May 2007 14:21:12 -0300
User-agent: Thunderbird 1.5.0.10 (X11/20070302)

Nicolas Sceaux escreveu:
> Han-Wen Nienhuys <address@hidden> writes:
> 
>>> +  book_->paper_->set_variable (ly_symbol2scm ("label-page-table"), 
>>> +                          scm_reverse_x (label_page_table, SCM_EOL));
>> This is acceptable if there is no other way, but I would like the rendering 
>> process to be a function, ie. in the ideal case, the rendering should not 
>> write 
>> into the Output_def. Can you think of a way to store this information 
>> elsewhere,
>> or pass it as a parameter to the delayed evaluation? You may need to extend 
>> the
>> stencil evaluation process to have another parameter.
> 
> OK. I used a paper variable because they are accessible by the markup
> command. Would it be OK to add a `SCM labels_' slot to
> Paper_book? Then, in Paper_book::get_system_specs (), the

Yes, that sounds like a better place. 

> page_properties used in markup interpretation, which now is:
>    (layout-extract-page-properties (paper_->self_scm))
> could become:
>    (cons (cons 'paper-book (self_scm))
>          (layout-extract-page-properties (paper_->self_scm)))
>
> Thus, the paper_book instance is accessible by the markup command when
> it is interpreted. With a new ly:paper-book-labels accessor, the markup
> command can get the paper-book labels during the delayed evaluation.

Excellent.

> So, in Paper_book::get_system_specs (), when a label marker is found,
> the labels property of the first column of the previous score is set
> (instead of the score itself, through its layout slot, as in the patch I
> sent).  But then, propagating the labels from individual columns to the
> systems would require to loop across every single column of each system
> to collect the labels. Wouldn't that be too expensive? If this is

no not at all, unless finding the labels in a column is very expensive.

-- 

Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen





reply via email to

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