According to Dan Young:
> The following document excerpt is accepted by latex but bombs in l2h:
>
> \documentclass{report}
> \begin{document}
>
> \chardef\backslash=`\\
>
> \begin{itemize}
> \item[{\tt \backslash}]
> Backslash is the escape character
> \end{itemize}
>
> \end{document}
>
> % latex2html demo.tex
> This is LaTeX2HTML Version 98.1p1 release (March 2nd, 1998)
> [...]
> Unknown commands: < chardef
> Done.
As it turns out I wanted to do exactly the same thing just yesterday
... here is my workaround:
\documentclass{report}
%begin{latexonly}
\chardef\bslchar=`\\
%end{latexonly}
\begin{htmlonly}
\newcommand{\bslchar}{\begin{rawhtml}&\#92;\end{rawhtml}}
\end{htmlonly}
\newcommand{\ntt}{\normalfont\ttfamily}
\begin{document}
\begin{itemize}
\item[{\ntt \bslchar}] Backslash is the escape character
\end{itemize}
\end{document}
Try that. Note, \backslash is already defined ... so I have used
\bslchar. As I recall \ntt rather than \tt was needed so that
the \ in the LaTeX output is truly in tt font. I borrowed the
idea from the amsdtx package (just to acknowledge my source).
Regards,
Greg Gamble
___________________________________________________________________
Greg Gamble __________________ mailto:[EMAIL PROTECTED]
Department of Mathematics ___ Tel: +61-8 9380 3383
The University of Western Australia Fax: +61-8 9380 1028
NEDLANDS WA 6907 AUSTRALIA http://maths.uwa.edu.au/~gregg/
___________________________________________________________________