I am preparing in LilyPond a music book divided into many sections, each having a title. I want to keep the formatting of all titles in a single place, to make future format changes easier, and know two methods to do so: using \define-scheme-function
, and using \define-markup-command
-
#(define-markup-command (section_title_MC layout props text) (markup?)
(interpret-markup layout props
#{
\markup \bold \fontsize #3 { #text }
#}))
section_title_SF = #(define-scheme-function
(parser location text)(markup?)
#{
\markup \column {
\bold \fontsize #3 { #text }
}
#})
\markup \section_title_MC "Etudes in C Major"
{
\key c \major
c'1
}
\section_title_SF "Etudes in G Major"
{
\key g \major
g'1
}
My problem is that neither method seem to respect music symbols, such as \flat and \sharp:
\markup \section_title_MC "Etudes in B \flat Major"
{
\key bes \major
bes'1
}
\section_title_SF "Etudes in E \flat Major"
{
\key ees \major
ees'1
}
Compare this with “direct” markup:
\markup {\bold \fontsize #3 { Etudes in B \flat Major }}
{
\key bes \major
bes'1
}
Will appreciate any help.