1%% DO NOT EDIT this file manually; it is automatically
2%% generated from LSR http://lsr.di.unimi.it
3%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4%% and then run scripts/auxiliar/makelsr.py
5%%
6%% This file is in the public domain.
7\version "2.23.2"
8
9\header {
10  lsrtags = "rhythms, tweaks-and-overrides"
11
12  texidoc = "
13Bar numbers can also be printed inside boxes or circles.
14
15"
16  doctitle = "Printing bar numbers inside boxes or circles"
17} % begin verbatim
18
19\relative c' {
20  % Prevent bar numbers at the end of a line and permit them elsewhere
21  \override Score.BarNumber.break-visibility = #end-of-line-invisible
22  \set Score.barNumberVisibility = #(every-nth-bar-number-visible 4)
23
24  % Increase the size of the bar number by 2
25  \override Score.BarNumber.font-size = #2
26
27  % Draw a box round the following bar number(s)
28  \override Score.BarNumber.stencil
29    = #(make-stencil-boxer 0.1 0.25 ly:text-interface::print)
30  \repeat unfold 5 { c1 }
31
32  % Draw a circle round the following bar number(s)
33  \override Score.BarNumber.stencil
34    = #(make-stencil-circler 0.1 0.25 ly:text-interface::print)
35  \repeat unfold 4 { c1 } \bar "|."
36}
37