* [NTG-context] “breaking news” @ 2024-09-30 16:22 Henning Hraban Ramm 2024-09-30 18:14 ` [NTG-context] " Hans Hagen 0 siblings, 1 reply; 6+ messages in thread From: Henning Hraban Ramm @ 2024-09-30 16:22 UTC (permalink / raw) To: mailing list for ConTeXt users 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. Where there changes? Hraban ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: “breaking news” 2024-09-30 16:22 [NTG-context] “breaking news” Henning Hraban Ramm @ 2024-09-30 18:14 ` Hans Hagen 2024-09-30 20:45 ` Henning Hraban Ramm 0 siblings, 1 reply; 6+ messages in thread From: Hans Hagen @ 2024-09-30 18:14 UTC (permalink / raw) To: ntg-context 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. > > Where 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). 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: “breaking news” 2024-09-30 18:14 ` [NTG-context] " Hans Hagen @ 2024-09-30 20:45 ` Henning Hraban Ramm 2024-09-30 22:17 ` Hans Hagen 0 siblings, 1 reply; 6+ messages in thread From: Henning Hraban Ramm @ 2024-09-30 20:45 UTC (permalink / raw) To: ntg-context 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. 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. 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. ;) Hraban ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: “breaking news” 2024-09-30 20:45 ` Henning Hraban Ramm @ 2024-09-30 22:17 ` Hans Hagen 2024-10-01 19:16 ` Henning Hraban Ramm 0 siblings, 1 reply; 6+ messages in thread From: Hans Hagen @ 2024-09-30 22:17 UTC (permalink / raw) To: ntg-context 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: “breaking news” 2024-09-30 22:17 ` Hans Hagen @ 2024-10-01 19:16 ` Henning Hraban Ramm 2024-10-01 19:31 ` Hans Hagen 0 siblings, 1 reply; 6+ messages in thread From: Henning Hraban Ramm @ 2024-10-01 19:16 UTC (permalink / raw) To: ntg-context Am 01.10.24 um 00:17 schrieb Hans Hagen: >> 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) I have \setpenalties\widowpenalties{2}{8000} \setpenalties\clubpenalties{2}{10000} Does this make sense? While I saw in your demonstrations that it’s possible to set different penalties per line, I never tried. Otherwise, I found out the easiest solution is a \vbox, VZ does the rest. Should have thought of that earlier, would have saved me a few hours. > 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. Ok, I’m looking forward to it. > 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. Great! >> 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 Yes, you demonstrated several times. I just didn’t dare or was too lazy to delve into the “plain TeX” syntax to try. > (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: demanding wrt where to break). If it also works with code examples, It’ll be great for the ConTeXt journal and my book. Hraban ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: “breaking news” 2024-10-01 19:16 ` Henning Hraban Ramm @ 2024-10-01 19:31 ` Hans Hagen 0 siblings, 0 replies; 6+ messages in thread From: Hans Hagen @ 2024-10-01 19:31 UTC (permalink / raw) To: ntg-context On 10/1/2024 9:16 PM, Henning Hraban Ramm wrote: > Am 01.10.24 um 00:17 schrieb Hans Hagen: >>> 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) > > I have > \setpenalties\widowpenalties{2}{8000} > \setpenalties\clubpenalties{2}{10000} > > Does this make sense? While I saw in your demonstrations that it’s > possible to set different penalties per line, I never tried. That's kind of high: a four line paragraph now gets line 10000 line 18000 line 8000 line > Otherwise, I found out the easiest solution is a \vbox, VZ does the > rest. Should have thought of that earlier, would have saved me a few hours. often pretty bad spacing (you can also start a paragraph with \linepanelty10000) 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-10-01 19:35 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-09-30 16:22 [NTG-context] “breaking news” Henning Hraban Ramm 2024-09-30 18:14 ` [NTG-context] " Hans Hagen 2024-09-30 20:45 ` Henning Hraban Ramm 2024-09-30 22:17 ` Hans Hagen 2024-10-01 19:16 ` Henning Hraban Ramm 2024-10-01 19:31 ` Hans Hagen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).