thickness))
(x (car dest))
(y (cdr dest)))
- (ly:make-stencil
- `(draw-line
- ,th
- 0 0
- ,x ,y)
- (cons (min x 0) (max x 0))
- (cons (min y 0) (max y 0)))))
+ (make-line-stencil th 0 0 x y)))
(define-builtin-markup-command (draw-circle layout props radius thickness fill)
(number? number? boolean?)
@lilypond[verbatim,quote]
\\markup {
+ default
+ \\hspace #2
\\override #'(thickness . 2)
\\underline {
- CONTENTS
+ underline
}
}
@end lilypond"
(x1 (car (ly:stencil-extent markup X)))
(x2 (cdr (ly:stencil-extent markup X)))
(y (* thick -2))
- (line (ly:make-stencil
- `(draw-line ,thick ,x1 ,y ,x2 ,y)
- (cons (min x1 0) (max x2 0))
- (cons thick thick))))
+ (line (make-line-stencil thick x1 y x2 y)))
(ly:stencil-add markup line)))
(define-builtin-markup-command (box layout props arg)
(corner-radius 1)
(font-size 0)
(box-padding 0.5))
- "@cindex enclosing text in a bow with rounded corners
+ "@cindex enclosing text in a box with rounded corners
@cindex drawing boxes with rounded corners around text
Draw a box with rounded corners around @var{arg}. Looks at @code{thickness},
@code{box-padding} and @code{font-size} properties to determine line
thickness and padding around the markup; the @code{corner-radius} property
-makes possible to define another shape for the corners (default is 1).
+makes it 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 rotating text
-Rotate object with @var{ang} degrees around its center."
+Rotate object with @var{ang} degrees around its center.
+
+@lilypond[verbatim,quote]
+\\markup {
+ default
+ \\hspace #2
+ \\rotate #45
+ \\line {
+ rotated 45°
+ }
+}
+@end lilypond"
(let* ((stil (interpret-markup layout props arg)))
(ly:stencil-rotate stil ang 0 0)))
"
@cindex adding a white background to text
-Provide a white background for @var{arg}."
+Provide a white background for @var{arg}.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\combine
+ \\filled-box #'(-1 . 10) #'(-3 . 4) #1
+ \\whiteout whiteout
+}
+@end lilypond"
(stencil-whiteout (interpret-markup layout props arg)))
(define-builtin-markup-command (pad-markup layout props padding arg)
@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))
"
@cindex importing stencils into text
-Use a stencil as markup."
+Use a stencil as markup.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\stencil #(make-circle-stencil 2 0 #t)
+}
+@end lilypond"
stil)
(define bbox-regexp
A simple text string; @code{\\markup @{ foo @}} is equivalent with
@code{\\markup @{ \\simple #\"foo\" @}}.
+Note: for creating standard text markup or defining new markup commands,
+the use of @code{\\simple} is unnecessary.
+
@lilypond[verbatim,quote]
\\markup {
\\simple #\"simple\"
@lilypond[verbatim,quote]
\\markup {
\\line {
- A simple line of text
+ one two three
}
}
@end lilypond"
@lilypond[verbatim,quote]
\\markup {
- \\bold {
- au
- \\concat {
- Mouv
- \\super
- t
- }
+ \\concat {
+ one
+ two
+ three
}
}
@end lilypond"
Like wordwrap, but with lines stretched to justify the margins.
Use @code{\\override #'(line-width . @var{X})} to set the line width;
-@var{X}@tie{}is the number of staff spaces."
+@var{X}@tie{}is the number of staff spaces.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\justify {
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
+ do eiusmod tempor incididunt ut labore et dolore magna aliqua.
+ Ut enim ad minim veniam, quis nostrud exercitation ullamco
+ laboris nisi ut aliquip ex ea commodo consequat.
+ }
+}
+@end lilypond"
(stack-lines DOWN 0.0 baseline-skip
(wordwrap-internal-markup-list layout props #t args)))
((baseline-skip)
wordwrap-internal-markup-list)
"Simple wordwrap. Use @code{\\override #'(line-width . @var{X})} to set
-the line width, where @var{X} is the number of staff spaces."
+the line width, where @var{X} is the number of staff spaces.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\wordwrap {
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
+ do eiusmod tempor incididunt ut labore et dolore magna aliqua.
+ Ut enim ad minim veniam, quis nostrud exercitation ullamco
+ laboris nisi ut aliquip ex ea commodo consequat.
+ }
+}
+@end lilypond"
(stack-lines DOWN 0.0 baseline-skip
(wordwrap-internal-markup-list layout props #f args)))
align
((baseline-skip)
wordwrap-string-internal-markup-list)
- "Wordwrap a string. Paragraphs may be separated with double newlines."
+ "Wordwrap a string. Paragraphs may be separated with double newlines.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\override #'(line-width . 40)
+ \\wordwrap-string #\"Lorem ipsum dolor sit amet, consectetur
+ adipisicing elit, sed do eiusmod tempor incididunt ut labore
+ et dolore magna aliqua.
+
+
+ Ut enim ad minim veniam, quis nostrud exercitation ullamco
+ laboris nisi ut aliquip ex ea commodo consequat.
+
+
+ Excepteur sint occaecat cupidatat non proident, sunt in culpa
+ qui officia deserunt mollit anim id est laborum\"
+}
+@end lilypond"
(stack-lines DOWN 0.0 baseline-skip
(wordwrap-string-internal-markup-list layout props #f arg)))
align
((baseline-skip)
wordwrap-string-internal-markup-list)
- "Justify a string. Paragraphs may be separated with double newlines"
+ "Justify a string. Paragraphs may be separated with double newlines
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\override #'(line-width . 40)
+ \\justify-string #\"Lorem ipsum dolor sit amet, consectetur
+ adipisicing elit, sed do eiusmod tempor incididunt ut labore
+ et dolore magna aliqua.
+
+
+ Ut enim ad minim veniam, quis nostrud exercitation ullamco
+ laboris nisi ut aliquip ex ea commodo consequat.
+
+
+ Excepteur sint occaecat cupidatat non proident, sunt in culpa
+ qui officia deserunt mollit anim id est laborum\"
+}
+@end lilypond"
(stack-lines DOWN 0.0 baseline-skip
(wordwrap-string-internal-markup-list layout props #t arg)))
(symbol?)
align
()
- "Wordwrap the data which has been assigned to @var{symbol}."
+ "Wordwrap the data which has been assigned to @var{symbol}.
+
+@lilypond[verbatim,quote]
+\\header {
+ title = \"My title\"
+ descr = \"Lorem ipsum dolor sit amet, consectetur adipisicing elit,
+ sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
+ Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
+ nisi ut aliquip ex ea commodo consequat.\"
+}
+
+\\paper {
+ bookTitleMarkup = \\markup {
+ \\column {
+ \\fill-line { \\fromproperty #'header:title }
+ \\null
+ \\wordwrap-field #'header:descr
+ }
+ }
+}
+
+\\markup {
+ \\null
+}
+@end lilypond"
(let* ((m (chain-assoc-get symbol props)))
(if (string? m)
(wordwrap-string-markup layout props m)
(symbol?)
align
()
- "Justify the data which has been assigned to @var{symbol}."
+ "Justify the data which has been assigned to @var{symbol}.
+
+@lilypond[verbatim,quote]
+\\header {
+ title = \"My title\"
+ descr = \"Lorem ipsum dolor sit amet, consectetur adipisicing elit,
+ sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
+ Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
+ nisi ut aliquip ex ea commodo consequat.\"
+}
+
+\\paper {
+ bookTitleMarkup = \\markup {
+ \\column {
+ \\fill-line { \\fromproperty #'header:title }
+ \\null
+ \\justify-field #'header:descr
+ }
+ }
+}
+
+\\markup {
+ \\null
+}
+@end lilypond"
(let* ((m (chain-assoc-get symbol props)))
(if (string? m)
(justify-string-markup layout props m)
@cindex merging text
Print two markups on top of each other.
+
+Note: @code{\\combine} cannot take a list of markups enclosed in
+curly braces as an argument; the follow example will not compile:
+
+@example
+\\combine @{ a list @}
+@end example
+
@lilypond[verbatim,quote]
\\markup {
\\fontsize #5
\\override #'(thickness . 2)
\\combine
- \\draw-line #'(0 . 4)
- \\arrow-head #Y #DOWN ##f
+ \\draw-line #'(0 . 4)
+ \\arrow-head #Y #DOWN ##f
}
@end lilypond"
(let* ((s1 (interpret-markup layout props m1))
baseline-skip
(interpret-markup-list layout props args)))
-(define-builtin-markup-command (center-align layout props args)
+(define (general-column align-dir baseline mols)
+ "Stack @var{mols} vertically, aligned to @var{align-dir} horizontally."
+
+ (let* ((aligned-mols (map (lambda (x) (ly:stencil-aligned-to x X align-dir)) mols)))
+ (stack-lines -1 0.0 baseline aligned-mols)))
+
+(define-builtin-markup-command (center-column layout props args)
(markup-list?)
align
((baseline-skip))
@lilypond[verbatim,quote]
\\markup {
- \\center-align {
+ \\center-column {
+ one
+ two
+ three
+ }
+}
+@end lilypond"
+ (general-column CENTER baseline-skip (interpret-markup-list layout props args)))
+
+(define-builtin-markup-command (left-column layout props args)
+ (markup-list?)
+ align
+ ((baseline-skip))
+ "
+@cindex text columns, left-aligned
+
+Put @code{args} in a left-aligned column.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\left-column {
+ one
+ two
+ three
+ }
+}
+@end lilypond"
+ (general-column LEFT baseline-skip (interpret-markup-list layout props args)))
+
+(define-builtin-markup-command (right-column layout props args)
+ (markup-list?)
+ align
+ ((baseline-skip))
+ "
+@cindex text columns, right-aligned
+
+Put @code{args} in a right-aligned column.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\right-column {
one
two
three
}
}
@end lilypond"
- (let* ((mols (interpret-markup-list layout props args))
- (cmols (map (lambda (x) (ly:stencil-aligned-to x X CENTER)) mols)))
- (stack-lines -1 0.0 baseline-skip cmols)))
+ (general-column RIGHT baseline-skip (interpret-markup-list layout props args)))
(define-builtin-markup-command (vcenter layout props arg)
(markup?)
@lilypond[verbatim,quote]
\\markup {
- \\arrow-head #X #RIGHT ##f
+ one
\\vcenter
- Centered
- \\arrow-head #X #LEFT ##f
+ two
+ three
}
@end lilypond"
(let* ((mol (interpret-markup layout props arg)))
(ly:stencil-aligned-to mol Y CENTER)))
-(define-builtin-markup-command (hcenter layout props arg)
+(define-builtin-markup-command (center-align layout props arg)
(markup?)
align
()
@lilypond[verbatim,quote]
\\markup {
\\column {
- ↓
- \\hcenter
- centered
+ one
+ \\center-align
+ two
+ three
}
}
@end lilypond"
@lilypond[verbatim,quote]
\\markup {
\\column {
- ↓
+ one
\\right-align
- right-aligned
+ two
+ three
}
}
@end lilypond"
@lilypond[verbatim,quote]
\\markup {
\\column {
- ↓
+ one
\\left-align
- left-aligned
+ two
+ three
}
}
@end lilypond"
"
@cindex controlling general text alignment
-Align @var{arg} in @var{axis} direction to the @var{dir} side."
+Align @var{arg} in @var{axis} direction to the @var{dir} side.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\column {
+ one
+ \\general-align #X #LEFT
+ two
+ three
+ \\null
+ one
+ \\general-align #X #CENTER
+ two
+ three
+ \\null
+ \\line {
+ one
+ \\general-align #Y #UP
+ two
+ three
+ }
+ \\null
+ \\line {
+ one
+ \\general-align #Y #3.2
+ two
+ three
+ }
+ }
+}
+@end lilypond"
(let* ((m (interpret-markup layout props arg)))
(ly:stencil-aligned-to m axis dir)))
@lilypond[verbatim,quote]
\\markup {
\\column {
- ↓
+ one
\\halign #LEFT
- Left
- ↓
+ two
+ three
+ \\null
+ one
\\halign #CENTER
- Center
- ↓
+ two
+ three
+ \\null
+ one
\\halign #RIGHT
- Right
- ↓
- \\halign #1.2
- \\line {
- Arbitrary alignment
- }
+ two
+ three
+ \\null
+ one
+ \\halign #-5
+ two
+ three
}
}
@end lilypond"
(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}."
(markup?)
other
()
- "Make the argument transparent."
+ "Make the argument transparent.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\transparent {
+ invisible text
+ }
+}
+@end lilypond"
(let* ((m (interpret-markup layout props arg))
(x (ly:stencil-extent m X))
(y (ly:stencil-extent m Y)))
(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))
'(0 . 0)
- (make-hcenter-markup arg))))
+ (make-center-align-markup arg))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; property
()
"Read the @var{symbol} from property settings, and produce a stencil
from the markup contained within. If @var{symbol} is not defined, it
-returns an empty markup."
+returns an empty markup.
+
+@lilypond[verbatim,quote]
+\\header {
+ myTitle = \"myTitle\"
+ title = \\markup {
+ from
+ \\italic
+ \\fromproperty #'header:myTitle
+ }
+}
+\\markup {
+ \\null
+}
+@end lilypond"
(let ((m (chain-assoc-get symbol props)))
(if (markup? m)
(interpret-markup layout props m)
@example
\\override #'(font-family . married) \"bla\"
-@end example"
+@end example
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\line {
+ \\column {
+ default
+ baseline-skip
+ }
+ \\hspace #2
+ \\override #'(baseline-skip . 4) {
+ \\column {
+ increased
+ baseline-skip
+ }
+ }
+ }
+}
+@end lilypond"
(interpret-markup layout (cons (list new-prop) props) arg))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; fonts.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(define-builtin-markup-command (bigger layout props arg)
- (markup?)
- font
- ()
- "Increase the font size relative to current setting.
-
-@lilypond[verbatim,quote]
-\\markup {
- \\huge {
- huge
- \\hspace #2
- \\bigger {
- bigger
- }
- \\hspace #2
- huge
- }
-}
-@end lilypond"
- (interpret-markup layout props
- `(,fontsize-markup 1 ,arg)))
(define-builtin-markup-command (smaller layout props arg)
(markup?)
(markup?)
font
()
- "Copy of the @code{\\bigger} command.
+ "Increase the font size relative to current setting.
@lilypond[verbatim,quote]
\\markup {
larger
}
@end lilypond"
- (interpret-markup layout props (make-bigger-markup arg)))
+ (interpret-markup layout props
+ `(,fontsize-markup 1 ,arg)))
(define-builtin-markup-command (finger layout props arg)
(markup?)
(markup?)
font
()
- "Set @code{font-shape} to @code{caps}"
+ "Set @code{font-shape} to @code{caps}
+
+Note: @code{\\fontCaps} requires the installation and selection of
+fonts which support the @code{caps} font shape."
(interpret-markup layout (prepend-alist-chain 'font-shape 'caps props) arg))
;; Poor man's caps
"
@cindex coloring text
-Draw @var{arg} in color specified by @var{color}."
+Draw @var{arg} in color specified by @var{color}.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\with-color #red
+ red
+ \\hspace #2
+ \\with-color #green
+ green
+ \\hspace #2
+ \\with-color #blue
+ blue
+}
+@end lilypond"
(let ((stil (interpret-markup layout props arg)))
(ly:make-stencil (list 'color color (ly:stencil-expr stil))
(ly:stencil-extent stil X)
other
()
"Produce a single character. For example, @code{\\char #65} produces the
-letter @q{A}."
+letter @q{A}.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\char #65
+}
+@end lilypond"
(ly:text-interface::interpret-markup layout props (ly:wide-char->utf-8 num)))
(define number->mark-letter-vector (make-vector 25 #\A))
(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)))
(num-y (interval-widen (cons center center) (abs dy)))
(is-sane (and (interval-sane? num-x) (interval-sane? num-y)))
(slash-stencil (if is-sane
- (ly:make-stencil
- `(draw-line ,thickness
- ,(car num-x) ,(- (interval-center num-y) dy)
- ,(cdr num-x) ,(+ (interval-center num-y) dy))
- num-x num-y)
+ (make-line-stencil thickness
+ (car num-x) (- (interval-center num-y) dy)
+ (cdr num-x) (+ (interval-center num-y) dy))
#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
@end lilypond"
(let ((parsed (parse-simple-duration duration)))
(note-by-number-markup layout props (car parsed) (cadr parsed) dir)))
-\f
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; translating.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@cindex lowering text
Lower @var{arg} by the distance @var{amount}.
-A negative @var{amount} indicates raising; see also @code{\\raise}."
+A negative @var{amount} indicates raising; see also @code{\\raise}.
+
+@lilypond[verbatim,quote]
+\\markup {
+ one
+ \\lower #3
+ two
+ three
+}
+@end lilypond"
(ly:stencil-translate-axis (interpret-markup layout props arg)
(- amount) Y))
(define-builtin-markup-command (translate-scaled layout props offset arg)
(number-pair? markup?)
- other
+ align
((font-size 0))
"
@cindex translating text
@cindex scaling text
Translate @var{arg} by @var{offset}, scaling the offset by the
-@code{font-size}."
+@code{font-size}.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\fontsize #5 {
+ * \\translate #'(2 . 3) translate
+ \\hspace #2
+ * \\translate-scaled #'(2 . 3) translate-scaled
+ }
+}
+@end lilypond"
(let* ((factor (magstep font-size))
(scaled (cons (* factor (car offset))
(* factor (cdr offset)))))
This moves @q{B C} 2@tie{}spaces to the right, and 3 down, relative to its
surroundings. This command cannot be used to move isolated scripts
vertically, for the same reason that @code{\\raise} cannot be used for
-that."
- (ly:stencil-translate (interpret-markup layout props arg)
+that.
+
+@lilypond[verbatim,quote]
+\\markup {
+ *
+ \\translate #'(2 . 3)
+ \\line { translated two spaces right, three up }
+}
+@end lilypond"
+ (ly:stencil-translate (interpret-markup layout props arg)
offset))
(define-builtin-markup-command (sub layout props arg)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-public (space-lines baseline stils)
- (let space-stil ((prev-stil #f)
- (stils stils)
+ (let space-stil ((stils stils)
(result (list)))
- (cond ((null? stils)
- (reverse! result))
- ((not prev-stil)
- (space-stil (car stils) (cdr stils) (list (car stils))))
- (else
- (let* ((stil (car stils))
- (dy (max (- baseline
- (+ (- (interval-bound (ly:stencil-extent prev-stil Y) DOWN))
- (interval-bound (ly:stencil-extent stil Y) UP)))
- 0.0))
- (new-stil (ly:make-stencil
- (ly:stencil-expr stil)
- (ly:stencil-extent stil X)
- (cons (interval-bound (ly:stencil-extent stil Y) DOWN)
- (+ (interval-bound (ly:stencil-extent stil Y) UP) dy)))))
- (space-stil stil (cdr stils) (cons new-stil result)))))))
+ (if (null? stils)
+ (reverse! result)
+ (let* ((stil (car stils))
+ (dy-top (max (- (/ baseline 1.5)
+ (interval-bound (ly:stencil-extent stil Y) UP))
+ 0.0))
+ (dy-bottom (max (+ (/ baseline 3.0)
+ (interval-bound (ly:stencil-extent stil Y) DOWN))
+ 0.0))
+ (new-stil (ly:make-stencil
+ (ly:stencil-expr stil)
+ (ly:stencil-extent stil X)
+ (cons (- (interval-bound (ly:stencil-extent stil Y) DOWN)
+ dy-bottom)
+ (+ (interval-bound (ly:stencil-extent stil Y) UP)
+ dy-top)))))
+ (space-stil (cdr stils) (cons new-stil result))))))
(define-builtin-markup-list-command (justified-lines layout props args)
(markup-list?)