[Fontinst] eTeX and fontinst -- incompatible?

Bernd Raichle raichle at Informatik.Uni-Stuttgart.DE
Tue Dec 9 17:39:50 CET 2003


On Tuesday, 9 December 2003 12:45:24 +0100,
Lars Hellström <Lars.Hellstrom at math.umu.se> writes:
[...]
 > 
 > This could indeed be a bug. The thing is, fontinst actually tries to take
 > advantage of the eTeX primitive \ifcsname (when it is defined) to implement
 > the \if_defined and \if_undefined conditionals, which in turn are used to
 > implement e.g. \ifisint.
 > 
 > Maybe there is a difference between \unless\ifcsname #1\endcsname (eTeX)
 > and \expandafter\ifx \csname #1\endcsname\relax (TeX). I'll have to look
 > into it.

\csname ...\endcsname has always the side effect to assign \relax to
an undefined token, i.e., creating a new entry in TeX's internal table
of equivalents.  If \csname is heavily used it is filling the eqtb
table probably causing an overflow.

e-TeX's primitive \ifcsname does not have this side effect, i.e., no
assignment is done, the token is left undefined and no eqtb entry is
created.

To implement LaTeX's \ifundefined in a compatible way you have to use
something like

\ifcsname #1\endcsname
   ... undefined ...
\else \expandafter\ifx\csname #1\endcsname\relax
   ... undefined ...
\else
   ... defined ...
\fi\fi



 > PS: I see from your later mail that Heiko Oberdiek indeed confirms my
 > suspicions above. Probable fix is then to be more careful about how things
 > are \unset (\let...=\relax is not OK, but \let...=\undefined_command should
 > be).

correct.


-bernd

_____________________________________________________________________
Bernd Raichle                                  "Le langage est source
Autor des `german.sty' (aktuell: v2.5e)         de malentendus"
DE-TeX-FAQ: http://www.dante.de/faq/de-tex-faq/ (A. de Saint-Exupery)


More information about the fontinst mailing list