On 9/30/2024 10:45 PM, Henning Hraban Ramm wrote:
Am 30.09.24 um 20:14 schrieb Hans Hagen:
On 9/30/2024 6:22 PM, Henning Hraban Ramm wrote:
Hi,
since the latest update, I have differences in line/paragraph/page breaking. I should have expected that vz and granular aren’t stable yet, but maybe it’s a problem in my setup and not even related to that update.

* widow and orphan penalties seem to work different, preferring empty lines over single lines.
* looseness doesn’t seem to work any more.

Were there changes?

Not intentionally. We're bringing widow and club penalties stepwise under \setupalign control so maybe something was forgotten. For instance, \widowpenalty and \widowpenalties are competing and the next upload will deal with that (first we need to test some complex documents).

It’s probably something I changed and can’t find it in my git log.

Generally it seems to be a bit better than before, needs less trickery, but it’s different enough that I had to start work on my current book from the beginning.

It’s a novel of ~650 pages with a big range of paragraph lengths (some dialogues with short lines as well as paragraphs that span pages). “Of course” you often get a 3-line paragraph over a page break – it’s hard to avoid widows and orphans.

depends .. three liners can be made to work in fact one should then use \widowpenalties and \clubpenalties with a high value for the first two entries (and maybe disable them to overlap)

here is a teaser:

\permanent \specificationdef \lesswidowpenalties \widowpenalties
\plusthree options \numexpr\largestspecificationoptioncode+\doublespecificationoptioncode\relax
    \plusfivethousand    \plusseventyfivehundred
    \plustwohundredfifty \plusfivehundred
    \zerocount           \zerocount
\relax

\permanent \specificationdef \lessclubpenalties \clubpenalties
\plusthree options \numexpr\largestspecificationoptioncode+\doublespecificationoptioncode\relax
    \plusfivethousand    \plusseventyfivehundred
    \plustwohundredfifty \plusfivehundred
    \zerocount           \zerocount
\relax

used in upcoming new \setupalign options lesswidows and lessclubs because the above is not something that users should nother about.

These set high penalties for the first and last line, somewhat lower for the ones following and preceding.

We also have strictwidows and strictclubs that do your three thing.

In case you wonder about the 'double' ... we can have different values for left and right pages because (we think that) on a spread a widow or club is less of a problem.

Fwiw, much of this of this already has been there for a while (as discussed at the meeting) but we're now integrating it into \setupalign and making sure that the overhead can be neglected.

I already do without grid, VZ works, HZ also should (I didn’t check with a tracker, and it’s not so extreme that I’d see it), but it’s not enough to automatically avoid single lines.

Indeed, so the stricter penalties combine well with vz

If a paragraph starts at page breaks, I can tweak the layout like
\page\setuplayout[narrow]. I defined narrow, normal, and wide versions with 1 mm difference. Before I didn’t know you can call named layouts like this, also relative page numbers like \definelayout[+1][wide] are nice.

If that’s not enough, I’m using \letterspacing with tiny ± values.

So much about dirty tricks. ;)

parpasses will permit you to have steps with different solutions so expansion can be delayed till it is really needed; interesting is that even with (say 8) par passes, most time the solution is found in the first (no hyphenation with 100 tolerance) or second pass (hyphenation with 200 tolerance) and the number last pass can be counted on one hand

(there are options to mark pararaphs and see what pass succeeded as well as overviews in the logs so that one can go to problematic places but that's for Keith to experiment with)

We're really surprised how well this all works on complex content (say very math intense, read: demanmding wrt where to break).

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to