[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Ottava brackets formatting [was Re: Quoted text (was Re: When is "-" req
From: |
John Mandereau |
Subject: |
Ottava brackets formatting [was Re: Quoted text (was Re: When is "-" required in articulations?)] |
Date: |
Sun, 25 May 2008 14:44:10 +0200 |
On 2008/05/24, Neil Puttock wrote:
> Here's a patch to fix it; it's pretty straightforward.
Yes it is, I also fixed it yesterday while being offline, I merged with
your patch applied by Graham and pushed.
While we're working on ottava brackets, what about changing default
formatting, i.e. formatting "va" ("ma" respectively) in "8va" ("15ma"
resp.) as superscript? The attached PNG is a recompilation of the
regtest after making the attached change.
Cheers,
John
diff --git a/scm/music-functions.scm b/scm/music-functions.scm
index c700f19..36cec6a 100644
--- a/scm/music-functions.scm
+++ b/scm/music-functions.scm
@@ -456,11 +456,17 @@ OTTAVATION to `8va', or whatever appropriate."
(ly:context-unset-property where 'ottavation)))
(let* ((offset (* -7 octavation))
- (string (cdr (assoc octavation '((2 . "15ma")
- (1 . "8va")
- (0 . #f)
- (-1 . "8vb")
- (-2 . "15mb"))))))
+ (octavation-string (lambda (n supscript)
+ (markup
+ #:line
+ (#:concat
+ (n #:tiny #:raise 0.7 supscript)))))
+ (string (cdr (assoc octavation
+ (list (cons 2 (octavation-string "15" "ma"))
+ (cons 1 (octavation-string "8" "va"))
+ '(0 . #f)
+ (cons -1 (octavation-string "8" "vb"))
+ (cons -2 (octavation-string "15"
"mb")))))))
(ly:context-set-property! context 'middleCOffset offset)
(ly:context-set-property! context 'ottavation string)
(ly:set-middle-C! context)))
- Re: Quoted text (was Re: When is "-" required in articulations?), (continued)
- Re: Quoted text (was Re: When is "-" required in articulations?), Risto Vääräniemi, 2008/05/29
- Re: Quoted text (was Re: When is "-" required in articulations?), Neil Puttock, 2008/05/29
- Manual volta repeat commands [was Re: Quoted text], John Mandereau, 2008/05/30
- Re: Manual volta repeat commands [was Re: Quoted text], Neil Puttock, 2008/05/30
- Re: Manual volta repeat commands [was Re: Quoted text], Graham Percival, 2008/05/30
- Re: Manual volta repeat commands [was Re: Quoted text], John Mandereau, 2008/05/31
- Ottava brackets formatting [was Re: Quoted text (was Re: When is "-" required in articulations?)],
John Mandereau <=
- Re: Ottava brackets formatting [was Re: Quoted text (was Re: When is "-" required in articulations?)], Neil Puttock, 2008/05/25
- Re: Ottava brackets formatting [was Re: Quoted text (was Re: When is "-" required in articulations?)], John Mandereau, 2008/05/26
- Re: Ottava brackets formatting [was Re: Quoted text (was Re: When is "-" required in articulations?)], Neil Puttock, 2008/05/26