[l2h] newbie, problem with \url + lyx

Frank Altpeter frank at altpeter.de
Tue Mar 23 11:23:32 CET 2004


Hello!

Ross Moore wrote on 2004-03-23 08:31:29 +1100:
> Have you loaded  html.sty  ?
Nope. Since LyX also doesn't.

> This is vital for proper use of hyperlinks with LaTeX2HTML,
> since it
>   a.  causes certain markup to be recognised in the LaTeX source
>   b.  loads the translation modules for hyperlinking constructions
> and features to be used with the document translation.
> 
> This includes defining  \url  and  \htmlurl  to do the
> right thing, so that it is not necessary to load other packages.
> 
> *All* documents that make significant use of hyperlinking
> should  \usepackage{html}  when being translated into HTML
> using  LaTeX2HTML.
> That is a general rule for which there are no real exceptions,
> in normal LaTeX usage.
Well, and there's my question... i managed to manually change the
resulting .tex file and get a working result after latex2html, but i
don't want to do that manually everytime, so my question was more
LyX related... why doesn't lyx do what you suggest?

LyX does add the already mentioned \usepackage{url} and after
converting it with LaTeX there's the already mentioned
IfFileExists{} routine in it.
So i assume there's a mistake either in LyX or in latex.

> Is there in fact a problem in the HTML that is generated ?
> If not, then just ignore these "warning" messages.
If i builld it manually, the resulting HTML works, well. When trying
to get the same results with using the LyX internal export feature,
it doesn't.

> \documentclass......
> 
> \usepackage{html}
> %begin{latexonly}
> \IfFileExists{url.sty}{\usepackage{url}}
>                       {\newcommand{\url}{\texttt}}
> %end{latexonly}
> 
> 
> Those special comments do not change the result when processing
> with any TeX-based software, such as LaTeX or pdflatex or lyx,
> but tell the Perl-based LaTeX2HTML to ignore the coding in-between.
How do i add them to work in the automated LyX processing?

With kind regards,

	Frank Altpeter



More information about the latex2html mailing list