[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: page breaking (again)
From: |
Joe Neeman |
Subject: |
Re: page breaking (again) |
Date: |
Mon, 07 Aug 2006 14:06:11 +1000 |
On Mon, 2006-08-07 at 00:31 +0200, Han-Wen Nienhuys wrote:
> Joe Neeman wrote:
> > Here is my latest patch to add a new page-breaker. This actually adds 2
> > page breakers now:
>
> > Both page-breakers can be tuned with the (book-wide) paper block
> > variables "page-spacing-weight" (default 1.0) which specifies the
> > importance of good page spacing relative to line spacing and
> > "blank-last-page-force" (default 0) which specifies the penalty for
> > ending the piece on a left-hand page. ly:page-turn-breaking will also
> > consider leaving blank pages mid-score. The penalty for these pages can
> > be tuned with "blank-page-force" (default 10).
> >
> > The new files are attached in a tar archive (I cc to Han-Wen just in
> > case the list strips it). There are 13 of them, so I thought it would be
> > easier.
>
> Looks good. Please apply, after fixing the following issues.
> for (vsize k = 0; k < lines_per_page[i] && systems != SCM_EOL;
> k++, systems = scm_cdr(systems))
> lines = scm_cons (scm_car (systems), lines);
>
> this should be a generic Scheme function.
I would have thought so, but I can't find anything in R5RS. I can do it
with list-tail, length and reverse, but I don't know if it's any neater:
int len = scm_length (systems);
lines = scm_reverse (scm_c_list_tail (scm_reverse (systems),
len - lines_per_page[i]));
systems = scm_c_list_tail (systems, lines_per_page[i]);