]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/define-markup-commands.scm
bad
[lilypond.git] / scm / define-markup-commands.scm
index 5dbc5d2f5254b61bd4e3bd4c42b4143807501812..716c37f28483c496446b7b9cd353cc39591263df 100644 (file)
@@ -139,6 +139,25 @@ A simple line.
         (y (cdr dest)))
     (make-line-stencil th 0 0 x y)))
 
+(define-markup-command (draw-hline layout props)
+  ()
+  #:category graphic
+  #:properties ((thickness 1))
+  "
+@cindex drawing a line across a page
+
+Draws a line across a page.
+@lilypond[verbatim,quote]
+\\markup {
+  \\draw-hline
+}
+@end lilypond"
+  (let ((th (* (ly:output-def-lookup layout 'line-thickness)
+               thickness))
+        (x (ly:output-def-lookup layout 'line-width))
+        (y 0.0))
+    (make-line-stencil th 0 0 x y)))
+
 (define-markup-command (draw-circle layout props radius thickness filled)
   (number? number? boolean?)
   #:category graphic
@@ -1812,6 +1831,20 @@ returns an empty markup.
                          (list markup?))
     (interpret-markup layout props (list anonymous-with-signature arg))))
 
+(define-markup-command (footnote layout props arg1 arg2)
+  (markup? markup?)
+  #:category other
+  "Apply the footnote @var{arg2} to @var{arg1}."
+  (ly:stencil-combine-at-edge
+    (interpret-markup layout props arg1)
+    X
+    RIGHT
+    (ly:make-stencil
+      `(footnote ,(interpret-markup layout props arg2))
+      '(0 . 0)
+      '(0 . 0))
+    0.0))
+
 (define-markup-command (override layout props new-prop arg)
   (pair? markup?)
   #:category other