This commits adds a new builtin-markup-command,
as used by Nicolas in his scores. This command
takes a positive number as argument, and makes
an invisible stencil of three times this number
(which is somehow equivalent to the vertical space
taken by a character).
The command definition includes a docstring and
an example, and changes.tely has been updated
accordingly.
@end ignore
+@item
+In addition to the existing @code{\hspace} markup command,
+a new @code{\vspace} command has been added to provide an easy
+and flexible way to add vertical space in markups. This feature
+is based on Nicolas Sceaux's work.
+
@item
The direction of manual beams can be set with @code{^[} and @code{_[}.
(ly:make-stencil "" (cons 0 amount) '(-1 . 1))
(ly:make-stencil "" (cons amount amount) '(-1 . 1))))
+;; todo: fix negative space
+(define-builtin-markup-command (vspace layout props amount)
+ (number?)
+ align
+ ()
+ "
+@cindex creating vertical spaces in text
+
+Create an invisible object taking up vertical space
+of @var{amount} multiplied by 3.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\center-column {
+ one
+ \\vspace #2
+ two
+ \\vspace #5
+ three
+ }
+}
+@end lilypond"
+ (let ((amount (* amount 3.0)))
+ (if (> amount 0)
+ (ly:make-stencil "" (cons -1 1) (cons 0 amount))
+ (ly:make-stencil "" (cons -1 1) (cons amount amount)))))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; importing graphics.