Re: [NTG-context] lua-widow-control module error in LMTX
On 2022-04-27 3:59 p.m., Eduardo Bohoyo wrote:
When I uncomment grid=yes in my \setuplayout, lwc makes its real appearance on the scene. So it looks like lwc was broken with grid snapping. This surprised me -- I originally wrote lwc *specifically* to use with grid snapping -- but it looks like I quickly forgot about that goal and never actually tested it with grids.
I suppose that in other documents than mine, i.e. less complex, this performance would be a success. But in my file it is, considering my current aesthetic requirements, a failure. This is because for me grid=yes is a non-negotiable part of my code.
I _think_ that I've fixed it now. Can you try the beta version at https://github.com/gucci-on-fleek/lua-widow-control/releases/tag/release-47f... please? Hopefully this solves the issue.
Do you want the new pdf with lwc actually acting on my file? Then you can get a better idea of what I mean by the end of some pages when I comment grid=yes (apart from the mischief that happens with the horizontal spaces in some paragraphs of the bibliographic section).
Or, if you prefer, and you need more feedback, I can send you my current code to use it as a test bench for " daring " texts.
I was able to reproduce the issue just by adding \setuplayout[grid=yes] to my "standard" test files, so I shouldn't need anything else, provided that the above beta actually fixes anything. If there are still lingering issues, then having the TeX source would likely simplify things on my end. -- Max
Am 28.04.22 um 09:25 schrieb Max Chernoff via ntg-context:
I _think_ that I've fixed it now. Can you try the beta version at
https://github.com/gucci-on-fleek/lua-widow-control/releases/tag/release-47f...
please? Hopefully this solves the issue.
Hi Max, thank you for this module that I didn’t know. I’m afraid the above release introduced a bug; while the offical release ran through, I now get: module > lua-widow-control > Widow/orphan detected. Attempting to remove. lua error > lua error on line 112 in file de/c_intro.tex: callback error: ...local/tex/luatex/lua-widow-control/lua-widow-control.lua:510: attempt to perform arithmetic on a nil value (field 'height') stack traceback: ...local/tex/luatex/lua-widow-control/lua-widow-control.lua:510: in function <...local/tex/luatex/lua-widow-control/lua-widow-control.lua:360> My book is not in grid mode. Hraban
On 2022-04-28 3:30 a.m., Henning Hraban Ramm wrote:
I’m afraid the above release introduced a bug; while the offical release ran through, I now get:
module > lua-widow-control > Widow/orphan detected. Attempting to remove. lua error > lua error on line 112 in file de/c_intro.tex:
callback error: ...local/tex/luatex/lua-widow-control/lua-widow-control.lua:510: attempt to perform arithmetic on a nil value (field 'height') stack traceback: ...local/tex/luatex/lua-widow-control/lua-widow-control.lua:510: in function <...local/tex/luatex/lua-widow-control/lua-widow-control.lua:360>
On 2022-04-28 4:54 a.m., Eduardo Bohoyo wrote:
Here testing that beta version.
As you know, my book is in grid mode, but I get the same error message as Hraban when the compilation crashes.
However, when I comment grid again in my document, it does compile the pdf.
Well that's why it was a beta :) Looks like I made some questionable assumptions about the order of the hlist/baselineskip nodes, so the module completely broke with things as simple as section headings. Hopefully this new beta should fix things: https://github.com/gucci-on-fleek/lua-widow-control/releases/tag/release-5e2... Grid snapping is a little peculiar, so let me know if you find any more bugs. And thanks for the bug reports. -- Max
Now, I don't have any widows in my document, and I only count 2 broken hyphens. However, I think this is at the expense of the shenanigans the module has "perpetrated" elsewhere, because, apart from the crazy horizontal spacing of some paragraph in the bibliography, the module lies to me in the log. Yes, the log output fools me. There is no "Widow/Orphan NOT removed". But this is not true: To the 2 broken hyphens must be added 4 orphan lines that the log claims to have resolved. But what worries me the most is that it counts as successful one occasion with an empty line, another occasion with two empty lines in a row, and 4 occasions with no less than 7 empty lines in a row at the beginning of a chapter. I don't know if this information can provide any more clues to adjust the module for the grid mode, but I hope it helps. Greetings, Edu. El 29/4/22 a las 2:38, Max Chernoff escribió:
On 2022-04-28 3:30 a.m., Henning Hraban Ramm wrote:
I’m afraid the above release introduced a bug; while the offical release ran through, I now get:
module > lua-widow-control > Widow/orphan detected. Attempting to remove. lua error > lua error on line 112 in file de/c_intro.tex:
callback error: ...local/tex/luatex/lua-widow-control/lua-widow-control.lua:510: attempt to perform arithmetic on a nil value (field 'height') stack traceback: ...local/tex/luatex/lua-widow-control/lua-widow-control.lua:510: in function <...local/tex/luatex/lua-widow-control/lua-widow-control.lua:360>
On 2022-04-28 4:54 a.m., Eduardo Bohoyo wrote:
Here testing that beta version.
As you know, my book is in grid mode, but I get the same error message as Hraban when the compilation crashes.
However, when I comment grid again in my document, it does compile the pdf.
Well that's why it was a beta :) Looks like I made some questionable assumptions about the order of the hlist/baselineskip nodes, so the module completely broke with things as simple as section headings.
Hopefully this new beta should fix things:
https://github.com/gucci-on-fleek/lua-widow-control/releases/tag/release-5e2...
Grid snapping is a little peculiar, so let me know if you find any more bugs.
And thanks for the bug reports. -- Max
Hi Max: Here testing that beta version. As you know, my book is in grid mode, but I get the same error message as Hraban when the compilation crashes. However, when I comment grid again in my document, it does compile the pdf. Thanks, Edu El 28/4/22 a las 9:25, Max Chernoff escribió:
On 2022-04-27 3:59 p.m., Eduardo Bohoyo wrote:
When I uncomment grid=yes in my \setuplayout, lwc makes its real appearance on the scene. So it looks like lwc was broken with grid snapping. This surprised me -- I originally wrote lwc *specifically* to use with grid snapping -- but it looks like I quickly forgot about that goal and never actually tested it with grids.
I suppose that in other documents than mine, i.e. less complex, this performance would be a success. But in my file it is, considering my current aesthetic requirements, a failure. This is because for me grid=yes is a non-negotiable part of my code.
I _think_ that I've fixed it now. Can you try the beta version at
https://github.com/gucci-on-fleek/lua-widow-control/releases/tag/release-47f...
please? Hopefully this solves the issue.
Do you want the new pdf with lwc actually acting on my file? Then you can get a better idea of what I mean by the end of some pages when I comment grid=yes (apart from the mischief that happens with the horizontal spaces in some paragraphs of the bibliographic section).
Or, if you prefer, and you need more feedback, I can send you my current code to use it as a test bench for " daring " texts.
I was able to reproduce the issue just by adding
\setuplayout[grid=yes]
to my "standard" test files, so I shouldn't need anything else, provided that the above beta actually fixes anything. If there are still lingering issues, then having the TeX source would likely simplify things on my end.
-- Max
Am 28.04.22 um 12:54 schrieb Eduardo Bohoyo via ntg-context:
Hi Max:
Here testing that beta version.
As you know, my book is in grid mode, but I get the same error message as Hraban when the compilation crashes.
However, when I comment grid again in my document, it does compile the pdf.
Oops, my book *was* accidentally in grid mode. It made no sense. No wonder I had troubles with spacing. But I get the error with your beta release also without grid mode. Hraban
participants (3)
-
Eduardo Bohoyo
-
Henning Hraban Ramm
-
Max Chernoff