lilypond-devel
[Top][All Lists]
Advanced

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

Re: CodaMark and friends not included in skyline


From: Werner LEMBERG
Subject: Re: CodaMark and friends not included in skyline
Date: Tue, 28 Dec 2021 16:23:37 +0000 (UTC)

>> I noticed that the following grobs are not part of the skyline.
>> Actually, I would expect that they are part of it...
>>
>>    BarNumber
>>    CodaMark
>>    MetronomeMark
>>    RehearsalMark
>>    SectionLabel
>>
>> Interestingly, `SegnoMark` and `JumpScript` are both part of the
>> skyline.  The same is true for `CenteredBarNumber`.
>>
>> What's the logic behind it?  IMHO, it should be made consistent.
>> And it should be documented, too.
> 
> How do you observe this?  I don't see a problem with the
> debug-skylines output, [...]

Sorry for not providing an example.  Using Thomas Morley's Scheme code
I'm extending the `after-line-breaking` property to provide
documentation links to the NR; see attached example and image.

Note that JumpScript and SegnoMark are affected, too; I made a mistake
in the code.


    Werner
\pointAndClickOff

% Object link funtion from Thomas Morley.
#(define (add-link strg)
   (lambda (grob)
     (let* ((stil (ly:grob-property grob 'stencil)))
       (if (ly:stencil? stil)
           (let* ((x-ext (ly:stencil-extent stil X))
                  (y-ext (ly:stencil-extent stil Y))
                  (link-stil
                   (grob-interpret-markup
                    grob
                    (markup
                     #:with-url
                     (string-append
                      "https://lilypond.org/doc/v2.23/Documentation/notation/";
                      strg)
                     #:with-dimensions x-ext y-ext
                     #:null)))
                  (new-stil (ly:stencil-add
                             stil
                             link-stil)))
             (ly:grob-set-property! grob 'stencil new-stil))))))


\score {
  \new StaffGroup <<
    \new Staff \relative c'' {
      \override Score.BarNumber.after-line-breaking =
        #(add-link "bars#bar-numbers")
      \override Score.CodaMark.after-line-breaking =
        #(add-link "XXX not yet documented")
      \override Score.JumpScript.after-line-breaking =
        #(add-link "XXX not yet documented")
      \override Score.MetronomeMark.after-line-breaking =
        #(add-link "displaying-rhythms#metronome-marks")
      \override Score.RehearsalMark.after-line-breaking =
        #(add-link "bars#rehearsal-marks")
      \override Score.SectionLabel.after-line-breaking =
        #(add-link "XXX not yet documented")
      \override Score.SegnoMark.after-line-breaking =
        #(add-link "XXX not yet documented")

      \tempo Allegro
      a1

      \override Score.BarNumber.break-visibility = ##(#t #t #t)
      a1
      \revert Score.BarNumber.break-visibility

      \mark \default
      a1

      \repeat segno 2 {
        a1
        \alternative { { a1 a } } }

      \sectionLabel "Coda"
      a1
    }
  >>
}

PNG image


reply via email to

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