% "\No" markup: create stylized movement number for the instrumentName field. % syntax example: instrumentName = \markup \No #"14a" #(define-markup-command (No layout props n) (string?) (define (format-char c) (let ((s (string c))) (if (number? (string->number s)) (markup #:hspace 0.125 #:number s #:hspace 0.125) (markup #:hspace 0 #:fontsize 2 s)))) (define (format-string s i) (let ((n (string-length s))) (if (= n 0) (markup #:null) (markup (format-char (string-ref s i)) (if (= (+ i 1) n) (markup #:null) (format-string s (+ i 1))))))) (let ((i (string-length n))) (interpret-markup layout props (markup #:concat ( #:concat ( #:fontsize 2 "N" #:hspace 0.5 #:override '(baseline-skip . 0.825) #:override '(direction . 1) #:dir-column ( #:fontsize 2 #:center-align "." #:fontsize 1 #:center-align "o" ) ) #:hspace 0.75 #:concat ( (format-string n 0) #:fontsize 2 "." ) ) ) ) ) ) \markup \No #"5" \markup \No #"7" \markup \No #"11" \markup \No #"14a" \markup \No #"27b"