On 01/11/2018 04:20 AM, David Kastrup wrote:

Or let grob-transformer do all of the work.

Thanks for the tip!  That's the perfect tool for the job.  And I can also use it for other cases where I have been using before-line-breaking.  For the archives, below is the example expanded to show ly:unpure-call and grob-transformer.

Paul

%%%%%%%%%%

\version "2.19.63"

m = {
  c'''
  c'''\fermata
  c'''\trill
  c'''-^
  c'''-.
  c'''\segno
}

% collisions ahead!
{
  \override Staff.StaffSymbol.ledger-extra = 2
  \m
}

% using ly:unpure-call
{
  \override Staff.StaffSymbol.ledger-extra = 2
  \override Staff.Script.Y-offset =
  #(lambda (grob)
     (+ 1 (ly:unpure-call side-position-interface::y-aligned-side grob)))
  \m
}

% using grob-transformer from scm/music-functions.scm
{
  \override Staff.StaffSymbol.ledger-extra = 2
  \override Staff.Script.Y-offset =
  #(grob-transformer
    'Y-offset
    (lambda (grob default-value) (+ 1 default-value)))
  \m
}

%%%%%%%%%%




_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to