[Top][All Lists]

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

Re: [patch] breakable markups

From: Joe Neeman
Subject: Re: [patch] breakable markups
Date: Mon, 4 Jun 2007 18:19:55 +1000
User-agent: KMail/1.9.5

On Sunday 03 June 2007 23:01, Nicolas Sceaux wrote:
> Nicolas Sceaux <address@hidden> writes:
> > Hi,
> >
> > While thinking about an automatic way to build tables of contents (with
> > a few \header variables, a \table-of-contents command, et voilĂ ), I
> > realized that an other problem needs to be solved first.  Indeed, if the
> > table of contents is too long for a single page, then it should be split
> > to fill several pages.  Hence the need of breakable markups.
> Here is a patch implementing this feature.

> Some issues, related to page breaking and spacing:

I should be finished with this semester's exams in a couple weeks and I can 
have a look at things then. If you're not that patient, however, or you'd 
rather do them yourself, I've suggested a few things below.

>  1. on the regression test included in the patch, the output looks like:
>      ______   ______   ______
>     |     1| |2     | |     3|
>     |blabla| |blabla| |blabla|
>     |blabla| |blabla| |      |
>     |blabla| |blabla| |      |   (with ragged-bottom=##t)
>     |
>     |      | |      | |taglin|
>      ------   ------   ------
>     That is, although the text could fit on two pages, three pages are
>     created, with a lot of white space left at their bottom.

I suspect that this is because Line_details (Prob*) (in 
constrained-breaking.hh) makes up values for certain properties instead of 
reading them from properties of the Prob*. If that doesn't fix it, have a 
look at the force-calculating routines in Page_spacer::calc_subproblem and 
try to see why it is prefering solutions with more pages.

>  2. setting the next-space or next-padding properties to zero results to
>     wrong spacing. The stencils should just be stacked with no extra
>     space between them.

The relevant function is space-systems in layout-page-layout.scm, but apart 
from that, I don't know.

>  3. setting next-padding and next-space to almost zero make the lines
>     stick one to the other only if there is an other object (like a
>     score) on the page. Otherwise, the lines are spread over the
>     page. This is not consistent.
>      ______     ______
>     |blabla|   |blabla|
>     |blabla|   |      |
>     |blabla|   |      |
>     |
>     |      |   |blabla|   <--- next-space and next-spacing almost 0
>     |      |   |
>     |      |   |      |        between all these blablas
>     |
>     |system|   |blabla|
>      ------     ------

If each of the "blabla" lines has a very stiff vertical spring and 
the "system" line has a relatively loose vertical spring then it would 
explain what you are seeing. The first page has a relatively small force 
which hardly affects the blablah springs but has a big effect on the system 
spring. The second page requires a very strong force to fit the lines in at 
all, so it stretches out the stiff blabla springs. I'm not sure how you would 
fix it,though.

reply via email to

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