]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/snippets/aligning-and-centering-instrument-names.ly
Snippets: Replace \set Staff.instrumentName
[lilypond.git] / Documentation / snippets / aligning-and-centering-instrument-names.ly
index 4aa325956f4497f7b0ad24159af3ae6a4e49a511..30bfc4acd8ecb2643bb94a262dc6d684d1ed0f76 100644 (file)
@@ -1,10 +1,11 @@
-%% DO NOT EDIT this file manually; it is automatically
-%% generated from LSR http://lsr.di.unimi.it
-%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
-%% and then run scripts/auxiliar/makelsr.py
-%%
-%% This file is in the public domain.
-\version "2.18.0"
+% DO NOT EDIT this file manually; it is automatically
+% generated from Documentation/snippets/new
+% Make any changes in Documentation/snippets/new/
+% and then run scripts/auxiliar/makelsr.py
+%
+% This file is in the public domain.
+%% Note: this file works from version 2.19.56
+\version "2.19.56"
 
 \header {
   lsrtags = "paper-and-layout, text, titles"
@@ -20,44 +21,47 @@ and the following systems, respectively.
   doctitle = "Aligning and centering instrument names"
 } % begin verbatim
 
-\paper {
-  left-margin = 3\cm
-}
+\paper { left-margin = 3\cm } % begin verbatim
+
 
 \score {
   \new StaffGroup <<
-    \new Staff {
-      \override Staff.InstrumentName.self-alignment-X = #LEFT
-      \set Staff.instrumentName = \markup \left-column {
+
+    \new Staff \with {
+      \override InstrumentName.self-alignment-X = #LEFT
+      instrumentName = \markup \left-column {
         "Left aligned"
         "instrument name"
+        }
+        shortInstrumentName = "Left"
       }
-      \set Staff.shortInstrumentName = #"Left"
-      c''1
-      \break
-      c''1
-    }
-    \new Staff {
-      \override Staff.InstrumentName.self-alignment-X = #CENTER
-      \set Staff.instrumentName = \markup \center-column {
+
+      {  c''1 \break c''1 }
+
+    \new Staff \with {
+      \override InstrumentName.self-alignment-X = #CENTER
+      instrumentName = \markup \center-column {
         Centered
         "instrument name"
-      }
-      \set Staff.shortInstrumentName = #"Centered"
-      g'1
-      g'1
+        }
+      shortInstrumentName = "Centered"
     }
-    \new Staff {
-      \override Staff.InstrumentName.self-alignment-X = #RIGHT
-      \set Staff.instrumentName = \markup \right-column {
+
+    { g'1 g'1}
+
+    \new Staff \with {
+      \override InstrumentName.self-alignment-X = #RIGHT
+      instrumentName = \markup \right-column {
         "Right aligned"
         "instrument name"
       }
-      \set Staff.shortInstrumentName = #"Right"
-      e'1
-      e'1
+      shortInstrumentName = "Right"
     }
+
+    { e'1 e'1 }
+
   >>
+
   \layout {
     ragged-right = ##t
     indent = 4\cm