[tex4ht] With LaTeX 2020-10-01, "\," causes endless loop

Michal Hoftich michal.h21 at gmail.com
Sat Oct 3 23:07:50 CEST 2020


Hi Yukai,

>What is relevant is, "\thinspace" is now let to "\,". But the current
>definition of "\,<space>" in latex.4ht (generated from tex4ht-4ht.tex) uses
>"\thinspace",
>
>\def\:tempc{\relax\ifmmode\csname a:,\endcsname\else\thinspace\fi}
>\expandafter\HLet\csname , \endcsname=\:tempc
>
>Therefore user input "\," now causes endless loop
>
>"\," -> "\,<space>" -> "\thinspace" -> "\,<space>" -> loop

thanks for your report and analysis. I've fixed this issue in TeX4ht 
sources. I've also added support for \, \; \: \! and \> in the text 
mode, using adapted code from the LaTeX kernel.

This is the new code that should be put to latex.4ht:

\NewConfigure{;}{1}
\NewConfigure{!}{1}
\NewConfigure{:}{1}
\NewConfigure{,}{1}
\NewConfigure{>}{1}
\DeclareRobustCommand\:tmspace[2]{%
   \ifmmode\expandafter\csname a:#1\endcsname%
   \else\leavevmode at ifvmode\kern#2\fi\relax%
}
\DeclareRobustCommand\,{\:tmspace{,}{.16667em}}
\DeclareRobustCommand\;{\:tmspace;{.2777em}}
\DeclareRobustCommand\!{\:tmspace!{-.16667em}}
\DeclareRobustCommand\:{\:tmspace{:}{.2222em}}
\DeclareRobustCommand\>{\:tmspace;{.2222em}}
\let\thinspace\,
\let\medspace\:
\let\negthinspace\!
\let\thickspace\;
\Configure{,}{\mskip\thinmuskip}
\Configure{;}{\mskip\thickmuskip}
\Configure{!}{\mskip-\thinmuskip}
\Configure{:}{\mskip\medmuskip}
\Configure{>}{\mskip\medmuskip}

Best regards,
Michal


More information about the tex4ht mailing list.