[l2h] Tilde problem

Werner LEMBERG Werner LEMBERG <sx0005@sx2.hrz.uni-dortmund.de>
Sun, 13 Jun 1999 20:11:06 GMT


Dear friends,


in trying to write a document which can be processed by latex,
pdflatex, and latex2html, I have a problem with tilde characters (l2h
version 99.1, hyperref version 6.56 1999/04/13):

I did the following:

  ...
  \usepackage{html}
  %begin{latexonly}
  \usepackage[colorlinks,bookmarks]{hyperref}
  %end{latexonly}

  \newcommand{\Href}[1]{\htmladdnormallink{\texttt{#1}}{#1}}

And here the link:

  \Href{http://ricardo.ecn.wfu.edu/~cottrell/wp.html}

but this doesn't give the expected result.

Thus I tried the following:

  %begin{latexonly}
    \Href{http://ricardo.ecn.wfu.edu/\string~cottrell/wp.html}%
  %end{latexonly}
  \begin{htmlonly}
    \Href{http://ricardo.ecn.wfu.edu/\~{}cottrell/wp.html}
  \end{htmlonly}

This works as expected, but is really ugly.  Now my question: Does a
better solution exist?  If not, may I ask the developer of l2h to
ignore the `\string' command?  May I ask Sebastian to accept `\~{}'
properly?

Another nice thing would be to have a hyperref.perl file to avoid
loading of both html.sty and hyperref.sty...

In short, I want this to work with both pdflatex and latex2html:

  \usepackage[colorlinks,bookmarks]{hyperref}

  \newcommand{\Href}[1]{\htmladdnormallink{\texttt{#1}}{#1}}
  \Href{http://ricardo.ecn.wfu.edu/~cottrell/wp.html}


    Werner