]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/centered-measure-numbers.ly
Doc-fr: updates texidocs
[lilypond.git] / Documentation / snippets / centered-measure-numbers.ly
1 % DO NOT EDIT this file manually; it is automatically
2 % generated from Documentation/snippets/new
3 % Make any changes in Documentation/snippets/new/
4 % and then run scripts/auxiliar/makelsr.py
5 %
6 % This file is in the public domain.
7 %% Note: this file works from version 2.17.7
8 \version "2.17.7"
9
10 \header {
11   lsrtags = "contexts-and-engravers, repeats, staff-notation"
12
13   texidoc = "
14 Scores of large ensemble works often have bar numbers placed beneath the
15 system, centered horizontally on the measure's extent.  This snippet shows
16 how the @code{Measure_counter_engraver} may be used to simulate this
17 notational practice.  Here, the engraver has been added to a @code{Dynamics}
18 context.
19
20 "
21
22   doctitle = "Centered measure numbers"
23 } % begin verbatim
24
25
26 \layout {
27   \context {
28     \Dynamics
29     \consists #Measure_counter_engraver
30     \override MeasureCounter.direction = #DOWN
31     \override MeasureCounter.font-encoding = #'latin1
32     \override MeasureCounter.font-shape = #'italic
33     % to control the distance of the Dynamics context from the staff:
34     \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = #2
35   }
36   \context {
37     \Score
38     \remove "Bar_number_engraver"
39   }
40 }
41
42 pattern = \repeat unfold 7 { c'4 d' e' f' }
43
44 \new StaffGroup <<
45   \new Staff {
46     \pattern
47   }
48   \new Staff {
49     \pattern
50   }
51   \new Dynamics {
52     \startMeasureCount
53     s1*7
54     \stopMeasureCount
55   }
56 >>