On 2024-05-14 15:08, Xavier Scheuer wrote:
> Or is there a line title, like the variables for "Composer" Piece"
etc. I looked, but I haven't found anything obvious.
I would use "piece", but actually you could even define your own
custom header field and custom layout for titles.
https://lilypond.org/doc/v2.24/Documentation/notation/custom-titles-headers-and-footers#custom-layout-for-titles
Another alternative is to use
\tempo "Allegro"
(which worked already in 2.18, as far as I can see)
However, I mostly do like Xavier and use the piece header field, but I
didn't like the default position and wanted it to be typeset with the
same indentation as the first line of music, which after some struggle
could be obtained with the following redefinition of the titling
commands (where I skipped the opus field, since I don't use it):
\version "2.24.1"
%% Indent the piece together with the first score line
#(define-markup-command (indented layout props text) (markup?)
(interpret-markup layout props
(markup #:concat (#:hspace (ly:output-def-lookup layout 'indent))
text)))
\paper{
scoreTitleMarkup = \markup {
\indented \huge \bold \pad-to-box #'(0 . 0) #'(0 . 0) \fromproperty
#'header:piece
}
}
\header{
title = "Main title"
composer = "Mr. Anonymous"
}
\score{
\new Staff \relative c' {
\repeat unfold 10 { c4 d e d | }
c1
}
\layout{}
\midi{}
\header{ piece = "My favourite piece" }
}
\score{
\new Staff \relative c'' {
\repeat unfold 10 { c4 d e d | }
c1
}
\layout{}
\midi{}
\header{ piece = "Another piece" }
}
/Mats