;;;; This file is part of LilyPond, the GNU music typesetter.
;;;;
-;;;; Copyright (C) 2000--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
+;;;; Copyright (C) 2000--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
;;;; Jan Nieuwenhuizen <janneke@gnu.org>
;;;;
;;;; LilyPond is free software: you can redistribute it and/or modify
(if (null? (remove ly:stencil-empty? orig-stencils))
empty-stencil
- (stack-stencils-padding-list X
- RIGHT fill-space-normal line-stencils))))
+ (ly:stencil-translate-axis
+ (stack-stencils-padding-list X
+ RIGHT fill-space-normal line-stencils)
+ (- (car (ly:stencil-extent (car stencils) X)))
+ X))))
(define-markup-command (line layout props args)
(markup-list?)
}
@end lilypond"
(interpret-markup layout
- (cons '((font-size . -5) (font-encoding . fetaNumber)) props)
+ (cons '((font-size . -5) (font-encoding . fetaText)) props)
arg))
(define-markup-command (abs-fontsize layout props size arg)
}
}
@end lilypond"
- (interpret-markup layout (prepend-alist-chain 'font-encoding 'fetaNumber props) arg))
+ (interpret-markup layout (prepend-alist-chain 'font-encoding 'fetaText props) arg))
(define-markup-command (roman layout props arg)
(markup?)
}
@end lilypond"
(interpret-markup
- layout (prepend-alist-chain 'font-encoding 'fetaDynamic props) arg))
+ layout (prepend-alist-chain 'font-encoding 'fetaText props) arg))
(define-markup-command (text layout props arg)
(markup?)
; backward slashes might use slope and point in the other direction!
(dy (* mag (if forward 0.4 -0.4)))
(number-stencil (interpret-markup layout
- (prepend-alist-chain 'font-encoding 'fetaNumber props)
+ (prepend-alist-chain 'font-encoding 'fetaText props)
(number->string num)))
(num-x (horizontal-slash-interval num forward (ly:stencil-extent number-stencil X) mag))
(center (interval-center (ly:stencil-extent number-stencil Y)))
stroke")
(define-markup-command (eyeglasses layout props)
- ()
+ ()
#:category other
"Prints out eyeglasses, indicating strongly to look at the conductor.
@lilypond[verbatim,quote]
(m (interpret-markup layout props arg)))
(bracketify-stencil m Y th (* 2.5 th) th)))
+(define-markup-command (parenthesize layout props arg)
+ (markup?)
+ #:category graphic
+ #:properties ((angularity 0)
+ (padding)
+ (size 1)
+ (thickness 1)
+ (width 0.25))
+ "
+@cindex placing parentheses around text
+
+Draw parentheses around @var{arg}. This is useful for parenthesizing
+a column containing several lines of text.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\line {
+ \\parenthesize {
+ \\column {
+ foo
+ bar
+ }
+ }
+ \\override #'(angularity . 2) {
+ \\parenthesize {
+ \\column {
+ bah
+ baz
+ }
+ }
+ }
+ }
+}
+@end lilypond"
+ (let* ((markup (interpret-markup layout props arg))
+ (scaled-width (* size width))
+ (scaled-thickness
+ (* (chain-assoc-get 'line-thickness props 0.1)
+ thickness))
+ (half-thickness
+ (min (* size 0.5 scaled-thickness)
+ (* (/ 4 3.0) scaled-width)))
+ (padding (chain-assoc-get 'padding props half-thickness)))
+ (parenthesize-stencil
+ markup half-thickness scaled-width angularity padding)))
+
+\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Delayed markup evaluation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;