Titles
Titles and headers
Añadir la fecha actual a una partitura
Con algo de código de Scheme, se puede añadir fácilmente la fecha
actual a una partitura.
% first, define a variable to hold the formatted date:
date = #(strftime "%d-%m-%Y" (localtime (current-time)))
% use it in the title block:
\header {
title = "Including the date!"
subtitle = \date
}
\score {
\relative c'' {
c4 c c c
}
}
% and use it in a \markup block:
\markup {
\date
}
![[image of music]](../fd/lily-2dcb4ff1.png)
Alinear y centrar los nombres de instrumento
La alineación horizontal de los nombres de instrumento se puede
trucar modificando la propiedad Staff.InstrumentName
#'self-alignment-X
. Las variables de \layout
indent
y short-indent
definen el espacio en que se
alinean los nombres de instrumento antes del primer sistema y de
los siguientes, respectivamente.
\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]](../24/lily-777ccf06.png)
Muestra de cada uno de los encabezamientos posibles
Muestra de todos los tipos de encabezamiento.
\header {
copyright = "copyright"
title = "title"
subtitle = "subtitle"
composer = "composer"
arranger = "arranger"
instrument = "instrument"
meter = "meter"
opus = "opus"
piece = "piece"
poet = "poet"
texidoc = "All header fields with special meanings."
copyright = "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 {
title = "localtitle"
subtitle = "localsubtitle"
composer = "localcomposer"
arranger = "localarranger"
instrument = "localinstrument"
metre = "localmetre"
opus = "localopus"
piece = "localpiece"
poet = "localpoet"
copyright = "localcopyright"
}
}
![[image of music]](../2c/lily-c379b259.png)
Imprimir el número de versión
Introduciendo la salida de lilypond-version
en la letra de una
canción, es posible imprimir el número de versión de LilyPond dentro
de una partitura, o en un documento generado con lilypond-book
.
Otra posibillidad es añadir el número de versión al final de la
doc-string, de esta forma:
\score {
\new Lyrics {
\override Score.RehearsalMark.self-alignment-X = #LEFT
\mark #(string-append "Processed with LilyPond version " (lilypond-version))
s2
}
}
![[image of music]](../d2/lily-bb8b4d9b.png)