Skip to content

tabular* is a tabular that takes its width first - #219

Merged
tannevaled merged 1 commit into
mainfrom
tabular-star
Sep 4, 2026
Merged

tabular* is a tabular that takes its width first#219
tannevaled merged 1 commit into
mainfrom
tabular-star

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

\begin{tabular*}{W}{spec} was undefined, so its width and its column spec were
typeset as running text and the body set as a paragraph — the page carried

0.9@lcr un deux trois a b c

where a table belongs. One IEEEtran paper in the corpus uses it ten times; across
the 200 arXiv papers, eight uses in four papers.

LaTeX reads the width and is then tabular, with the alignment packed to it
(latex.ltx:12092):

\@namedef{tabular*}#1{\setlength\dimen@{#1}\edef\@halignto{to\the\dimen@}\@tabular}

so the body, the rules, \\ and & behave exactly as in tabular, and the width
is a target for the inter-column glue. Here the assembled box is packed to that
width — what @{\extracolsep{\fill}} in the preamble is asking for. A table whose
natural width already exceeds the request keeps it, rather than overlapping its
columns (TeX's overfull \hbox).

Measured: no page-count change on the corpus — the tables were being set, badly, as
text of about the same bulk. What changes is that they are now tables and the
preamble no longer appears in the prose. A test pins both: no 200pt,
extracolsep or lr in the text, and a box at least as wide as the request.

🤖 Generated with Claude Code

\begin{tabular*}{W}{spec} was undefined, so its width and its column spec were
typeset as running text and the body set as a paragraph — "0.9@lcr un deux trois"
on the page where a table belongs. One IEEEtran paper in the corpus uses it ten
times; eight uses across four of the 200 arXiv papers.

LaTeX reads the width and is then tabular, with the alignment packed to it
(latex.ltx:12092):

	\@namedef{tabular*}#1{\setlength\dimen@{#1}\edef\@halignto{to\the\dimen@}\@tabular}

so the body, the rules, \\ and & behave exactly as in tabular and the width is a
target for the inter-column glue. Here the assembled box is packed to that width,
which is what \extracolsep{\fill} in the preamble asks for; a table wider than the
request keeps its natural width rather than overlapping its columns.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 999b409 into main Sep 4, 2026
18 checks passed
@tannevaled
tannevaled deleted the tabular-star branch September 4, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant