Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(736)

Unified Diff: scm/define-markup-commands.scm

Issue 331860043: Multiple properties for \override \override-lines markup
Patch Set: Revert changes in Documentation/snippets, incorporate Thomas Morley's suggestion Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « input/regression/whiteout.ly ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scm/define-markup-commands.scm
diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm
index 592e9a36c358538aafabf9f96d73c9622a021610..5a0dab93a46a6c75c6ec368eabac87a4e1f033af 100644
--- a/scm/define-markup-commands.scm
+++ b/scm/define-markup-commands.scm
@@ -187,8 +187,7 @@ Manual settings for @code{on},@code{off} and @code{phase} are possible.
@lilypond[verbatim,quote]
\\markup {
\\draw-dashed-line #'(5.1 . 2.3)
- \\override #'(on . 0.3)
- \\override #'(off . 0.5)
+ \\override #'((on . 0.3) (off . 0.5))
\\draw-dashed-line #'(5.1 . 2.3)
}
@end lilypond"
@@ -293,8 +292,7 @@ line-length.
@lilypond[verbatim,quote]
\\markup {
\\draw-dotted-line #'(5.1 . 2.3)
- \\override #'(thickness . 2)
- \\override #'(off . 0.2)
+ \\override #'((thickness . 2) (off . 0.2))
\\draw-dotted-line #'(5.1 . 2.3)
}
@end lilypond"
@@ -679,11 +677,9 @@ thickness, and @code{offset} to determine line y-offset.
@lilypond[verbatim,quote]
\\markup \\fill-line {
\\underline \"underlined\"
- \\override #'(offset . 5)
- \\override #'(thickness . 1)
+ \\override #'((offset . 5) (thickness . 1))
\\underline \"underlined\"
- \\override #'(offset . 1)
- \\override #'(thickness . 5)
+ \\override #'((offset . 1) (thickness . 5))
\\underline \"underlined\"
}
@end lilypond"
@@ -751,11 +747,9 @@ of @var{arg}. Looks at @code{thickness} to determine line thickness, and
@lilypond[verbatim,quote]
\\markup \\line {
\\undertie \"undertied\"
- \\override #'(offset . 5)
- \\override #'(thickness . 1)
+ \\override #'((offset . 5) (thickness . 1))
\\undertie \"undertied\"
- \\override #'(offset . 1)
- \\override #'(thickness . 5)
+ \\override #'((offset . 1) (thickness . 5))
\\undertie \"undertied\"
}
@end lilypond"
@@ -774,11 +768,9 @@ Overtie @var{arg}.
@lilypond[verbatim,quote]
\\markup \\line {
\\overtie \"overtied\"
- \\override #'(offset . 5)
- \\override #'(thickness . 1)
+ \\override #'((offset . 5) (thickness . 1))
\\overtie \"overtied\"
- \\override #'(offset . 1)
- \\override #'(thickness . 5)
+ \\override #'((offset . 1) (thickness . 5))
\\overtie \"overtied\"
}
@end lilypond"
@@ -913,15 +905,13 @@ outline of the markup.
\\markup {
\\combine
\\filled-box #'(-1 . 24) #'(-3 . 4) #1
- \\override #'(style . rounded-box)
- \\override #'(thickness . 3)
+ \\override #'((style . rounded-box) (thickness . 3))
\\whiteout whiteout-rounded-box
}
\\markup {
\\combine
\\filled-box #'(-1 . 18) #'(-3 . 4) #1
- \\override #'(style . outline)
- \\override #'(thickness . 3)
+ \\override #'((style . outline) (thickness . 3))
\\whiteout whiteout-outline
}
@end lilypond"
@@ -1982,20 +1972,18 @@ setting of the @code{direction} layout property.
@lilypond[verbatim,quote]
\\markup {
- \\override #`(direction . ,UP) {
- \\dir-column {
- going up
- }
+ \\override #`(direction . ,UP)
+ \\dir-column {
+ going up
}
\\hspace #1
\\dir-column {
going down
}
\\hspace #1
- \\override #'(direction . 1) {
- \\dir-column {
- going up
- }
+ \\override #'(direction . 1)
+ \\dir-column {
+ going up
}
}
@end lilypond"
@@ -2536,24 +2524,22 @@ may be any property supported by @rinternals{font-interface},
@rinternals{text-interface} and
@rinternals{instrument-specific-markup-interface}.
+@var{new-prop} may be either a single alist pair, or non-empty alist
+of its own.
+
@lilypond[verbatim,quote]
\\markup {
- \\line {
- \\column {
- default
- baseline-skip
- }
- \\hspace #2
- \\override #'(baseline-skip . 4) {
- \\column {
- increased
- baseline-skip
- }
- }
- }
+ \\undertie \"undertied\"
+ \\override #'(offset . 15)
+ \\undertie \"offset undertied\"
+ \\override #'((offset . 15)(thickness . 3))
+ \\undertie \"offset thick undertied\"
}
@end lilypond"
- (interpret-markup layout (cons (list new-prop) props) arg))
+ (interpret-markup layout
+ (cons (if (pair? (car new-prop)) new-prop (list new-prop))
+ props)
+ arg))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; files
@@ -3874,9 +3860,8 @@ a shortened down stem.
@lilypond[verbatim,quote]
\\markup {
- \\override #'(style . cross) {
- \\note {4..} #UP
- }
+ \\override #'(style . cross)
+ \\note {4..} #UP
\\hspace #2
\\note {\\breve} #0
}
@@ -4031,7 +4016,7 @@ Could be disabled with @code{\\override #'(multi-measure-rest-number . #f)}
\\hspace #2
\\rest #\"breve\"
\\hspace #2
- \\override #'(multi-measure-rest . #t)
+ \\override-lines #'(multi-measure-rest . #t)
{
\\rest #\"7\"
\\hspace #2
@@ -4463,21 +4448,16 @@ a column containing several lines of text.
@lilypond[verbatim,quote]
\\markup {
- \\line {
- \\parenthesize {
- \\column {
- foo
- bar
- }
- }
- \\override #'(angularity . 2) {
- \\parenthesize {
- \\column {
- bah
- baz
- }
- }
- }
+ \\parenthesize
+ \\column {
+ foo
+ bar
+ }
+ \\override #'(angularity . 2)
+ \\parenthesize
+ \\column {
+ bah
+ baz
}
}
@end lilypond"
@@ -4727,7 +4707,10 @@ where @var{X} is the number of staff spaces."
(define-markup-list-command (override-lines layout props new-prop args)
(pair? markup-list?)
"Like @code{\\override}, for markup lists."
- (interpret-markup-list layout (cons (list new-prop) props) args))
+ (interpret-markup-list layout
+ (cons (if (pair? (car new-prop)) new-prop (list new-prop))
+ props)
+ args))
(define-markup-list-command (table layout props column-align lst)
(number-list? markup-list?)
« no previous file with comments | « input/regression/whiteout.ly ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b