[l2h] newbie, problem with \url + lyx
Jean-Pierre.Chretien
Jean-Pierre.Chretien" <Jean-Pierre.Chretien@cert.fr
Wed, 13 Sep 2000 08:22:37 +0200 (MET DST)
>>From: Ross Moore <ross@ics.mq.edu.au>
>>Subject: Re: [l2h] newbie, problem with \url + lyx
>>To: "Jean-Pierre.Chretien" <Jean-Pierre.Chretien@cert.fr>
>>Date: Wed, 13 Sep 2000 09:58:44 +1100 (EST)
>>CC: ross@ics.mq.edu.au, arie@nawala.com, latex2html@tug.org
>>
>>>
>>> >>Date: Wed, 13 Sep 2000 02:52:54 +0700 (JAVT)
>>> >>From: Arie Zanahar <arie@nawala.com>
>>> >>To: Ross Moore <ross@ics.mq.edu.au>
>>> >>cc: latex2html@tug.org
>>> >>Subject: Re: [l2h] newbie, problem with \url + lyx
>>> >>
>>> >>When I try, I use lyx to convert it to .tex. Then I use latex2html, it
>>> >>makes my \url isn't convert to hyper-links. So although I add
>>> >>\url{http://www.blah.com} will not be a hyper-links. Do you have any
>>> >>solution to fix it ?
>>>
>>> Seems to be rather a Lyx question than a latex2html one, but...
>>> here is what I understood about this problem.
>>>
>>> Lyx produces its own encodeing for an url as:
>>> \htmlurl[anchor]{URL}
>>
>>This is very bad, as \htmlurl is defined also
>>in the html.sty package, required for LaTeX2HTML.
>>(as are many other commands with names starting \html....).
>>
>>Lyx should use the name \lyxurl or something else that is distinct to
>>its own name of Lyx.
>>
>>
>>> Typographically, it prints anchor as is and URL with the url.sty
>>> wrapping to avoid problems with long words.
>>
>>Then to sort out the mess caused by the name clash, you will need
>>conditional code like the following in the document preamble:
[snip]
There is no name clash in LaTeX, because e.g.
\begin_inset LatexCommand \htmlurl[LyX]{http://www.lyx.org/}
\end_inset
is translated as:
\IfFileExists{url.sty}{\usepackage{url}}
{\newcommand{\url}{\texttt}}
in the preamble (to cope with (La)TeX installation not knowing about url.sty),
and:
LyX \url{http://www.lyx.org/}
in the LaTeX code.
So this is really a problem of using the html.sty commands
when translating from LyX format to LaTeX format, in order to keep along
the info about WHAT is the anchor and how to specify which command to use
(footnote or in line particularly, but others as well).
This works seems clearly on the LyX side.
--
Jean-Pierre