> I've some documents in: http://www.savebylinux.com/latex/ There are 2 file
> and 2 directory contain HTML result from each file. I use lattest
> latex2html and lyx program. I hope you can explore what's wrong with it.
Thanks.
The fix is very easy:
In the document preamble, just insert the two lines below
beginning with % :
%begin{latexonly}
\IfFileExists{url.sty}{\usepackage{url}}
{\newcommand{\url}{\texttt}}
%end{latexonly}
These "comments" are invisible to LaTeX, but act as environment delimiters
for LaTeX2HTML. The material in-between is filtered out at a very early stage
of processing, hence there can be no incompatibility caused by the
\newcommand{\url}{\texttt}
BTW, (for the Lyx gurus)
would it not be better, partly as a matter of style and efficiency,
to use low-level TeX coding with this conditional code ?
\IfFileExists{url.sty}{\usepackage{url}}{\let\url\texttt}
The reason that LaTeX2HTML has difficulty with a definition such as:
\newcommand{\url}{\texttt}
is that it does not say that (at the user-level) \url should act as if
it takes an argument. When the processor expands macros as in TeX,
then this doesn't matter; but with an alternative expansion model,
it is possible for the \url to get irretrievably separated from its intended
argument. Thus
\newcommand{\url}[1]{\texttt{#1}}
would be a more sympathetic definition for non-TeX,
but the \let version is the most elegent, IMHO.
I hope this provides a complete solution to the compatibility problem.
> Thanks in advances.
You're welcome,
Ross Moore