On 2021-11-17 2:29 pm, Rajesh Baskar wrote:
Does anyone know how to add a box around a measure counter? I have included two images below, one is the image that is generated using the below lilypond code and the other on is what I’m trying to achieve.
Here is one way to add a box to any grob: %%%% \version "2.20.0" boxify = #(define-music-function (grob-path) (key-list?) (define proc (grob-transformer 'stencil (lambda (grob orig) (grob-interpret-markup grob #{ \markup \override #'(box-padding . 0.25) \override #'(thickness . 2) \box \stencil #orig #})))) #{ \override $grob-path . stencil = #proc #}) \new Staff \with { \consists Measure_counter_engraver \boxify MeasureCounter } { \boxify Staff.Clef \startMeasureCount fis'4 g'8 a' \once \boxify Accidental bes'2 cis''4 d''2. \stopMeasureCount } %%%% -- Aaron Hill