]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/aligning-bar-numbers.ly
Update snippets from today's LSR with changed makelsr.py
[lilypond.git] / Documentation / snippets / aligning-bar-numbers.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.dsi.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.14.2"
8
9 \header {
10   lsrtags = "rhythms"
11
12   texidoc = "
13 Bar numbers by default are right-aligned to their parent object. This
14 is usually the left edge of a line or, if numbers are printed within a
15 line, the left hand side of a bar line.  The numbers may also be
16 positioned directly over the bar line or left-aligned to the bar line.
17
18 "
19   doctitle = "Aligning bar numbers"
20 } % begin verbatim
21
22
23 \relative c' {
24   \set Score.currentBarNumber = #111
25   \override Score.BarNumber #'break-visibility = #all-visible
26   % Increase the size of the bar number by 2
27   \override Score.BarNumber #'font-size = #2
28   % Print a bar number every second measure
29   \set Score.barNumberVisibility = #(every-nth-bar-number-visible 2)
30   c1 | c1
31   % Center-align bar numbers
32   \override Score.BarNumber #'self-alignment-X = #CENTER
33   c1 | c1
34   % Left-align bar numbers
35   \override Score.BarNumber #'self-alignment-X = #LEFT
36   c1 | c1
37 }