Hi Keith,

The code that implements staff-padding is used only when requested with

  \override MeasureCounter #'Y-offset =
    #side-position-interface::y-aligned-side

Thank you, this works. Would it be useful to enhance the current snippet Numbering groups of measures. See the attachment.

Greetings, Ed
%% Generated by lilypond-book.py
%% 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 "numbering-groups-of-measures.ly"
\sourcefileline 0
% DO NOT EDIT this file manually; it is automatically
% generated from Documentation/snippets/new
% Make any changes in Documentation/snippets/new/
% and then run scripts/auxiliar/makelsr.py
%
% This file is in the public domain.
%% Note: this file works from version 2.17.7
\version "2.18.0"

\header {
%% Translation of GIT committish: 4d9770a67176122b9779426cf540ad1694f07f61
  texidoces = "
Este fragmento de código muestra el uso del grabador
@code{Measure_counter_engraver} para numerar grupos de compases
sucesivos.  Se puede numerar cualquier período de compases tanto si
tiene repeticiones como si no.

Se debe añadir el grabador al contexto adecuado.  Aquí se usa un
contexto @code{Staff}; otra posibilidad sería un contexto
@code{Dynamics}.

El contador se inicia con @code{\\startMeasureCount} y finaliza con
@code{\\stopMeasureCount}.  La numeración comienza con @code{1}, de
forma predeterminada, pero se puede modificar este comportamiento
sobreescribiendo la propiedad @code{count-from}.

Cuando un compás se extiende más allá de un salto de línea, el número
aparece dos veces, la segunda vez entre paréntesis.

"
  doctitlees = "Numerar grupos de compases"

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

  texidoc = "
This snippet demonstrates the use of the @code{Measure_counter_engraver} to
number groups of successive measures.  Any stretch of measures may be numbered,
whether consisting of repetitions or not.

The engraver must be added to the appropriate context.  Here, a @code{Staff}
context is used; another possibility is a @code{Dynamics} context.

If you want to manualy overide the @code{staff-padding} you must enable
the @code{side-position-interface} as well.

The counter is begun with @code{\\startMeasureCount} and ended with
@code{\\stopMeasureCount}.  Numbering will start by default with @code{1}, but
this behavior may be modified by overriding the @code{count-from} property.

When a measure extends across a line break, the number will appear twice, the
second time in parentheses.

"
  doctitle = "Numbering groups of measures"
} % begin verbatim


\layout {
  \context {
    \Staff
    \consists #Measure_counter_engraver
    \override MeasureCounter #'Y-offset = #side-position-interface::y-aligned-side
  }
}

\new Staff {
  \startMeasureCount
  \repeat unfold 7 {
    c'4 d' e' f'
  }
  \stopMeasureCount
  \bar "||"
  g''4 f'' e'' d''
  \override Staff.MeasureCounter.count-from = #2
  \startMeasureCount
  \override Staff.MeasureCounter.staff-padding = #1
  \repeat unfold 5 {
    g''4 f'' e'' d''
  }
  g''4 f''
  \bar ""
  \break
  e''4 d''
  \repeat unfold 7 {
    g''4 f'' e'' d''
  }
  \stopMeasureCount
}



% ****************************************************************
% end ly snippet
% ****************************************************************
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to