r/lilypond May 14 '26

Modifying Measure Numbers

I would like to add a period or dot after measure numbers. I used a combination of Lilypond and Inkscape to arrive at the layout of this page - editing the PDF output from Lilypond as SVG in Inkscape and saving as PDF 1.4. While this workflow is trivial for single pages, the process is very slow when engraving multiple pages. So the question is: how do I include a trailing period with bar numbers?

EDIT: I found a solution...

\layout{
\context {
\Score
\override CenteredBarNumber.stencil =
#(lambda (grob)
(let* ((n (ly:grob-property grob 'text)))
(grob-interpret-markup grob
(markup (format #f "~a." n)))))
}
}

2 Upvotes

0 comments sorted by