thickness and padding around the markup; the @code{corner-radius} property
makes possible to define another shape for the corners (default is 1).
-@lilypond[quote,verbatim,fragment,relative=2]
+@lilypond[quote,verbatim,relative=2]
c4^\\markup {
\\rounded-box {
Overtura
@cindex padding text
@cindex putting space around text
-Add space around a markup object."
+Add space around a markup object.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\box {
+ default
+ }
+ \\hspace #2
+ \\box {
+ \\pad-around #1 {
+ padded
+ }
+ }
+}
+@end lilypond"
(let*
((stil (interpret-markup layout props arg))
(xext (ly:stencil-extent stil X))
Use a stencil as markup.
-@c FIXME works in .ly file, produces empty stencil in docs
@lilypond[verbatim,quote]
\\markup {
- \\stencil #(dimension-arrows '(15 . 0))
+ \\stencil #(make-circle-stencil 2 0 #t)
}
@end lilypond"
stil)
(number? markup?)
align
()
- "Add padding @var{amount} all around @var{arg}."
+ "Add padding @var{amount} all around @var{arg}.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\box {
+ default
+ }
+ \\hspace #2
+ \\box {
+ \\pad-around #0.5 {
+ padded
+ }
+ }
+}
+@end lilypond"
(let* ((m (interpret-markup layout props arg))
(x (ly:stencil-extent m X))
(y (ly:stencil-extent m Y)))
"
@cindex padding text horizontally
-Add padding @var{amount} around @var{arg} in the X@tie{}direction."
+Add padding @var{amount} around @var{arg} in the X@tie{}direction.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\box {
+ default
+ }
+ \\hspace #4
+ \\box {
+ \\pad-x #2 {
+ padded
+ }
+ }
+}
+@end lilypond"
(let* ((m (interpret-markup layout props arg))
(x (ly:stencil-extent m X))
(y (ly:stencil-extent m Y)))
(interval-widen x amount)
y)))
-(define-builtin-markup-command (put-adjacent layout props arg1 axis dir arg2)
- (markup? integer? ly:dir? markup?)
+(define-builtin-markup-command (put-adjacent layout props axis dir arg1 arg2)
+ (integer? ly:dir? markup? markup?)
align
()
"Put @var{arg2} next to @var{arg1}, without moving @var{arg1}."
(number-pair? number-pair? markup?)
align
()
- "Make @var{arg} take at least @var{x-ext}, @var{y-ext} space."
+ "Make @var{arg} take at least @var{x-ext}, @var{y-ext} space.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\box {
+ default
+ }
+ \\hspace #4
+ \\box {
+ \\pad-to-box #'(0 . 10) #'(0 . 3) {
+ padded
+ }
+ }
+}
+@end lilypond"
(let* ((m (interpret-markup layout props arg))
(x (ly:stencil-extent m X))
(y (ly:stencil-extent m Y)))
align
()
"Center @var{arg} horizontally within a box of extending
-@var{length}/2 to the left and right."
+@var{length}/2 to the left and right.
+
+@lilypond[quote,verbatim]
+\\new StaffGroup <<
+ \\new Staff {
+ \\set Staff.instrumentName = \\markup {
+ \\hcenter-in #12
+ Oboe
+ }
+ c''1
+ }
+ \\new Staff {
+ \\set Staff.instrumentName = \\markup {
+ \\hcenter-in #12
+ Bassoon
+ }
+ \\clef tenor
+ c'1
+ }
+>>
+@end lilypond"
(interpret-markup layout props
(make-pad-to-box-markup
(cons (/ length -2) (/ length 2))
(number->markletter-string number->mark-alphabet-vector num)))
(define-public (horizontal-slash-interval num forward number-interval mag)
- (ly:message "Mag step: ~a" mag)
(if forward
(cond ;((= num 6) (interval-widen number-interval (* mag 0.5)))
;((= num 5) (interval-widen number-interval (* mag 0.5)))
,(cdr num-x) ,(+ (interval-center num-y) dy))
num-x num-y)
#f)))
-(ly:message "Num: ~a, X-interval: ~a" num num-x)
(if (ly:stencil? slash-stencil)
(begin
; for some numbers we need to shift the slash/backslash up or down to make