lilypond-user
[Top][All Lists]
Advanced

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

Re: ly:one-page-breaking (was: ly:one-line-breaking)


From: Paul Morris
Subject: Re: ly:one-page-breaking (was: ly:one-line-breaking)
Date: Tue, 19 Jan 2016 10:03:53 -0500

> On Jan 19, 2016, at 4:02 AM, Richard Shann <address@hidden> wrote:
> 
> That's great news! For the application to Denemo taglines and footnotes
> are not wanted anyway as it is for creating a score to play from
> on-screen.
> I guess it will be some time before this code gets into a release?

It depends on whether or not this is acceptable with the current known issues.  
(Some other pressing demands mean that I need to take a break from LilyPond 
work for some months, so I won’t have time to further improve upon this any 
time soon.)  In its current state it would already work for many of the more 
obvious use cases – like Denemo’s on-screen score or producing image files 
destined for other documents.

Should I put this up for code review or should we discuss this on the dev list? 
 …or in an issue tracker?


>> The approach is to temporarily set the page-height to the largest size 
>> possible, 
> 
> What is the largest size possible? I tried playing around with some
> sizes, and some didn't work …

I tried setting it to positive infinity, but that gave a programming error when 
there was a tagline.  I traced the error to Stencil::translate, which throws 
the error for any value greater than 1e6.  So I used 1e6 as the temporary 
page-height and everything is working fine.


>> do the line breaking and page layout for that page height, then get the 
>> vertical position on the page and the height of the lowest system (or top 
>> level markup), and use that to calculate and then set the final page height 
>> so that it fits the content of the page.
> 
> A crude version of this is what will be in the impending Denemo release
> - Denemo creates the SVG output and counts the pages and then re-runs
> LilyPond at a larger page size.

I think that should work pretty well for your use case.  I considered a similar 
approach before I worked out the current one.

-Paul





reply via email to

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