[Tex/LaTex] Writing HTML code directly from LaTeX

tex4ht

At exporting a LaTeX file to HTML via tex4ht I have to write some HTML comments to the HTML source. So I would like to write the HTML code in the LaTeX file and let tex4ht export it directly. How can I achieve this? Are there some special LaTeX commands to do this?

Best Answer

\def\HCode#1{}
...
\begin{document}
...
\HCode{<!--comment-->}

It works. tex4ht writes the comment and pdflatex ignores the tag. Fine.

Related Question