josephwright/siunitx

table-format setting may cause "Overfull \hbox" since LaTeX 2024-06-01

muzimuzhi opened this issue · 4 comments

Caught from tabularray's regression test, see this job run.

When a cell content has more digits than that specified in table-format (hence it's wider than permitted), beforehand no message is raised. Since LaTeX 2024-06-01 an "Overfull \hbox" is raised. I don't know if this difference is expected.

% \RequirePackage[2023-11-01]{latexrelease}
\documentclass{article}
\usepackage{siunitx}

\begin{document}

\begin{tabular}{|S[table-format=2.1]|}
  33.11
\end{tabular}

\end{document}

log

Overfull \hbox (5.00002pt too wide) detected at line 9

This is also caught by the test suite of siunitx itself: https://github.com/josephwright/siunitx/actions/runs/9507844311/job/26208088716.

Relevant diff output

*** 2200,2205 ****
--- 2190,2198 ----
  ! OK.
  <argument> \l_tmpa_box 
  l. ...  }
+ Overfull \hbox (5.00002pt too wide) detected at line 413
+ \hbox(0.0+0.0)x-5.00002
+ .\glue 0.0 plus 1.0fil
  Package siunitx Info: Option "table-figures-decimal" has been deprecated in this release.
  (siunitx)             
  (siunitx)             Use "table-format" as a replacement.
***************
*** 2239,2245 ****
  ......\OT1/cmr/m/n/10 5
  ......\mathoff
  .....\hbox(0.0+0.0)x-5.00002
- ......\glue -5.00002
  ......\glue 0.0 plus 1.0fil
  .....\glue 0.0 plus 0.5fill
  .....\kern 0.0
--- 2232,2237 ----
***************
*** 2273,2279 ****
  ......\OT1/cmr/m/n/10 5
  ......\mathoff
  .....\hbox(0.0+0.0)x0.0
- ......\glue 0.0
  ......\glue 0.0 plus 1.0fil
  .....\glue 0.0 plus 0.5fill
  .....\kern 0.0
--- 2265,2270 ----

I'm happy we get a warning here: I never got round to making sure there was one. So I'll simply adjust the tests (but there is something else to check on first).

Surprisingly, now my initial example won't trigger "Overfull \hbox" any more, neither does the library-003.tex test in tabularray's repository.

But those "Overfull \hbox" messages added in b25ee71 for table-emulation.lvt test in this repository persist.

I tried with format built on LaTeX 2024-06-01, "Overfull \hbox" didn't come back.

@muzimuzhi It's changes in array I think (I didn't trace but I know Frank has tightened up as part of the tagging work)