Hi:

No line such as "Widow/orphan detected. Attempting to delete".

I see interleaved new groups with the same line always repeating a warning message throughout the whole file. In short, there are 613 new lines with the message "luatex warning > tex: left parfill skip is gone". But I didn't give it any importance, because I interpreted that they could be inherent to the module.

I can see "modules         > 'lua-widow-control' is loaded".

But, luckily, I can also see this:

open source     > level 2, order 4, name '/opt/luametatex/texmf-modules/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl' resolvers       > lua > loading file '/opt/luametatex/texmf-modules/tex/luatex/lua-widow-control/lua-widow-control.lua' succeeded close source    > level 2, order 4, name '/opt/luametatex/texmf-modules/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl'
module          > lua-widow-control > Already enabled


On the other hand, the distribution and size of my paragraphs take great care that their "design" optimises the module's goodness, except, of course, for the first pages of each of the nine dummy text chapters (they start at a third of a page). But it is very curious that, even so, only the two orphan lines I mentioned, and only two of the five widows relate to two or three of those "supposedly problematic" first chapter pages (as I said, nine in total). And the case of the broken scripts is even stranger: only two of the six breakages concern a couple of those early chapter pages.

I will go over the lua-widow-control.pdf document once more in case there is a tiny detail I am missing, but I think, if I keep going at this pace, I will end up learning it by heart.

Well, joking aside, thanks again for your advice, Max.

Edu.

El 26/4/22 a las 4:42, Max Chernoff escribió:
On 2022-04-25 6:51 p.m., Eduardo Bohoyo wrote:
First things first.  I want to acknowledge and thank you for the tough mission that surely involves maintaining this module for the benefit of the TeX community and, most especially, for LMTX in particular, due to the very reasons you have just explained.

Well thanks :) These days I write most of my documents in LMTX, so the LMTX
support is pretty self-serving -- I'm admittedly surprised that there's
another lwc + LMTX user.

Regarding your remarks, you are right in your assumptions: I didn't have the required lua file installed in its corresponding folder. That's what I was missing, and, logically, what made my compilation crash.

Yeah, it's a pretty easy mistake to make. For Knuth TeX, shared files go
in texmf/tex/generic and Plain-specific files go in texmf/tex/plain, but
with LuaTeX there's just texmf/tex/luatex so it gets a little confusing.

Now I finally get the pdf. But unfortunately, this "new" pdf is the same with the module uncommented as when I had it commented. There is no difference at all. And you're right: even context --make doesn't solve the problem. To give you an idea, although my dummy document has 78 pages, only 55 can really be said to be dummy text that can benefit from the module. Well, only in those 55 pages I have 2 orphans, 5 widows and 6 broken hyphens.

So the first step here is to check the log file. If you see lines like

    module          > lua-widow-control > Widow/orphan detected. Attempting to remove.     module          > lua-widow-control > Widow/Orphan NOT removed on page X.

then that means that lwc found a widow/orphan, but gave up. This usually
only happens if the page has only really short paragraphs, but it can also happen if there aren't any paragraphs that both start and finish on the page. I've got some neat graphs for this (see the upcoming TUGboat issue), but with
default settings this should happen for much less than 10% of potential
widows/orphans, so it seems unlikely that this is happening for every page.

If this actually is the issue, then you can try raising the "emergencystretch" value in "\setuplwc", but that's probably going to give terrible results. The real
solution is to rewrite something, but that should usually be pretty rare.

---

If you see lines like

    module          > lua-widow-control > Widow/orphan detected. Attempting to remove.     module          > lua-widow-control > Widow/orphan successfully removed at paragraph X on page Y.

but the widows/orphans weren't actually removed, then something really weird is going on and definitely means that there's a bug in lwc. Rerun the document with

    \setuplwc[debug=true]

immediately after "\usemodule[lua-widow-control]" and either reply with the log
or post a new issue on the lwc GitHub.

---

If you only see

    modules         > 'lua-widow-control' is loaded

but not any other lines mentioning lwc, then something weird is going on, and lwc is loaded but not enabled. If this is the case, same as last time: enable
debug mode and reply with the log.

---

If you don't see

    modules         > 'lua-widow-control' is loaded

at all, then you're not actually loading lwc. This probably means that ConTeXt can't find the file, there should hopefully be clues somewhere in the log file.

Thanks again for your work and yours observations.

No problem; glad to help.

-- Max
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to