Hi Leszek,

Am 15.10.2020 um 15:13 schrieb lilypond-user-requ...@gnu.org:
I would like to put pagebreaks in specific places in
the full score, so that they would not operate when parts are compiled.

I can confirm all the replies that recommend include files and invisible
voices. (I truly should learn how to use the edition engraver, but still
didn't find the time.)

This is what I've been using so far:

% ---------- definitions.ily ----------
\version "2.20.0"

violin_voice = { c'1 d' e' f' g' a' b' }

cello_voice = { \clef bass  c1 d e f g a b }

break_voice = {  % "invisible voice"
  s1 s  \bar "||" \mark "A" s s
  \pb
  s s s \bar "|."
}
% -------------------------------------

The invisible voice also cares about bar lines, rehearsal marks etc.
\pb still needs to be defined. For the score, it's "\pageBreak" while
for the parts, it simply does nothing:

% ---------- score.ly ----------
\version "2.20.0"
pb = \pageBreak
\include "definitions.ily"

\score {
  <<
    \new Staff << \violin_voice \break_voice >>
    \new Staff << \cello_voice \break_voice >>
  >>
}
% ------------------------------

% ---------- parts.ly ----------
\version "2.20.0"
pb = {} % does nothing
\include "definitions.ily"

\markup "Violin part:"
\score {
  \new Staff << \violin_voice \break_voice >>
}

\markup "Cello part:"
\score {
  \new Staff << \cello_voice \break_voice >>
}
% ------------------------------

...not perfect, but simple.  :-)
Hope this helps.

Cheers,
Klaus

Reply via email to