Lukas-Fabian Moser <l...@gmx.de> writes: >>> Of course I can do >>> >>> circlefunc = \markup\circle\etc >>> \markup \test \circlefunc "whatever" >> You can? Have you tried? \circlefunc here is quite equivalent to >> \circle . > > Hm, I think I do not understand. With > > test = > #(define-scheme-function (enclosure content) > (markup-function? markup?) > (list enclosure #{ \markup \box #content #})) > > I can do and compile > > \test \markup \circle \etc "whatever" > > as well as > > circlefunc = \markup\circle\etc > \markup \test \circlefunc "whatever" > > but > > \markup \test \circle "whatever" > > fails with > > /tmp/frescobaldi-7l5ntq0c/tmp1iduvtxw/document.ly:8:15: Fehler: syntax > error, unexpected MARKUP_FUNCTION, expecting \header > > \markup \test > > \circle "whatever" > > /tmp/frescobaldi-7l5ntq0c/tmp1iduvtxw/document.ly:8:33: Fehler: > Haupt-Eingabe nicht beendet > > \markup \test \circle "whatever" > > schwerer Fehler: gescheiterte Dateien: > "/tmp/frescobaldi-7l5ntq0c/tmp1iduvtxw/document.ly" > > So, I can't believe that \circlefunc and \circle should be actually > equivalent.
Ah right, there is a difference. They would be equivalent when writing \markup circlefunc = \markup \circle \etc The actually embedded markup function is the same, but it is packaged differently. You can get at the markup function part of the package by using
test = #(define-scheme-function (enclosure content) (markup-function? markup?) (list enclosure #{ \markup \box #content #})) \markup \test \circle-markup "whatever"
Markups and their commands are an abomination. -- David Kastrup