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]](../a7/lily-36c0cabb.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]](../25/lily-d9390537.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]](../30/lily-386510eb.png)
Impression du numéro de version
L’insertion du résultat de lilypond-version
dans des paroles
permet d’ajouter à la partition ou au document généré par
lilypond-book
le numéro de la version de LilyPond utilisée. Une
autre possibilité consiste à l’ajouter à une chaîne textuelle comme
ci-dessous.
\score {
\new Lyrics {
\override Score.RehearsalMark.self-alignment-X = #LEFT
\mark #(string-append "Processed with LilyPond version " (lilypond-version))
s2
}
}
![[image of music]](../ef/lily-ed95eb92.png)