Titles
Titles and headers
Ajout de la date du jour à une partition
Avec un peu de code Scheme, voici comment ajouter facilement la date du
jour à votre partition.
% first, define a variable to hold the formatted date:
date = #(strftime "%d-%m-%Y" (localtime (current-time)))
% use it in the title block:
\header {
   = "Including the date!"
   = \date
}
\score {
  \relative c'' {
    c4 c c c
  }
}
% and use it in a \markup block:
\markup {
  \date
}
  ![[image of music]](../9f/lily-3fca3c56.png)
Alignement des noms d’instrument
L’alignement horizontal des noms d’instrument se gère à l’aide de la
propriété Staff.InstrumentName.self-alignment-X.  Les variables
indent et short-indent, attachées au bloc \layout,
déterminent l’espace alloué à l’alignement des noms d’instrument,
respectivement dans leurs formes développée et abrégée.
\paper { left-margin = 3\cm }
\score {
  \new StaffGroup <<
    \new Staff \with {
      \override InstrumentName.self-alignment-X = #LEFT
      instrumentName = \markup \left-column {
        "Left aligned"
        "instrument name"
        }
        shortInstrumentName = "Left"
      }
      {  c''1 \break c''1 }
    \new Staff \with {
      \override InstrumentName.self-alignment-X = #CENTER
      instrumentName = \markup \center-column {
        Centered
        "instrument name"
        }
      shortInstrumentName = "Centered"
    }
    { g'1 g'1}
    \new Staff \with {
      \override InstrumentName.self-alignment-X = #RIGHT
      instrumentName = \markup \right-column {
        "Right aligned"
        "instrument name"
      }
      shortInstrumentName = "Right"
    }
    { e'1 e'1 }
  >>
  \layout {
    ragged-right = ##t
    indent = 4\cm
    short-indent = 2\cm
  }
}
  ![[image of music]](../2d/lily-b295f732.png)
Champs d’entête
Voici la liste de tous les champs d’entête :
\header {
   = "copyright"
   = "title"
   = "subtitle"
   = "composer"
   = "arranger"
   = "instrument"
   = "meter"
   = "opus"
   = "piece"
   = "poet"
   = "All header fields with special meanings."
   = "public domain"
  enteredby = "jcn"
  source = "urtext"
}
\layout {
  ragged-right = ##f
}
\score {
  \relative c'' { c1 | c | c | c }
}
\score {
   \relative c'' { c1 | c | c | c }
   \header {
      = "localtitle"
      = "localsubtitle"
      = "localcomposer"
      = "localarranger"
      = "localinstrument"
     metre = "localmetre"
      = "localopus"
      = "localpiece"
      = "localpoet"
      = "localcopyright"
   }
}
  ![[image of music]](../a8/lily-58e9e712.png)
Impression du numéro de version
Il est possible déjouter le numéro de la version de LilyPond utilisée
dans un markup.
\markup { Processed with LilyPond version #(lilypond-version) }
  ![[image of music]](../8d/lily-49fac566.png)