On Fri, Oct 14, 2022 at 07:06:04AM +0100, Gavin Smith wrote: > On Fri, Oct 14, 2022 at 12:40:08AM +0200, Vincent Lefevre wrote: > > On 2022-10-13 21:15:57 +0200, Patrice Dumas wrote: > > > I agree with Gavin, you should not use @math if you want normal text, > > > but given that there is now good support of TeX math in texi2any for > > > HTML with any of the 3 HTML_MATH option, > > > > All of them are buggy: > > * l2h generates image files as documented, which have many drawbacks > > (do not work with text browsers, not accessible, font size issues > > with a graphical browser...). > > That is not a bug. > > > * Concerning t4h, > > @math{@var{base} \le 16}, > > yields "@varbase ≤ 16 ,", so @var doesn't work (while it is needed > > to ensure exactly the same typography/code as outside @math, e.g. > > <var>base</var>) and there is a spurious space before the comma. > > This is a minor bug but Texinfo commands like @var should not be used inside > @math.
So for @var inside @math, it would be better to find some pure TeX notation for this. I couldn't find a usage that would work perfectly for texinfo.tex, MathJax and tex4ht. The following @math{{\sl base} \le 16}, works with texinfo.tex and tex4ht, but not MathJax. There seems to be no way to get slanted roman text with MathJax; even the \textsl of LaTeX doesn't work. (However, if you are not using MathJax maybe this doesn't matter.) @math{\hbox{base} \le 16}, will work for all settings, as far as I can tell, but does not slant the variable. I believe that using \hbox is the best choice for embedding text into formulas.