[Top][All Lists]

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

Re: Allow defining markup commands in LilyPond syntax (issue 324140043 b

From: thomasmorley65
Subject: Re: Allow defining markup commands in LilyPond syntax (issue 324140043 by address@hidden)
Date: Sun, 30 Jul 2017 08:41:56 -0700

If I understand correctly the main advantage for the user will be the
possibility to define custom markup-commands with LilyPond-syntax.
Collecting a subset of preexisting commands to substitute tedious
\markup my-name = \markup \with-color #red \rotate #90 \italic \fontsize
#3 \etc
and use it as
\markup \my-name "My text!"

Whereas markup-commands with completely new functionality would need to
be defined as before:
 (define-markup-command (command-name layout props args...)
   [ #:category category ]
   [ #:properties property-bindings ]

I should download/apply this patch. After having played around with it
I'll probably be able to say more.

For now two remarks/questions:
File scm/document-markup.scm (right):
scm/document-markup.scm:96: (set! all-markup-commands (sort!
all-markup-commands markup-name<?))
Looks like 'all-markup-(list)-commands' could be used to simplify
'all-relevant-markup-commands' in 'markup->string' from markup.scm
File scm/markup-macros.scm (right):
scm/markup-macros.scm:113: (defmacro*-public markup-lambda
Not sure I understand what 'markup-(list-)lambda' (as an "unregistered"
markup command) is used for.
Is it for use (as an example) in on-the-fly?
It's public, so if a user could use it directly, why not document it or
at least put up a regtest.
Or am I totally wrong?

reply via email to

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