]> git.donarmstrong.com Git - lilypond.git/blob - input/new/aligning-and-centering-instrument-names.ly
Doc-es: Texidoc LSR Snippets in Expressive.
[lilypond.git] / input / new / aligning-and-centering-instrument-names.ly
1 \version "2.11.59"
2
3 \header {
4   lsrtags = "text, paper-and-layout, titles"
5   texidoc = "The horizontal alignment of instrument names is tweaked
6 by changing the @code{Staff.InstrumentName #'self-alignment-X} property.
7 The @code{\\layout} variables @code{indent} and @code{short-indent}
8 define the space in which the instrument names are aligned before the
9 first and the following systems, respectively."
10   doctitle = "Aligning and centering instrument names"
11 }
12
13 \paper { left-margin = 3\cm }
14 \score {
15   \new StaffGroup <<
16     \new Staff {
17       \override Staff.InstrumentName #'self-alignment-X = #LEFT
18       \set Staff . instrumentName = \markup \left-column {
19         "Left aligned"
20         "instrument name"
21       }
22       \set Staff.shortInstrumentName = #"Left"
23       c''1
24       \break
25       c''1
26     }
27     \new Staff {
28       \override Staff.InstrumentName #'self-alignment-X = #CENTER
29       \set Staff.instrumentName = \markup \center-column {
30         "Centered"
31         "instrument name"
32       }
33       \set Staff.shortInstrumentName = #"Centered"
34       g'1
35       g'1
36     }
37     \new Staff {
38       \override Staff.InstrumentName #'self-alignment-X = #RIGHT
39       \set Staff.instrumentName = \markup \right-column {
40         "Right aligned"
41         "instrument name"
42       }
43       \set Staff.shortInstrumentName = #"Right"
44       e'1
45       e'1
46     }
47   >>
48   \layout {
49     ragged-right = ##t
50     indent = 4\cm
51     short-indent = 2\cm
52   }
53 }