[tex-k] In TeX: The Program, section 449, contradicting error treatment after using incompatible glue units
tttex at mailbox.org
tttex at mailbox.org
Wed Jan 29 21:48:27 CET 2025
Hi,
When TeX encounters a normal dimension or glue when scanning for a mu
dimension, it complains that a normal dimension was used where a mu dimension
was expected but then continues with up to two contradicting error messages. I
believe this is caused by a missing goto statement in the error handling of the
scan_dimen routine.
An example of this can be seen in the following interaction with TeX:
**\dimen0 = 1pt
*$\mkern \dimen0$
! Incompatible glue units.
<to be read again>
$
<*> $\mkern \dimen0$
? h
I'm going to assume that 1mu=1pt when they're mixed.
?
! Illegal unit of measure (mu inserted).
<to be read again>
$
<*> $\mkern \dimen0$
?
! Dimension too large.
<to be read again>
$
<*> $\mkern \dimen0$
?
According to the first help message, the 1pt dimension should be reinterpreted
as 1mu. The following errors are then caused by TeX instead interpreting the
scaled dimension of \dimen0 as an unscaled integer with a missing unit such
that the resulting final dimension is too large to fit into a scaled integer.
I believe this behavior is caused by a missing goto statement in section 449 of
"TeX: The Program", where a cur_val_level of dimen_val or glue_val will cause a
call to mu_error but cur_val is then continued to be treated like an integer
value instead of jumping ahead to where cur_val is expected to contain a mu
dimension at attach_sign. Instead of
if cur_val_level<>int_val then mu_error;
it should probably state something like
if cur_val_level<>int_val then
begin mu_error; goto attach_sign;
end
Best regards,
Tyge
More information about the tex-k
mailing list.