Hello,
There seems to be an issue with outputting raw html in plain tex
with httex. I use tex4ht that comes with debian testing texlive
2020.20200925.
In plain tex I process with httex and I use
\ifx \HCode \undefined
\else
\HCode{\Hnewline <!-- tex4ht_begin tex_tex4ht_tex tex 1 -->}
\fi
but I get ! Undefined control sequence. for \Hnewline, and when I
remove \Hnewline another error for _ not in mathmode, and when I replace
_ with - what is in \HCode{} is processed as TeX and not output as is as
html.
If I test with some equivalent latex code and htlatex everything is
as expected, <!-- tex4ht_begin tex_tex4ht_tex tex 1 --> appears as
is in the output html file. Equivalent LaTeX code is:
\ifdefined\HCode
\HCode{\Hnewline <!-- tex4ht_begin tex_tex4ht_tex tex 1 -->}
\fi
I attach the file I use to test httex and the equivalent file with
htlatex.
As a side note, it may be related or not, but for the math the output of
httex (and httexi) is subpar corresponding to the same math code but
with LaTeX beginning and end processed with htlatex. In the past I
think that it was not the case, the httex and httexi output were better.
It maybe another symptom of an underlying issue also causing the issue
reported above.
--
Pat
here \TeX
\ifx \HCode \undefined
\else
\HCode{\Hnewline <!-- tex4ht_begin tex_tex4ht_tex tex 1 -->}
\fi
$$ \chi^2 = \sum_{i=1}^N
\left(y_i - (a + b x_i)
\over \sigma_i\right)^2 $$
\bye
\documentclass{article}
\begin{document}
here \TeX
\ifdefined\HCode
\HCode{\Hnewline <!-- tex4ht_begin tex_tex4ht_tex tex 1 -->}
\fi
$$ \chi^2 = \sum_{i=1}^N
\left(y_i - (a + b x_i)
\over \sigma_i\right)^2 $$
\end{document}