Re: Forcing pagebreaks in multi-score book

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Forcing pagebreaks in multi-score book

Mats Bengtsson-6
One hackers solution would be to include

\score{
   ...
   \header{
     ...
     breakbefore = \possiblebreak
   }
}

in each score file. In the top level file doing the includes,
you can then define

possiblebreak=##f

at the top of the file and

possiblebreak=##t

before you include a file where you want the page break.

    /Mats

Your Name wrote:

> Lilypond 2.5.25 Windows.
>
> Excellent that we finally have a 2.5 version for Windows.
> I am starting to assemble a book whilch will be made up of
> many separate files put together like this:
>
> \book {
>   \header {
>     title = "Book title"
>   }
>   \score { \include "file1" }
>   \score { \include "file2" }
>   ...
> }
>
> And where each file contains something like
> \header {
>   title = "Score title"
> }
> { music }
>
> Now, I need a way to force a page preak between any of the scores.
> Since the included files can be put together in any order for different
> books, I cannot use breakbefore = ##t in the file header fields.
>
> At first I thought I might put a
> \score { \header { breakbefore = ##t } {} }
> but that doesn't work. \score {{ \pageBreak }} doesn't work either.
> I need something that generates only the page break, and no score
> lines or
> anything.
>

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463
         Fax:   (+46) 8 790 7260
        Email: [hidden email]
        WWW: http://www.s3.kth.se/~mabe
=============================================


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

RE: Forcing pagebreaks in multi-score book

Sven Axelsson
> From: Mats Bengtsson [mailto:[hidden email]]
> Subject: Re: Forcing pagebreaks in multi-score book
>
> One hackers solution would be to include
>
> \score{
>    ...
>    \header{
>      ...
>      breakbefore = \possiblebreak
>    }
> }
>
> in each score file. In the top level file doing the includes,
> you can then define
>
> possiblebreak=##f
>
> at the top of the file and
>
> possiblebreak=##t
>
> before you include a file where you want the page break.
>
>     /Mats

Yes, I thought of that. But now after trying it, I see that it doesn't
work. Or perhaps I don't get where to set the variable to true. I
tried both

\book {
  ...
  \score { possiblebreak = ##t \include ... }
  ...
}

and

\book {
  ...
  possiblebreak = ##t
  \score { \include ... }
  possiblebreak = ##f
  ...
}

but both variants gives a syntax error "unexpected STRING".

--
Sven Axelsson


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Forcing pagebreaks in multi-score book

Mats Bengtsson-6
If I were to do something like this, I would probably put the
full \score{...} in the included file. This was also the structure
I had in mind when writing the previous answer. However now that
I read your question more carefully, I notice that you want to
keep the \score within the main file (for some reasone), which
actually makes things much simpler. It should work to just do:

   \score { \include "file1" \header{breakbefore=##f}}
   \score { \include "file2" \header{breakbefore=##t}}
   ...


    /Mats

Sven Axelsson wrote:

>>From: Mats Bengtsson [mailto:[hidden email]]
>>Subject: Re: Forcing pagebreaks in multi-score book
>>
>>One hackers solution would be to include
>>
>>\score{
>>   ...
>>   \header{
>>     ...
>>     breakbefore = \possiblebreak
>>   }
>>}
>>
>>in each score file. In the top level file doing the includes,
>>you can then define
>>
>>possiblebreak=##f
>>
>>at the top of the file and
>>
>>possiblebreak=##t
>>
>>before you include a file where you want the page break.
>>
>>    /Mats
>
>
> Yes, I thought of that. But now after trying it, I see that it doesn't
> work. Or perhaps I don't get where to set the variable to true. I
> tried both
>
> \book {
>   ...
>   \score { possiblebreak = ##t \include ... }
>   ...
> }
>
> and
>
> \book {
>   ...
>   possiblebreak = ##t
>   \score { \include ... }
>   possiblebreak = ##f
>   ...
> }
>
> but both variants gives a syntax error "unexpected STRING".
>

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463
         Fax:   (+46) 8 790 7260
        Email: [hidden email]
        WWW: http://www.s3.kth.se/~mabe
=============================================


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

RE: Forcing pagebreaks in multi-score book

Sven Axelsson
In reply to this post by Mats Bengtsson-6
> From: Mats Bengtsson [mailto:[hidden email]]
> Subject: Re: Forcing pagebreaks in multi-score book
>
> If I were to do something like this, I would probably put the
> full \score{...} in the included file. This was also the structure
> I had in mind when writing the previous answer. However now that
> I read your question more carefully, I notice that you want to
> keep the \score within the main file (for some reasone), which
> actually makes things much simpler. It should work to just do:
>
>    \score { \include "file1" \header{breakbefore=##f}}
>    \score { \include "file2" \header{breakbefore=##t}}
>    ...

Close, but no cigar. That was also something I tried, but that will
throw away the header fields from the included file. If there is some
way to merge the two \header definitions that would be the best
solution.

--
Sven Axelsson


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Forcing pagebreaks in multi-score book

Mats Bengtsson-6
Then my original proposal with,
   possiblebreak = ##t
   \score { \include ... }
   possiblebreak = ##f
should work just fine. Where in the file do you get the syntax error?

    /Mats

Sven Axelsson wrote:

>>From: Mats Bengtsson [mailto:[hidden email]]
>>Subject: Re: Forcing pagebreaks in multi-score book
>>
>>If I were to do something like this, I would probably put the
>>full \score{...} in the included file. This was also the structure
>>I had in mind when writing the previous answer. However now that
>>I read your question more carefully, I notice that you want to
>>keep the \score within the main file (for some reasone), which
>>actually makes things much simpler. It should work to just do:
>>
>>   \score { \include "file1" \header{breakbefore=##f}}
>>   \score { \include "file2" \header{breakbefore=##t}}
>>   ...
>
>
> Close, but no cigar. That was also something I tried, but that will
> throw away the header fields from the included file. If there is some
> way to merge the two \header definitions that would be the best
> solution.
>

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463
         Fax:   (+46) 8 790 7260
        Email: [hidden email]
        WWW: http://www.s3.kth.se/~mabe
=============================================


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Forcing pagebreaks in multi-score book

Sven Axelsson
In reply to this post by Mats Bengtsson-6
> From: Mats Bengtsson [mailto:[hidden email]]
>
> Then my original proposal with,
>    possiblebreak = ##t
>    \score { \include ... }
>    possiblebreak = ##f
> should work just fine. Where in the file do you get the syntax error?

At the point of possiblebreak = ##t. Note that this is inside a \book
block.

--
Sven Axelsson


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user