Printing the title on every page of your score
Appearance
With this trick, the title of your work will be printed in small on top of every page, using evenHeaderMarkup and oddHeaderMarkup.
\version "2.24.0"
%% http://lsr.di.unimi.it/LSR/Item?id=293
%LSR modified by P.P.Schneider on Feb. 2014
\paper{
oddHeaderMarkup = \markup
\fill-line {
\fromproperty #'header:title " " % This will make sure that the header is never completely empty, to
% avoid some layout problems. Also, moving it in between the title and
% the page number, makes these be typeset left and right aligned, respectively.
\if \should-print-page-number
\fromproperty #'page:page-number-string
}
evenHeaderMarkup = \markup
\fill-line {
\if \should-print-page-number
\fromproperty #'page:page-number-string " "
\fromproperty #'header:title
}
}
\header {
title = "This title will be repeated"
subtitle = "whereas this subtitle won't"
}
\score {
\new Staff {
\repeat unfold 4 {
\repeat unfold 8 { c'8 c'8 c'8 c'8 }
\pageBreak
}
}
}