lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Change text font size globally


From: Werner LEMBERG
Subject: Re: Change text font size globally
Date: Sat, 31 Aug 2024 05:55:36 +0000 (UTC)

Hello Lukas,


>> [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`.]
> 
> 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.

Yeah, I suspected that already.

> But it can be done if you are willing to spend one more
> backslash. :-)
> 
> #(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))

Very nice, thank you!  Perhaps it makes sense to add such an example
to the 'Extending' manual?  Or at least mention that the top-level
`\markup` command is special (together with some other commands) and
cannot be part of a macro.  If you agree, could you provide a patch?


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]