Urs Liska <address@hidden> writes:
Hi,
I have this construct in a function that creates a combined time signature:
(grob-interpret-markup grob
(markup #:override '(baseline-skip . 0) #:number
(#:line ((#:column (numOne denOne))
(#:column (numTwo denTwo))))))
It creates two columns from the four given arguments, but I want to be
able to create an arbitrary number of columns.
I see that #:line gets a list of (#:column ()) entries.
But I'm lost with the #: part. What does that mean?
That's the markup macro. It is documented in the Extending Guide. More
or less.
And how can I generate such a list with an arbitrary number of
columns?
You can't actually do it in time since the whole point of a macro is
that it operates on its elements _before_ they are evaluated.
So the Extending Guide says:
Known issues and warnings
.........................
The markup-list argument of commands such as ‘#:line’, ‘#:center’, and
‘#:column’ cannot be a variable or the result of a function call.
(markup #:line (function-that-returns-markups))
is invalid. One should use the ‘make-line-markup’,
‘make-center-markup’, or ‘make-column-markup’ functions instead,
(markup (make-line-markup (function-that-returns-markups)))