]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/aligning-and-centering-instrument-names.ly
4aa325956f4497f7b0ad24159af3ae6a4e49a511
[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.di.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.18.0"
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 \paper {
24   left-margin = 3\cm
25 }
26
27 \score {
28   \new StaffGroup <<
29     \new Staff {
30       \override Staff.InstrumentName.self-alignment-X = #LEFT
31       \set Staff.instrumentName = \markup \left-column {
32         "Left aligned"
33         "instrument name"
34       }
35       \set Staff.shortInstrumentName = #"Left"
36       c''1
37       \break
38       c''1
39     }
40     \new Staff {
41       \override Staff.InstrumentName.self-alignment-X = #CENTER
42       \set Staff.instrumentName = \markup \center-column {
43         Centered
44         "instrument name"
45       }
46       \set Staff.shortInstrumentName = #"Centered"
47       g'1
48       g'1
49     }
50     \new Staff {
51       \override Staff.InstrumentName.self-alignment-X = #RIGHT
52       \set Staff.instrumentName = \markup \right-column {
53         "Right aligned"
54         "instrument name"
55       }
56       \set Staff.shortInstrumentName = #"Right"
57       e'1
58       e'1
59     }
60   >>
61   \layout {
62     ragged-right = ##t
63     indent = 4\cm
64     short-indent = 2\cm
65   }
66 }