On 09/02/2012 08:22 AM, Federico Bruni wrote:
> I'm trying a different approach¹ in creating a book. Let me first
> explain what I 'd like to achieve.
>
> Let's say I have some scores which I'd like to print either on
> their own and inside a book which includes them all; and I want the
> title to show up correctly in both cases without having to touch
> any single score. It seems that \bookpart is perfect because I can
> use an \header block for each score.
>
> But I have two problems in the book file which includes the
> bookpart files:
>
> 1. page numbers in the table of contents don't work: I see a ?
> instead of a number
The \bookpart starts a new page. You have:
\tocItem \markup "1st piece"
\include "bookpart1.ly"
which sets the TOC entry, *then* starts (in the included file) a new page.
> 2. between the two scores a page with the main title is printed
I’m not sure what’s causing that.
I find I have to make the included files *just* be the music, and some
variable definitions that I can use in the book:
\include "first_music.ly"
\include "second_music.ly"
\book {
\header {
title = "Book Title"
}
\markuplines \table-of-contents
\bookpart {
\tocItem \markup { \firstTitle }
\score {
\firstSheetMusic
\header {
title = \firstTitle
}
\layout {}
}
}
\bookpart {
\tocItem \markup { \secondTitle }
\score {
\secondSheetMusic
\header {
title = \secondTitle
}
\layout {}
}
}
}
HTH,
Chris
--
Chris Maden, text nerd <URL: http://crism.maden.org/ >
LIVE FREE: vote for Gary Johnson, Libertarian for President.
<URL: http://garyjohnson2012.com/ > <URL: http://lp.org/ >
GnuPG fingerprint: DB08 CF6C 2583 7F55 3BE9 A210 4A51 DBAC 5C5C 3D5E
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user