2005-02-04 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * scm/music-functions.scm (has-request-chord): don't use
+ ly:music-name anywhere. Fixes <<\\>> notation.
+
+ * scm/define-markup-commands.scm (box): use font-size for
+ padding. Fixes boxed-rehearsal-marks.ly
+
* lily/parser.yy (assignment_id): allow LYRICS_STRING as
identifier definition too, so foo = \lyrics { ... } bar = #1
doesn't complain about "bar" being LYRICS_STRING.
(def-markup-command larger (markup?) bigger-markup)
(def-markup-command (box layout props arg) (markup?)
- "Draw a box round @var{arg}. Looks at @code{thickness} and
-@code{box-padding} properties to determine line thickness and padding
-around the markup."
- (let ((th (chain-assoc-get 'thickness props 0.1))
- (pad (chain-assoc-get 'box-padding props 0.2))
- (m (interpret-markup layout props arg)))
+ "Draw a box round @var{arg}. Looks at @code{thickness},
+@code{box-padding} and @code{font-size} properties to determine line
+thickness and padding around the markup."
+ (let* ((th (chain-assoc-get 'thickness props 0.1))
+ (size (chain-assoc-get 'font-size props 0))
+ (pad
+ (* (magstep size)
+ (chain-assoc-get 'box-padding props 0.2)))
+ (m (interpret-markup layout props arg)))
(box-stencil m th pad)))
;;FIXME: is this working?
(let ((es (ly:music-property music 'elements))
(e (ly:music-property music 'element))
- (n (ly:music-name music)))
+ )
(if (memq 'repeated-music (ly:music-property music 'types))
(begin
(if (equal? (ly:music-property music 'iterator-ctor)
(let ((ts (ly:music-property m 'types)))
(memq 'separator ts)))
-
;;; splitting chords into voices.
(define (voicify-list lst number)
"Make a list of Musics.
(error "not music!")))
(let ((es (ly:music-property m 'elements))
(e (ly:music-property m 'element)))
+
+ (display (ly:music-property m 'name))
+
(if (pair? es)
(set! (ly:music-property m 'elements) (map voicify-music es)))
(if (ly:music? e)
(set! (ly:music-property m 'element) (voicify-music e)))
- (if (and (equal? (ly:music-name m) "Simultaneous_music")
+ (if (and (equal? (ly:music-property m 'name) 'SimultaneousMusic)
(reduce (lambda (x y ) (or x y)) #f (map music-separator? es)))
(set! m (context-spec-music (voicify-chord m) 'Staff)))
m))
(define (has-request-chord elts)
(reduce (lambda (x y) (or x y)) #f
(map (lambda (x)
- (equal? (ly:music-name x) "Request_chord"))
+ (equal? (ly:music-property x 'name) 'RequestChord))
elts)))
(define (ly:music-message music msg)
without context specification. Called from parser."
(let ((es (ly:music-property music 'elements))
(e (ly:music-property music 'element))
- (name (ly:music-name music)))
+ (name (ly:music-property music 'name)))
(cond ((equal? name "Context_specced_music") #t)
((equal? name "Simultaneous_music")
(if (has-request-chord es)
(ly:music-message music "Starting score with a chord.\nPlease insert an explicit \\context before chord")
(map check-start-chords es)))
- ((equal? name "Sequential_music")
+ ((equal? name "SequentialMusic")
(if (pair? es)
(check-start-chords (car es))))
(else (if (ly:music? e) (check-start-chords e)))))