]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 3479: Define \fermata markup command that heeds `direction'
authorDavid Kastrup <dak@gnu.org>
Sun, 28 Jul 2013 11:19:29 +0000 (13:19 +0200)
committerDavid Kastrup <dak@gnu.org>
Fri, 2 Aug 2013 07:44:18 +0000 (09:44 +0200)
scm/define-markup-commands.scm

index 2f08783d7e8edb82ee697ee43446e54b90311cdf..d5aef111407ef761df49a63e72154294b9cfa883 100644 (file)
@@ -3790,6 +3790,28 @@ Could be disabled with @code{\\override #'(multi-measure-rest-number . #f)}
             mmr-stil
             stil))))
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; fermata markup
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define-markup-command (fermata layout props) ()
+  #:category music
+  #:properties ((direction UP))
+  "Create a fermata glyph.  When @var{direction} is @code{DOWN}, use
+an inverted glyph.  Note that within music, one would usually use the
+@code{\\fermata} articulation instead of a markup.
+
+@lilypond[verbatim,quote]
+ { c1^\\markup \\fermata d1_\\markup \\fermata }
+
+\\markup { \\fermata \\override #`(direction . ,DOWN) \\fermata }
+@end lilypond
+"
+  (interpret-markup layout props
+                    (if (eqv? direction DOWN)
+                        (markup #:musicglyph "scripts.dfermata")
+                        (markup #:musicglyph "scripts.ufermata"))))
+  
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; translating.
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;