Jean Abou Samra <j...@abou-samra.fr> writes:

> Apparently, top-level markups are interpreted with \paper, although
> grob-interpret-markup interprets with a real \layout?
>
>
> \version "2.24.0"
>
> #(define-markup-command (whats-layout layout props) ()
>    (interpret-markup layout props (symbol->string
> (ly:output-def-lookup layout 'output-def-kind))))
>
> \markup \whats-layout
>
> {
>   c'^\markup \whats-layout
> }
>
>
>
> Le 08/01/2023 à 17:06, David Kastrup a écrit :
>> Frankly, I don't get the "layout" parameter in markup. 
>
>
> Me neither. The whole output def setup is quite messy.

A Paper_book does not preserve \layout so at the point where text
markups are interpreted, the \layout is not available.  This seems more
like a fudge than anything else.

I have no idea what the original idea here was, but given that the
parameter name "layout" to markup commands is rather unambiguous and
that it seems very desirable to be able to write

(define-markup-command ... (layout props) ...
  #{ \markup \score { \layout { $layout ...

I lean towards maintaining "layout" and not passing paper blocks into
interpret-markup at all.

We may break some things while figuring this out.  But the current way
appears too weird to make for a useful interface.

-- 
David Kastrup

Reply via email to