]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/define-markup-commands.scm
* scm/page-layout.scm (TAGLINE): add www.lilypond.org with URL to
[lilypond.git] / scm / define-markup-commands.scm
index 9492d14b270cd9fed0141f1fc0dd977731eed222..dbcc1556e3b449af5c88bb82994ab3b424bc00f9 100644 (file)
   "Stencil as markup"
   stil)
 
+
+(def-markup-command (with-url layout props url arg) (string? markup?)
+  "Insert a link to @var{url} in the output."
+  (let*
+      ((stil (interpret-markup layout props arg))
+       (xextent (ly:stencil-extent stil X))
+       (yextent (ly:stencil-extent stil X))
+       (old-expr (ly:stencil-expr stil))
+       (url-expr (list 'url-link url `(quote ,xextent) `(quote ,yextent))))
+    
+    (ly:stencil-add
+     (ly:make-stencil url-expr xextent yextent)
+     stil)))
+
 (def-markup-command (score layout props score) (ly:score?)
   "Inline an image of music."
   (let* ((systems (ly:score-embedded-format score layout)))