latex2e icon indicating copy to clipboard operation
latex2e copied to clipboard

longtable 4.16 : dimension too large when inside vbox ; works in 4.13

Open ysalmon opened this issue 3 years ago • 9 comments

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

fiches_juin.log

ysalmon avatar Sep 17 '21 19:09 ysalmon

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)

davidcarlisle avatar Sep 17 '21 19:09 davidcarlisle

Thank you so much for this quick workaround !

ysalmon avatar Sep 17 '21 20:09 ysalmon

This issue has been automatically marked as stale because it has not had recent activity.

stale[bot] avatar Dec 08 '21 23:12 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity.

stale[bot] avatar Aug 13 '22 04:08 stale[bot]