[pdftex] Problem with underscores in URLs

William Waite waite at scotty.cs.colorado.edu
Tue Apr 2 11:33:06 CEST 2002


I have been using latex and latex2html to produce class materials in both
PostScript and HTML.  I tried to use pdflatex, and stumbled across a
problem.  Here is a minimum test case:

-------------------------------------------------------------
\documentclass{article}

\usepackage{html}

\begin{document}

\htmladdnormallinkfoot{token processor}{\_}

\end{document}
-------------------------------------------------------------

latex processes this file without error:

This is TeX, Version 3.14159 (Web2C 7.3.1)
(try.tex
LaTeX2e <1999/12/01> patch level 1
Babel <v3.6Z> and hyphenation patterns for american, french, german,
ngerman, p
ortuges, nohyphenation, loaded.
(/tools/cs/teTeX-1.0.7/texmf/tex/latex/base/article.cls
Document Class: article 1999/09/10 v1.4a Standard LaTeX document class
(/tools/cs/teTeX-1.0.7/texmf/tex/latex/base/size10.clo))
(/home/scotty/waite/lib/latex2html/texinputs/html.sty) (try.aux) [1]
(try.aux) 
)
Output written on try.dvi (1 page, 384 bytes).
Transcript written on try.log.

pdflatex, on the other hand, cannot deal with the underscore:

This is pdfTeX, Version 3.14159-13d (Web2C 7.3.1)
(try.tex[/tools/cs/teTeX-1.0.7/texmf/pdftex/config/pdftex.cfg]
LaTeX2e <1999/12/01> patch level 1
Babel <v3.6Z> and hyphenation patterns for american, french, german,
ngerman, p
ortuges, nohyphenation, loaded.
(/tools/cs/teTeX-1.0.7/texmf/tex/latex/base/article.cls
Document Class: article 1999/09/10 v1.4a Standard LaTeX document class
(/tools/cs/teTeX-1.0.7/texmf/tex/latex/base/size10.clo))
(/home/scotty/waite/lib/latex2html/texinputs/html.sty
(/tools/cs/teTeX-1.0.7/texmf/tex/latex/hyperref/hyperref.sty
(/tools/cs/teTeX-1.0.7/texmf/tex/latex/graphics/keyval.sty)
(/tools/cs/teTeX-1.0.7/texmf/tex/latex/hyperref/pd1enc.def)
Implicit mode ON; LaTeX internals redefined
(/home/scotty/waite/lib/latex2html/texinputs/url.sty))
*hyperref using default driver hpdftex*
(/tools/cs/teTeX-1.0.7/texmf/tex/latex/hyperref/hpdftex.def
(/tools/cs/teTeX-1.0.7/texmf/tex/latex/psnfss/pifont.sty
(/tools/cs/teTeX-1.0.7/texmf/tex/latex/psnfss/upzd.fd)
(/tools/cs/teTeX-1.0.7/texmf/tex/latex/psnfss/upsy.fd)))) (try.aux)
(/tools/cs/teTeX-1.0.7/texmf/tex/latex/hyperref/nameref.sty) (try.out)
(try.out
)
! Undefined control sequence.
<argument> ...ct \global \let \OT1\textunderscore 
                                                  \unhbox \voidb at x \kern
.06...
l.7 \htmladdnormallinkfoot{token processor}{\_}
                                               
? 

I have only seen this problem when the underscore is inside the second
parameter of \htmladdnormallinkfoot.  Underscores in the text or in the
first parameter work fine.

I'd appreciate a fix or suggestions for a workaround...



More information about the pdftex mailing list