The markup
macro builds markup expressions in Scheme while
providing a LilyPond-like syntax. For example,
(markup #:column (#:line (#:bold #:italic "hello" #:raise 0.4 "world") #:bigger #:line ("foo" "bar" "baz")))
is equivalent to:
\markup \column < { \bold \italic "hello" \raise #0.4 "world" } \bigger { foo bar baz } >
This example exposes the main translation rules between regular LilyPond markup syntax and Scheme markup syntax, which are summed up is this table:
LilyPond Scheme \command
#:command
\variable
variable
{ ... }
#:line ( ... )
\center-align { ... }
#:center-align ( ... )
string
"string"
#scheme-arg
scheme-arg
Besides, the whole scheme language is accessible inside the
markup
macro: thus, one may use function calls inside
markup
in order to manipulate character strings for
instance. This proves useful when defining new markup commands (see
Markup command definition).
One can not feed the #:line
(resp #:center
,
#:column
) command with a variable or the result of a function
call. Example:
(markup #:line (fun-that-returns-markups))
is invalid. One should use the make-line-markup
(resp.,
make-center-markup
or make-column-markup
) function
instead,
(markup (make-line-markup (fun-that-returns-markups)))
This page is for LilyPond-2.6.3 (stable-branch).