lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

page break hack


From: Sven Axelsson
Subject: page break hack
Date: Mon, 10 Oct 2005 13:08:58 +0200

\version "2.7.11"

Having taken a look at Nicholas Sceaux's terrific opera scores, I found his pageBreakHack function. This function inserts an empty score with \header {breakbefore = ##t} into the music, forcing a pagebreak at that point. It looks like this:

pageBreakHack = #(def-music-function (parser location) ()
                   (ly:parser-parse-string (ly:clone-parser parser) "
\\score {
  { s4 }
  \\header { breakbefore = ##t piece = \" \" }
  \\layout{
    \\context { \\Staff
               \\remove Time_signature_engraver
               \\remove Key_engraver
               \\remove Clef_engraver
               \\remove Staff_symbol_engraver
             }
  }
}
")
                   (make-music 'SequentialMusic))

This is great, except for that it still takes up vertical space. I thought I could cleverly change that to

pageBreakHack = #(def-music-function (parser location) ()
                   (ly:parser-parse-string (ly:clone-parser parser) "
\\score {
  \\new Devnull { s4 }
  \\header { breakbefore = ##t piece = \" \" }
}
")
                   (make-music 'SequentialMusic))

seeing that the Devnull context discards all it's contents. But the effect is that it creates an empty page and then puts everything on top of each other at the next page. Is this a bug, or am I missing the point of Devnull?

Now I am trying to find the correct properties to tweak to ge the inserted score from the original code to take up zero vertical space, but I haven't gotten it right yet. Any hints?

--
Sven Axelsson
reply via email to

[Prev in Thread] Current Thread [Next in Thread]