[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Headers Placement
From: |
Thomas Morley |
Subject: |
Re: Headers Placement |
Date: |
Fri, 18 Jan 2013 21:16:22 +0100 |
2013/1/18 Shane Brandes <address@hidden>:
> That once useful function no longer works properly or as most people might
> anticipate, after 2.12 or thereabouts. Something about multiple headers
> causes Lilypond to crap out. From what i understand a header is a top level
> widget and there can be only one unless you declare some odd ball
> incantation involving either book or book part. That can be accomplished but
> as soon as you introduce a \global in any of the music files you destroy
> that possible way out of the maze, this therefore precludes a most common
> way of defining scores. After beating my head against this for a week
> trying to make the theoretical work, I put up a work around and simply
> replaced the necessary headers with equivalent markup sequences for the
> headers. Search for the multiple headers thread to see a viable solution.
> This area of lilypond is either woefully under documented or simply in a
> very inferior state to the rest of the programs capabilities.
> Anyway best of luck.
>
> Shane
>
> On Fri, Jan 18, 2013 at 12:57 PM, Mark Stephen Mrotek <address@hidden>
> wrote:
>>
>> Hello:
>>
>>
>>
>> The attached file is for a Prelude and Fugue. The header for the Prelude
>> does not appear and is replaced by the header for the Fugue. I have compared
>> mine to the examples in the manual and cannot find my error.
>>
>>
>>
>> Would someone please point it out to me?
>>
>>
>>
>> Thank you for your kind attention.
>>
>>
>>
>> Mark
>>
>>
>> _______________________________________________
>> lilypond-user mailing list
>> address@hidden
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
Hi Mark,
LilyPond supports two kinds of headers: book-header and score-header.
a) book-header (top-level!):
\header { ... }
\score { ... }
b) score-header:
\score {
<some-music>
\header { ... }
}
In your file you use _two_ book-header:
\header { ... } <- this is a book-header!
\score { ... }
\header { ... } <- this too
\score { ... }
The second overrides the first. This is common practise in LilyPond
and didn't work different in 2.12.3
You could use score-headers:
\score {
<some-music>
\header { <settings> }
}
\score {
<some-other.music>
\header { <other-settings> }
}
By default this approach will not print every definition you may have
made in each header.
To force that use
\paper {
print-all-headers = ##t
}
in addition.
This will have a disadvantage, though. If you now set an additional
book-header these settings will be included in every score-header.
You can clear this by inserting a null-statement in every score-header
which does not define the relevant variable of the book-header:
\paper {
print-all-headers = ##t
}
\header {
title = "Title"
subtitle = "Subtitle"
}
\score {
<some-music>
\header {
% overrides the title of the book-header
title = "piece"
% clears the subtitle of the book-header
subtitle = ""
}
}
\score {
<some-other.music>
% subtitle from book-header will be included
\header { title = "other-piece" }
}
Suggestions:
I don't like this messing around with the book-header. So I rarely use
it and prefer \markup for it as Shane suggested already.
But using the score-header is nice.
Below a simple example which uses both, book- and score-header.
Delete the parts relevant to the book-header, if you want.
Some comments included.
\version "2.16.1"
% book-header:
\header {
title = "Title"
subtitle = "Subtitle"
subsubtitle = \markup \vspace #3
composer = "Composer"
}
\paper {
print-all-headers = ##t
}
globalP = {
\key cis \major
\time 3/8
}
pI = \relative c'' { \globalP r4. }
\score {
\new Staff \pI
\layout { }
% score-header
\header {
title = "Prelude"
% clear the relevant parts of the book-header.
% not needed if no book-header is used.
subtitle = ""
subsubtitle = ""
composer = ""
}
}
globalF = {
\key cis \major
\time 4/4
}
fI = \relative c'' { \globalF r1 }
\score {
\new Staff \fI
\layout { }
% score-header
\header {
title = "Fuge"
subtitle = "a 3 Voices"
% see above
subsubtitle = ""
composer = ""
}
}
HTH,
Harm