Export to GitHub

lilypond - issue #1240

Music overflows page: #'((space . N) (stretchability . 0)) and nothing more with spacings


Posted on Aug 25, 2010 by Happy Bird

% ------------------8< ---------------------------- \version "2.13.31"

\score { \context ChoirStaff << \new Staff \with { \override VerticalAxisGroup #'next-staff-spacing = #'((space . 18) (stretchability . 0)) } << \new Voice { \repeat "unfold" 42 { c''4 c'' c'' c'' } } >> % \new Staff \with { \override VerticalAxisGroup #'next-staff-spacing = #'((space . 18) (stretchability . 0)) } << \new Voice { \repeat "unfold" 42 { c''4 c'' c'' c'' } } >> % \new Staff \with { \override VerticalAxisGroup #'next-staff-spacing = #'((space . 18) (stretchability . 0)) } << \new Voice { \clef "treble_8" \repeat "unfold" 42 { c'4 c' c' c' } } >> \new Staff << \new Voice { \clef "bass" \repeat "unfold" 42 { c4 c c c } } >> >> } % ------------------8< ----------------------------

This leads to: % ------------------8< ---------------------------- $ LANG=C lilypond test.ly GNU LilyPond 2.13.31 Processing ./test.ly' Parsing... Interpreting music... [8][16][24][32][40] Preprocessing graphical objects... Finding the ideal number of pages... Fitting music on 1 or 2 pages... Drawing systems... warning: couldn't fit music on page: overflow is 147.300236 Layout output totest.ps'... Converting to `./test.pdf'... success: Compilation successfully completed % ------------------8< ----------------------------

Most recent "affected" version is 2.13.21, i have not tested with earlier versions, sorry.

Overflow value, obviously, depends on music (180 for page 2 and 350 for page 3 in real score).

Actually 2.12 allows to specify 'minimum-Y-extent for staves, so in some sense this is a regression.

But "i'm unsure", so "set it to Medium".

Please, take a look and reassign labels, THANKS.

Comment #1

Posted on Aug 25, 2010 by Happy Bird

Actually 2.12 allows to specify 'minimum-Y-extent for staves Sorry, 2.13 allows this as well, here are some workarounds, surely. I didn't mention that it's impossible with 2.13 .)

Comment #2

Posted on Aug 25, 2010 by Helpful Kangaroo

'((space . N) (stretchability . 0)) is effectively the same as setting alignment-distances (i.e., fixed space between staves).

Here are two simpler snippets, both demonstrating the same problem (and identical overflows):

<< \new Staff \with { \override VerticalAxisGroup #'next-staff-spacing = #'((space . 20) (stretchability . 0)) } \relative c'' { \repeat "unfold" 42 { c4 c c c } }
\new Staff \relative c' { \repeat "unfold" 42 { c4 c c c } }

>

\score { << \relative c'' { \repeat "unfold" 42 { c4 c c c } } \relative c' { \repeat "unfold" 42 { c4 c c c } }

\layout { \context { \Score \override NonMusicalPaperColumn #'line-break-system-details = #'((alignment-distances . (20))) } } }

-> warning: couldn't fit music on page: overflow is 11.898871

The extent estimate is far worse using alignment-distances though.

Attachments

Comment #3

Posted on Aug 28, 2010 by Happy Bird

Patch here: http://codereview.appspot.com/2065041/

There are some pretty ugly hacks (like creating a dummy Paper_column in System::get_pure_bound in order to do a binary search on all paper columns), so I'm hoping someone has better suggestions...

Comment #4

Posted on Sep 21, 2010 by Happy Hippo

(No comment was entered for this change.)

Comment #5

Posted on Sep 28, 2010 by Quick Ox

Maybe this was known, but piano staves can overflow the page with no overrides -- for example:

% In 2.13.24 this overflows the page by 41.4 % (two and one-half systems off the bottom of the page) % 2.12.3 sets this on two pages % { << \new Staff{ \clef bass \repeat unfold 12 {s1 \break} } \new Staff { \clef bass \repeat unfold 12 {s1 \break} } >> }

Comment #6

Posted on Sep 29, 2010 by Happy Rhino

Thanks for the example, Keith! I'm bumping this up to Critical.

Comment #7

Posted on Oct 25, 2010 by Happy Bird

The example with the piano staves is a different bug, which is now fixed in git. The original bug is fixed too.

Comment #8

Posted on Oct 26, 2010 by Helpful Bear

Thanks Joe!

Status: Verified

Labels:
Type-Defect Priority-Critical Patch fixed_2_13_37