%% Generated by lilypond-book.py
%% Options: [alt=[image of music],printfilename,indent=0\mm,texidoc,line-width=160\mm]
\include "lilypond-book-preamble.ly"







% ****************************************************************
% Start cut-&-pastable-section 
% ****************************************************************

\paper {
  #(define dump-extents #t)
  
  indent = 0\mm
  line-width = 160\mm
}

\layout {
  
}



% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "bar-number-every-five-reset.ly"


\header {
    texidoc = "@cindex Bar Number Every Fifth Reset
If you would like the bar numbers to appear at regular intervals, but
not starting from measure zero, you can use a context function,
@code{set-bar-number-visibility}, to set automatically
@code{barNumberVisibility}, so that the bar numbers appear at regular
intervals, starting from the measure in which 
@code{set-bar-number-visibility} is set using @code{\applyContext}.
"

}

resetBarnum = \context Score \applyContext
  #(set-bar-number-visibility 4)
\score {
    <<
         \transpose c c'' {
	    \override Score.BarNumber  #'break-visibility =#end-of-line-invisible
	    \override Score.RehearsalMark  #'padding = #2.5
	    \mark "A" \resetBarnum
	    \repeat unfold 10 c1
	    \mark \default \resetBarnum
	    \repeat unfold 8 c
            \bar "|."
        }
    >>
\layout{ragged-right = ##t}
}



% ****************************************************************
% end ly snippet
% ****************************************************************
