lilypond-user
[Top][All Lists]
Advanced

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

when/where/wy is a label for page-ref created?


From: Jan-Peter Voigt
Subject: when/where/wy is a label for page-ref created?
Date: Mon, 17 Jan 2011 15:53:43 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7

Hello list,

I searched for an explanation in my lilybuntu VM for label creation and referencation. There are several .cc files wich reference labels etc. But I didn't find the place where they are added and under wich conditions. I wish to be able to add labels independent of breaks or bar-lines. Do I have to create a patch for my lily - and where do I have start with that? Or is it just a question of another scheme-script?

If I do a \displayMusic for
{ \bar "" \tocItem \markup { "A" } }
I get:
(make-music
  'SequentialMusic
  'elements
  (list (make-music
          'ContextSpeccedMusic
          'context-type
          'Timing
          'element
          (make-music
            'PropertySet
            'value
            ""
            'symbol
            'whichBar))
        (make-music
          'EventChord
          'elements
          (list (make-music
                  'LabelEvent
                  'page-label
                  'toc54))
          'page-label
          'toc54
          'page-marker
          #t)))

In my footnote-function I added the 'wichbar-part and now I can create the label anywhere. But this may lead to unwanted breaks or override an exisitng barline. How do I avoid this? Or is there a better solution?

Best regards,
Jan-Peter

On 14.01.2011 14:27, Jan-Peter Voigt wrote:
Hello List,

I stumbled across a thing with label and page-ref.
Labels are used to create the table of contents and I use them in my little 
footnote snippet ( http://lsr.dsi.unimi.it/LSR/Item?id=728 )
If the label is created on a barline, everything is fine. if it is created 
somewhere within  a measure, the page is not found anymore. I show this with 
\tocItem, because its a short snippet:

--snip--
\markuplines \table-of-contents

\relative c' {
   \time 4/4
   \tocItem \markup { "One" } c d % page 1
   \tocItem \markup { "Two" } e f % page not found
   \time 3/4
   \tocItem \markup { "Three" } g a b c % page one
   \tocItem \markup { "Four" } r2 % page not found
}

\version "2.13.46"
--snip--
I tested it with stable (2.12.3) and unstable (2.13.46) on Linux and Mac.
In my little snippet I create, like the tocItem command, a label-event in 
scheme:
...
;; define label and text before this
...
(make-music 'EventChord 'page-marker #t 'page-label label
   'elements (list
     (make-music 'LabelEvent 'page-label label)
     (make-music 'TextScriptEvent 'direction dir 'text (markup text))
   )
)
...
When I later try to fetch the page-number from the lable-table 
(ly:output-def-lookup layout 'label-page-table), the table does not contain an 
entry label if it was *not* created on a barline.
What do you think about this?

I post this to user and devel, so if there is a solution or explanation let me 
know, if this is a bug discuss it for the bug-tracker.

Regards,
Jan-Peter


_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user





reply via email to

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