(car rest) Y)
)
-(define-public (normal-size-superscript-markup grob props . rest)
+(define-public (normal-size-super-markup grob props . rest)
(ly:molecule-translate-axis (interpret-markup
grob
props (car rest))
Y)
)
+(define-public (normal-size-sub-markup grob props . rest)
+ (ly:molecule-translate-axis (interpret-markup
+ grob
+ props (car rest))
+ (* -0.5 (cdr (chain-assoc 'baseline-skip props)))
+ Y)
+ )
+
+
;; todo: fix negative space
(define (hspace-markup grob props . rest)
"Syntax: \\hspace NUMBER."
;; full recursive typecheck.
;;
(define (markup-typecheck? arg)
- (and (pair? arg)
+ (or (string? arg)
+ (and (pair? arg)
(markup-function? (car arg))
(markup-argument-list?
(object-property (car arg) 'markup-signature)
(cdr arg))
))
+)
;;
;; typecheck, and throw an error when something amiss.
;;
(define (markup-thrower-typecheck arg)
(cond
+ ((string? arg) #t)
((not (pair? arg))
(throw 'markup-format "Not a pair" arg)
)
#t
)
-
;;
;; good enough if you only use make-XXX-markup functions.
;;
(define (cheap-markup? x)
- (and (pair? x)
- (markup-function? (car x)))
+ (or (string? x)
+ (and (pair? x)
+ (markup-function? (car x))))
)
;;
;;
(cons sub-markup (list markup?))
+ (cons normal-size-sub-markup (list markup?))
+
(cons super-markup (list markup?))
+ (cons normal-size-super-markup (list markup?))
(cons bold-markup (list markup?))
(cons italic-markup (list markup?))
(signature (object-property (car entry) 'markup-signature))
)
- `(define (,(string->symbol make-name) . args)
+ `(define-public (,(string->symbol make-name) . args)
(make-markup ,(car entry) ,make-name ,(cons 'list signature) args)
))
)
(define-public empty-markup `(,simple-markup ""))
(define (interpret-markup grob props markup)
- (let*
- (
- (func (car markup))
- (args (cdr markup))
- )
-
- (apply func (cons grob (cons props args)) )
- ))
+ (if (string? markup)
+ (simple-markup grob props markup)
+ (let*
+ (
+ (func (car markup))
+ (args (cdr markup))
+ )
+
+ (apply func (cons grob (cons props args)) )
+ )))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
)))
;; test make-foo-markup functions
-(if #t
+(if #f
(begin
(newline)
(newline)