-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rare bug in lua-widow-control
with bigfoot
#44
Comments
(Sorry for the delay) Here's a more complicated test file that forces lua-widow-control to move a last line that contains bigfoot footnotes: \documentclass{article}
\usepackage{lua-widow-control}
\usepackage{bigfoot}
\DeclareNewFootnote{default}
\DeclareNewFootnote{Z}[alph]
\begin{document}
\vspace*{33\baselineskip}
One two three four five six seven eight nine ten. One two three four five six
seven eight nine ten. One two three four five six seven eight nine ten. One two
three four five six seven eight nine ten. One two three four five six seven
eight nine ten. One two three four five six seven eight nine ten. One two three
four five six seven eight nine ten. One two three four five six seven eight nine
ten. One two three four five six seven eight nine ten. One two three four five
six seven eight nine ten. One two three four five six seven eight nine ten. One
two.
Some text \footnote{%
Note\footnoteZ{first note to note}note2\footnoteZ{second note to note}%
} One two three four five six seven eight nine ten. One two three four five six
seven eight nine ten. One two three four five six seven eight nine ten. One two
three four five six seven eight nine ten. One two three.
\end{document} This issue looks fairly simple, but it's actually insanely complicated. To fix it, I had to rewrite around half of the Lua code. Most other TeX packages for footnotes use the standard To fix this, I rewrote lua-widow-control so that instead of manually moving the last line of the page to the next line, it instead sets a “no-op” output routine, then triggers the real one. This way, all that it has to do is expand one paragraph on the page, then TeX will handle moving the last line. To make TeX handle the inserts properly, all that it needs to do is set But this still doesn't actually help, since Anyways, this new code should (in theory) fully-support bigfoot footnotes, so you (hopefully) shouldn't need the The builder that generates the And thanks for the report! |
Issue
I'm working on pretty big project that uses both
lua-widow-control
andbigfoot
packages.lua-widow-control
does a great job and saves lot of time.But when I insert multiple footnotes inside footnote
lua-widow-control
crashes. With error:For now I use workaround and wrap such footnotes with
\lwcsetup{disable}....\lwcsetup{enable}
Expected Behavior
lua-widow-control
should show warning or something, not crash.Reproduction
Log File
Format
LaTeX
Distribution
TeX Live
Distribution Version
This is LuaHBTeX, Version 1.15.0 (TeX Live 2022)
Lua-widow-control Version
lua-widow-control 2022/11/22 vv3.0.0
Other Relevant Packages and Versions
bigfoot 2015/08/30 2.1
Other
No response
The text was updated successfully, but these errors were encountered: