Problem with a \newdimen inside a \def

Rodolfo Medina <[email protected]> Tue, 03 Feb 2026 18:57:40 +0000
Newsgroups gmane.comp.tex.texhax
Message-ID <87o6m5wt7f.fsf@lenovo>
Please help with the following simple example to be processed by simply `tex
test': you can see the phrase `good day' at the end of the document behaving
differently in two positions supposed to have to behave the same way:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\centerpoint#1#2#3{%
\vbox to 0pt{%
    \kern#2
    \hbox to0pt{%
      \kern#1
      \setbox0=\hbox{#3}%
      \kern-0.5\wd0
      \vbox to0pt{\vss\hbox{#3}\vss}
      \hss
    }%
    \vss
  }%
}

\newdimen\holex

\holex=14true mm

hallo\hskip\holex bye

hallo\hskip14true mm bye


\centerpoint{14true mm}{10true cm}{good day}
\centerpoint{\holex}{10true cm}{good day}


\bye
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Why does this happen?

Thanks in advance,

Rodolfo