lilypond-user
[Top][All Lists]
Advanced

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

RE: RehearsalMark hack


From: Fairchild
Subject: RE: RehearsalMark hack
Date: Wed, 23 Nov 2005 06:17:28 -0600

Simon -
 
In Version 2.4.6 the invocation line needs to be:
 
\override Score.RehearsalMark #'before-line-breaking-callback = #mark-callback
 
Impressive detective work.  Please add commentary about the documentation trail you followed to discover your result.  Maybe include some explanation of what code does what.
 
This should be added to Tips and Tricks.  It also is a useful example for \book and \repeat
 
Thanks.
 
                                - Bruce
-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Simon Bailey
Sent: Wednesday, November 23, 2005 3:31 AM
To: address@hidden
Subject: RehearsalMark hack

after delving deeply into the lilypond backend documentation (especially the scheme functions list) i managed to get my hack working in three lines:

#----- SNIP LILY CODE HERE -----
#(define (mark-callback grob)
  (if (= (ly:item-break-dir grob) 1)
      (ly:grob-set-property! grob 'extra-offset '(-2.8 . 1))))

\book {
\score {
  \relative c'' {
    \key des \major
    \override Score.RehearsalMark #'before-line-breaking = #mark-callback
    \repeat unfold 4 c2 \mark \default
    \break
    c2 c \mark \default
    c2 c
  }
}\score {
  \relative c'' {
    \key des \major
    \repeat unfold 4 c2 \mark \default
    \break
    c2 c \mark \default
    c2 c
  }
}
}
#----- END LILY CODE HERE ------

gives this output: http://binabik.boldlygoingnowhere.org/r-marks.pdf

the first score block is the one with the tweak applied, the second one without. is anyone interested in this tweak? if so, i'll add it to lsr later today

regards,
sb.
--
Do not meddle in the affairs of trombonists, for they are subtle and quick to anger.

reply via email to

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