[l2h] Problems with external links
Ross Moore
ross@ics.mq.edu.au
Wed, 24 Jul 2002 03:15:23 +1000 (EST)
> Hi,
>
> in my tex-files I used \href for referencing external sites. Because
> latex2html doesn't recognize \href I included \htmladdnormallink in a
> \begin{htmlonly} ... \end{htmlonly} section in my document. This works
Rather than do this for every link, you could use a conditional
definition in the document preamble:
\begin{htmlonly}
\newcommand{\href}[2]{\htmladdnormallink{#2}{#1}}
\end{htmlonly}
> fine, but is would be nicer if external sites were opened in a new
> window. So I need a href with the target TARGET="_blank", but latex2html
> only produces TARGET="_TOP" automatically.
This may be possible by setting the $target variable on the fly,
within the LaTeX document:
\htmlset{target}{_blank}
\externallink....
\htmlset{target}{}
Try this with small documents first, as it may upset other
targets (e.g. for getting cross-references and citations
correct within the frames of a complicated document).
There may be other possibilities to get what you want.
I'd need to look at source code to check on those.
>
> Is there a variable for changing the target or do I have to edit
Yes, $target does this.
But it can be tricky to get it right within frames, since this is
what is used internally for links within the document itself.
> frames.perl? I'm not very experienced with perl, so please give me a
> hint if I have have to edit a perl script.
Not yet.
Try some other ideas first.
Hope this helps,
Ross Moore
> Thank you in advance,
>
> Tanja
> _______________________________________________
> latex2html mailing list
> latex2html@tug.org
> http://tug.org/mailman/listinfo/latex2html