lilypond-devel
[Top][All Lists]
Advanced

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

Re: some objects not clickable


From: Jean Abou Samra
Subject: Re: some objects not clickable
Date: Fri, 31 Mar 2023 00:37:15 +0200
User-agent: Evolution 3.46.4 (3.46.4-1.fc37)

Le jeudi 30 mars 2023 à 10:13 +0000, Werner LEMBERG a écrit :
> ```
> 
> > The ligature is apparently not printed by a `VaticanaLigature` but
> > by a `NoteHead` (try `\override NoteHead.color = blue`).  A bit
> > disconcerting.
> 
> Interestingly, adding
> 
> ```
> \addLink NoteHead "writing-pitches"
> ```
> 
> doesn't help for `VaticanaLigature` (but works for normal note heads).
> This looks like a problem deep in `vaticana-ligature-engraver.cc` (and
> `mensural-ligature-engraver.cc`, which has exactly the same problem
> for `MensuralLigature`).


Right. It's the same problem as for `Divisio`, and the same workaround applies:

```
\version "2.24"

\pointAndClickOff

\include "gregorian.ly"


#(use-modules (ice-9 match))

#(define notation-format
   (match (ly:version)
     ((major minor _)
      (format
       #f
       "https://lilypond.org/doc/v~a.~a/Documentation/notation/~~a";
       major
       minor))))

#(define ((add-link doc) grob original)
   (if (ly:stencil? original)
       (let ((url (format #f notation-format doc)))
         (grob-interpret-markup
          grob
          (make-with-url-markup url (make-stencil-markup original))))
       original))
           
addLink =
#(define-music-function (path doc)
   (symbol-list? string?)
   "Add a clickable link for a grob of type *path* to the documentation
page *doc* in the Notation Reference.  All grobs in the score are
affected."
   (propertyOverride
    (append path '(stencil))
    (grob-transformer 'stencil (add-link doc))))

\new VaticanaStaff \with {
  \override Divisio.before-line-breaking =
    #(lambda (grob)
       (let ((orig (ly:grob-property grob 'stencil)))
         (set! (ly:grob-property grob 'stencil)
               ((add-link "typesetting-gregorian-chant#divisiones") grob 
orig))))
  \override NoteHead.before-line-breaking =
    #(lambda (grob)
       (let ((orig (ly:grob-property grob 'stencil)))
         (set! (ly:grob-property grob 'stencil)
               ((add-link 
"typesetting-gregorian-chant#gregorian-square-neume-ligatures") grob orig))))
}
\relative c' {
  \[ c \flexa b \pes \deminutum d \]

  \section
}
```

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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