1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.di.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
6 %% This file is in the public domain.
10 lsrtags = "editorial-annotations, scheme-language, tweaks-and-overrides"
13 To add a link to a grob-stencil you could use @code{add-link} as
14 defined here. Works with @code{\\override} and @code{\\tweak}.
15 Drawback: @code{point-and-click} will be disturbed for the linked grobs.
17 Limitation: Works for PDF only.
19 The linked objects are colored with a separate command.
22 doctitle = "Adding links to objects"
25 % Code by Thomas Morley
26 % Contributed by harm6
27 % Tested with 2.14.2 up to 2.17.9
29 #(define (add-link url-strg)
31 (let* ((stil (ly:grob-property grob 'stencil)))
32 (if (ly:stencil? stil)
35 (x-ext (ly:stencil-extent stil X))
36 (y-ext (ly:stencil-extent stil Y))
37 (url-expr (list 'url-link url-strg `(quote ,x-ext) `(quote ,y-ext)))
38 (new-stil (ly:stencil-add (ly:make-stencil url-expr x-ext y-ext) stil)))
39 (ly:grob-set-property! grob 'stencil new-stil)))
45 "http://lilypond.org/doc/v2.14/Documentation/notation/writing-pitches"
48 "http://lilypond.org/doc/v2.14/Documentation/notation/rhythms"
51 "http://lilypond.org/doc/v2.14/Documentation/notation/note-heads"
54 "http://lilypond.org/doc/v2.14/Documentation/notation/beams"
57 "http://lilypond.org/doc/v2.14/Documentation/notation/note-head-styles"
62 \once \override Staff.Clef.color = #green
63 \once \override Staff.Clef.after-line-breaking =
66 \once \override Staff.TimeSignature.color = #green
67 \once \override Staff.TimeSignature.after-line-breaking =
70 \once \override NoteHead.color = #green
71 \once \override NoteHead.after-line-breaking =
75 \once \override Beam.color = #green
76 \once \override Beam.after-line-breaking =
80 % With 2.17.9 you could use the command below to address the Accidental.
81 % \tweak Accidental.before-line-breaking #(add-link url)
83 \tweak after-line-breaking #(add-link urlV)
84 \tweak style #'harmonic