lilypond-user
[Top][All Lists]
Advanced

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

Re: Objects as links


From: Richard Shann
Subject: Re: Objects as links
Date: Sun, 30 Dec 2012 17:21:21 +0000

I too am very interested in adding links to objects, but when I paste
your example into lilypond version 2.16.0 I get syntax errors - is it
specific to 2.17.9?
Below is the error messages (simply changing \version in the file does
not help).

Richard Shann

8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
GNU LilyPond 2.16.0
Processing `junk.ly'
Parsing...
error: program too old: 2.16.0 (file requires: 2.17.9)
junk.ly:22:22: error: syntax error, unexpected '.', expecting SCM_FUNCTION or 
SCM_IDENTIFIER or SCM_TOKEN
  \override Staff.Clef
                      .after-line-breaking =
junk.ly:23:4: warning: Ignoring non-music expression
    
    #(add-link
junk.ly:25:31: error: syntax error, unexpected '.', expecting SCM_FUNCTION or 
SCM_IDENTIFIER or SCM_TOKEN
  \override Staff.TimeSignature
                               .after-line-breaking =
junk.ly:26:4: warning: Ignoring non-music expression
    
    #(add-link
junk.ly:28:41: error: syntax error, unexpected '=', expecting SCM_FUNCTION or 
SCM_IDENTIFIER or SCM_TOKEN
  \override NoteHead.after-line-breaking 
                                         =
junk.ly:29:4: warning: Ignoring non-music expression
    
    #(add-link
junk.ly:21:0: error: errors found, ignoring music expression

\relative c' {
fatal error: failed files: "junk.ly"
8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

On Sat, 2012-12-29 at 20:39 +0100, Thomas Morley wrote:
> 2012/12/29 Noeck <address@hidden>:
> > Hi,
> >
> > is there a way to make objects behave like links? I want an object (like
> > a clef or a beam) to be a link to a website. From the point-and-click
> > functionality it seems to be doable, but I only found the solution for
> > markup (\with-url).
> >
> > If there is a user function or if someone knows how point-and-click
> > works internally, I would be thankful for any help.
> >
> > Cheers,
> > Joram
> >
> > _______________________________________________
> > lilypond-user mailing list
> > address@hidden
> > https://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> Hi,
> 
> you could use this markup-command \with-url to add sth to the grob-stencil.
> 
> It's a hack, but all I can think of.
> 
> \version "2.17.9"
> 
> #(ly:set-option 'debug-skylines #t)
> 
> #(define (add-link strg)
>   (lambda (grob)
>     (let* ((stil (ly:grob-property grob 'stencil))
>            (x-ext (ly:stencil-extent stil X))
>            (y-ext (ly:stencil-extent stil Y))
>            (link-stil (grob-interpret-markup
>                          grob
>                          (markup
>                            #:with-url strg
>                            #:with-dimensions x-ext y-ext
>                            #:null)))
>            (new-stil (ly:stencil-add
>                         stil
>                         link-stil)))
>     (ly:grob-set-property! grob 'stencil new-stil))))
> 
> 
> \relative c' {
>   \override Staff.Clef.after-line-breaking =
>     #(add-link
>       "http://lilypond.org/doc/v2.17/Documentation/notation/writing-pitches";)
>   \override Staff.TimeSignature.after-line-breaking =
>     #(add-link
>        "http://lilypond.org/doc/v2.17/Documentation/notation/rhythms";)
>   \override NoteHead.after-line-breaking =
>     #(add-link
>        "http://lilypond.org/doc/v2.17/Documentation/notation/note-heads";)
>   c''
> }
> 
> HTH,
>   Harm
> 
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user





reply via email to

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