latex2e
latex2e copied to clipboard
longtable 4.16 : dimension too large when inside vbox ; works in 4.13
Brief outline of the bug
longtable causes a Dimension too large error when it is typeset in a vbox
Minimal example showing the bug
(firsthead and head are identical due to example minimisation ; same for foot and lastfoot)
\RequirePackage{latexbug}
\documentclass{article}
\usepackage{longtable}
\begin{document}
\vbox{\begin{longtable}{|l|l|l|l|l|l|}
\hline
\textbf{classe}&\textbf{Copies}&\textbf{Note min}&\textbf{Note max}&\textbf{Moyenne}&\textbf{ecart-type}\\\hline\endfirsthead
\hline
\textbf{classe}&\textbf{Copies}&\textbf{Note min}&\textbf{Note max}&\textbf{Moyenne}&\textbf{ecart-type}\\\hline\endhead
\hline\endfoot
\endlastfoot
MPSI1&16&2.40&16.03&7.75&3.78\\\hline
\end{longtable}}
\end{document}
Removing the vbox around makes it compile. No problem with the 4.13 version of longtable.
Log file (required) and possibly PDF file
Thanks for the file. the newer code checks the amount on the page in a better way to avoid over-runs when there are floats, or shrinkable glue on the page, but \pagegoal
is \maxdimen
inside the box as the box hasn't yet been added to the page and the calculation overflows (and would do the wrong thing anyway)
I need to detect this case and avoid the error, but will need to think where to do that.
\vbox{\dimendef\pagegoal=0 \pagegoal=0pt
will get your document working (but that is not a fix, just a quick workaround)
Thank you so much for this quick workaround !
This issue has been automatically marked as stale because it has not had recent activity.
This issue has been automatically marked as stale because it has not had recent activity.