Skip to content

\columnwidth is its own register, not another name for \hsize - #640

Merged
tannevaled merged 1 commit into
mainfrom
column-width-register
Oct 22, 2026
Merged

tannevaled merged 1 commit into
mainfrom
column-width-register

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

\columnwidth was \let to \hsize. It is its own register in LaTeX, and \hsize
is set from it — never the reverse.

The source

\newdimen\columnwidth                           % latex.ltx:15020

and every place that sets the measure:

\columnwidth\textwidth                          % 6682, \begin{document}
\if@twocolumn \advance\columnwidth -\columnsep
  \divide\columnwidth\tw@ \hsize\columnwidth \fi % 6684-6686
\hsize\columnwidth \linewidth\hsize             % 6688
\global\hsize\columnwidth                       % 15079 (\onecolumn), 15113 (\twocolumn)

The two coincide in the body of a document, which is why the \let carried this
engine for a long time. They part company exactly where a class sets \hsize for a
block of front matter and then asks how wide a column is — acmart's
\@mkauthors@iv does it four lines apart (acmart.cls:2529-2530 then :2722).

\linewidth stays \let to \hsize: it is the current measure, and both
\begin{document} (6688) and \minipage (11861) set it from \hsize.

⚠ Unset, \columnwidth answers with the paragraph measure — which is what the \let
gave. A document that never reaches \begin{document}'s recompute (a probe, a
fragment, a class that states widths and stops) therefore behaves exactly as before
rather than reading a column width of 0pt. There is a test for that, because it is the
one way this change could quietly size every box in such a document from zero.

Corpus

154 papers, control 712b4fc (the parent). Three move, all three toward the
reference, none away:

document before after reference
2304.06819 21 20 18
2312.01923 9 8 7
2407.11498 24 23 22

Σ|·| 293 → 290, bias +83 → +80, 36 exact either way.

⛔ The hypothesis that led me here was wrong

I expected this to explain acmart's author block running 3356pt off a 612pt page
on 2405.20319 (#629). It does not: acmtog uses \@mkauthors@i and sigplan
\@mkauthors@iii, and both size from \textwidth. Only sigchi-a reads
\columnwidth. The change stands on the source, and the corpus then found witnesses
the hypothesis had not.

That off-page line has since been isolated to something else, with the oracle: see
#629.

🤖 Generated with Claude Code

latex.ltx:15020 declares it:

	\newdimen\columnwidth

and every place that sets the measure sets \hsize FROM it, never the reverse:

	\columnwidth\textwidth                        % 6682, \begin{document}
	\if@twocolumn \advance\columnwidth -\columnsep
	  \divide\columnwidth\tw@ \hsize\columnwidth \fi
	\hsize\columnwidth \linewidth\hsize            % 6688
	\global\hsize\columnwidth                      % 15079 (\onecolumn), 15113 (\twocolumn)

\columnwidth was \let to \hsize here. The two coincide in the body of a document,
which is why that carried the engine for a long time; they part company exactly where
a class sets \hsize for a block of front matter and then asks how wide a COLUMN is —
acmart's \@mkauthors@iv does it four lines apart (acmart.cls:2529-2530 then :2722).

\linewidth stays \let to \hsize: it IS the current measure, and \begin{document}
(6688) and \minipage (11861) both set it from \hsize.

⚠ Zero means "nobody has stated it yet", and then \columnwidth answers with the
paragraph measure — which is what the \let gave. A document that never reaches
\begin{document}'s recompute (a probe, a fragment, a class that states widths and
stops) therefore behaves exactly as before rather than reading a column width of 0pt.

⛔ I reached this from a hypothesis that was WRONG: that it explained acmart's author
block running 3356pt off the page on 2405.20319 (#629). It does not — acmtog uses
\@mkauthors@i and sigplan \@mkauthors@iii, and both size from \textwidth. Only
sigchi-a reads \columnwidth. The off-page author line has another cause (#629).

The change stands on the source, and the corpus then found witnesses the hypothesis
had not: 154 papers, control 712b4fc, THREE move and all three improve —

	2304.06819  21 → 20  (ref 18)
	2312.01923   9 →  8  (ref  7)
	2407.11498  24 → 23  (ref 22)

Σ|·| 293 → 290, bias +83 → +80, none worse.

Co-Authored-By: Claude Opus 5 <[email protected]>
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