lilypond-devel
[Top][All Lists]
Advanced

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

after-line-breaking access to paper variables


From: Knut Petersen
Subject: after-line-breaking access to paper variables
Date: Fri, 30 Jun 2017 10:47:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

Hi everybody!

I use some scheme code to dump information needed for video generation:

   #(define (mkvideo-dump-alb grob)
        (let* (
            (pap  (ly:parser-lookup '$defaultpaper))
            (lm   (ly:output-def-lookup pap 'left-margin))
            [...]

It is activated by

   \layout {
        \context { \Staff
            \override BarLine #'after-line-breaking = #mkvideo-dump-alb
        }
        \context { \Voice
            \override NoteHead #'after-line-breaking = #mkvideo-dump-alb
            \override Rest #'after-line-breaking = #mkvideo-dump-alb
            \override MultiMeasureRest #'after-line-breaking = #mkvideo-dump-alb
        }
   }

That works as long as changes to paper variables are made only at the top level,
but changes to paper variables are also possible inside of a \book{}.

It would we nice if someone would give me a hint how to change "pap" and "lm" to
access the current and not the top-level definition of left-margin.

Knut



reply via email to

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