%% 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
% ****************************************************************

#(ly:set-option 'eps-box-padding 3.000000)



\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 was automatically
%% generated from `Documentation/snippets/new/`.
%%
%% Make any changes in `Documentation/snippets/new/`,
%% then run `scripts/auxiliar/makelsr.pl --new`.
%%
%% This file is in the public domain.
%%
%% Note: this file works from version 2.23.3.

\version "2.23.13"

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

%% Translation of GIT committish: a3fd5364fc4f247579da0ed2bfea887ab37285c6
  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}.

Il s'agit ici de code historique. Dès LilyPond 2.23.3, un simple
@code{\\set Score.centerBarNumbers = ##t} suffit.
"

  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"

%% Translation of GIT committish: 8ffecf6be17c6ec2ff87cf31873121a8cce29b09
  texidocca = "
Sovint, les partitures d'obres per a conjunts grnas tenen els
nombres de compàs a sota del sistems i centrats horitzontalment
sobre l'amplada del compàs.  Aquest fragment de codi mostra com
pot usar-se el gravador @code{Measure_counter_engraver} per simular
aquesta pràctica de notació.  Aquí hem afegit el gravador a un
context @code{Dynamics}.

"
  doctitleca = "Nombres de compàs centrats"

  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.

This snippet presents a legacy method: starting from LilyPond 2.23.3,
@code{\\set Score.centerBarNumbers = ##t} is enough.
"

  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
% ****************************************************************
