bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: behavior of @math with HTML output


From: Patrice Dumas
Subject: Re: behavior of @math with HTML output
Date: Fri, 14 Oct 2022 11:30:33 +0200

On Fri, Oct 14, 2022 at 12:40:08AM +0200, Vincent Lefevre wrote:
> On 2022-10-13 21:15:57 +0200, Patrice Dumas wrote:
> All of them are buggy:
>   * 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.

In my experience, t4h is the one that tries harder to use characters
for simple math and often succeeds.  Images are still used when it
becomes too complex.  It is probably the best for your use.  As you have
noticed, however, t4h only knows about TeX, not Texinfo.  It is actually
said in the manual that @math should not contain Texinfo commands, in
line with the 'recent' better handling of TeX/LaTeX:
"In general, the contents of @math or @displaymath should be plain TeX only, 
with no interspersed Texinfo commands."

In the upcoming version, there is a converter to LaTeX, which allowed to
add the customization variable CONVERT_TO_LATEX_IN_MATH.  You could use
that in conjunction with HTML_MATH t4h to have Texinfo @-commands
produce TeX/LaTeX math in @math.  However, it won't do what you want in
term of formatting, as, if I recall well, @var is a no-op in conversion
to LaTeX in math mode, as math mode is already slanted.

In theory, there is a Texinfo mode in tex4ht, which is the software used
in t4h mode.  However, the result is bad, and I guess that nobody is
working in it.  There is already a support for that mode in texi2any
(through httexi) but it is not set.  If you want to have mixed Texinfo
and TeX math and a result in HTML with a maximum of characters and the
minimum of images, my guess would be that making httexi work correctly
could be the best option, and, when it works well, it could be used by
texi2any.

-- 
Pat



reply via email to

[Prev in Thread] Current Thread [Next in Thread]