]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/aligning-and-centering-instrument-names.ly
7fd69f67b3e92ff2d97d609d80e4caedba2c9431
[lilypond.git] / Documentation / snippets / aligning-and-centering-instrument-names.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 = "paper-and-layout, text, titles"
11
12   texidoc = "
13 The horizontal alignment of instrument names is tweaked by changing the
14 @code{Staff.InstrumentName #'self-alignment-X} property. The
15 @code{\\layout} variables @code{indent} and @code{short-indent} define
16 the space in which the instrument names are aligned before the first
17 and the following systems, respectively.
18
19 "
20   doctitle = "Aligning and centering instrument names"
21 } % begin verbatim
22
23
24 \paper {
25   left-margin = 3\cm
26 }
27
28 \score {
29   \new StaffGroup <<
30     \new Staff {
31       \override Staff.InstrumentName #'self-alignment-X = #LEFT
32       \set Staff.instrumentName = \markup \left-column {
33         "Left aligned"
34         "instrument name"
35       }
36       \set Staff.shortInstrumentName = #"Left"
37       c''1
38       \break
39       c''1
40     }
41     \new Staff {
42       \override Staff.InstrumentName #'self-alignment-X = #CENTER
43       \set Staff.instrumentName = \markup \center-column {
44         Centered
45         "instrument name"
46       }
47       \set Staff.shortInstrumentName = #"Centered"
48       g'1
49       g'1
50     }
51     \new Staff {
52       \override Staff.InstrumentName #'self-alignment-X = #RIGHT
53       \set Staff.instrumentName = \markup \right-column {
54         "Right aligned"
55         "instrument name"
56       }
57       \set Staff.shortInstrumentName = #"Right"
58       e'1
59       e'1
60     }
61   >>
62   \layout {
63     ragged-right = ##t
64     indent = 4\cm
65     short-indent = 2\cm
66   }
67 }