[l2h] hyperref.sty vs. html.sty: "\textunderscore undefined"

Julius Smith l2h@w3k.org
Thu, 12 Sep 2002 00:21:34 -0700


I often use the construct (from html.sty)

	\htmladdnormallinkfoot{description}{http://www.somewhere.org/\~{}name/file\_name.html}

(Note the quoted '~' and '_'.)  This has been working fine for some years.

Today I tried using the hyperref package for the first time, and I ran into 
the error  "\textunderscore undefined" at '\_'.  After some Web searching 
and general futzing around, I seem to have come up with the following 
workaround:

	\htmladdnormallinkfoot{description}{\url{http://www.somewhere.org/~name/file_name.html}}

(Note the use of \url{} and no more quoting of '~' and '_'.)

While this seems to work, based on a test sample of one, I wonder if there 
is a better, more "correct" way to handle this problem?

Julius