Hi Werner,

[Being bad at Scheme I also didn't succeed to define a macro
`\absmarkup` that works at the top level as a substitute for
`\markup`.]

Any takers?

I'm skeptical as to whether this is possible: \markup has the effect of
switching the lexer into 'markup' state, and this is hardcoded in a
special rule in lexer.ll/parser.yy.

But it can be done if you are willing to spend one more backslash. :-)

%%%%%%%%%%%%%%%

\version "2.24.0"

#(define (positive-number? x) (and (number? x) (positive? x)))

abs =
#(define-scheme-function (size text) ((positive-number? 18) markup?)
   (make-abs-fontsize-markup size text))

\abs\markup Test

\markup \abs-fontsize #18 { Test (comparison) }

\abs 24 \markup Blah

\markup \abs-fontsize #24 { Blah (comparison) }

%%%%%%%%%%%%%%%

Lukas

Reply via email to