%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm]
\include "lilypond-book-preamble.ly"


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



\paper {
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}





% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "snippets/centered-measure-numbers.ly"
\sourcefileline 0
%% DO NOT EDIT this file manually; it is automatically
%% generated from LSR http://lsr.di.unimi.it
%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
\version "2.21.2"

\header {
%% Translation of GIT committish: a8a85e19654e46d725563e6deba44083ef137a2c
  texidocja = "
大きなアンサンブル スコアでは、小節番号がシステムの下に、また小節の中央に@c
表示されるものがあります。このスニペットは @code{Measure_counter_engraver} を@c
用いて、この慣習を模倣する方法を示しています。ここでは、@code{Dynamics}
コンテキストにエングラーバを追加しています。
"
  doctitleja = "小節番号を中央揃えする"

%% Translation of GIT committish: 7a89226d5472a2548ec19228d8bccee1bd2480b4
  texidocfr = "
Les partitions pour grands ensembles disposent souvent de la
numérotation des mesures centrée en dessous du système. L'extrait
ci-dessous indique comment le @code{Measure_counter_engraver} permet de
répondre à cette pratique. Le graveur est ici ajouté à un contexte
@code{Dynamics}.

"
  doctitlefr = "Numéros de mesure centrés"

%% Translation of GIT committish: 8ffecf6be17c6ec2ff87cf31873121a8cce29b09
  texidoces = "
Con frecuencia, las partituras de obras para conjuntos grandes tienen
los números de compás debajo del sistema y centrados horizontalmente
sobre el ancho del compás.  Este fragmento de código muestra cómo
puede usarse el grabador @code{Measure_counter_engraver} para simular
esta práctica notacional.  Aquí hemos añadido el grabador a un
contexto @code{Dynamics}.

"
  doctitlees = "Números de compás centrados"

  lsrtags = "contexts-and-engravers, repeats, staff-notation"

  texidoc = "
Scores of large ensemble works often have bar numbers placed beneath
the system, centered horizontally on the measure's extent.  This
snippet shows how the @code{Measure_counter_engraver} may be used to
simulate this notational practice.  Here, the engraver has been added
to a @code{Dynamics} context.

"
  doctitle = "Centered measure numbers"
} % begin verbatim

\layout {
  \context {
    \Dynamics
    \consists #Measure_counter_engraver
    \override MeasureCounter.direction = #DOWN
    \override MeasureCounter.font-encoding = #'latin1
    \override MeasureCounter.font-shape = #'italic
    % to control the distance of the Dynamics context from the staff:
    \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = #2
  }
  \context {
    \Score
    \remove "Bar_number_engraver"
  }
}

pattern = \repeat unfold 7 { c'4 d' e' f' }

\new StaffGroup <<
  \new Staff {
    \pattern
  }
  \new Staff {
    \pattern
  }
  \new Dynamics {
    \startMeasureCount
    s1*7
    \stopMeasureCount
  }
>>



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