+\def\thecopyright{
+ \lilypondifundefined{lilypondcopyright}
+ \thefooter
+ \lilypondcopyright
+}
+
+% Moved header and footer definitions here from the lilypond script.
+% Separate page styles for first, last and ordinary (plain) pages.
+
+\makeatletter
+
+\renewcommand{\ps@plain}{
+ \renewcommand{\@oddfoot}{
+ \parbox{\textwidth}{\mbox{}\thefooter}}
+ \renewcommand{\@evenfoot}{
+ \@oddfoot}
+ \renewcommand{\@evenhead}{
+ \hbox to \textwidth{\textbf{\thepage}\hfill{\small\theheader}}}
+ \renewcommand{\@oddhead}{
+ \hbox to \textwidth{{\small\theheader}\hfill\textbf{\thepage}}}
+}
+
+\newcommand{\ps@firstpage}{
+ \renewcommand{\@oddfoot}{
+ \parbox{\textwidth}{\mbox{}\thecopyright}}
+ \renewcommand{\@evenfoot}{
+ \@oddfoot}
+}
+
+\newcommand{\ps@lastpage}{
+ \renewcommand{\@oddfoot}{
+ \parbox{\textwidth}{\mbox{}\makelilypondtagline}}
+ \renewcommand{\@evenfoot}{
+ \@oddfoot}
+}
+
+\makeatother
+
+\endlinechar \titledefsELC
+\endinput