[tex-live] hyperref nolinkurl regression from 2007, \ not accepted anymore

Heiko Oberdiek oberdiek at uni-freiburg.de
Sun Dec 27 23:17:58 CET 2009


Dear Norbert,

On Mon, Dec 28, 2009 at 05:51:43AM +0900, Norbert Preining wrote:

> the Debian build process exhibited a problem with upgrade to TL2009, namely
> that a literal
> 	\
> is not accepted anymore in \nolinkurl{...}
> 
> Minimal example:
> 	\documentclass{article}
> 	\usepackage{hyperref}
> 	\begin{document}
> 	Test \nolinkurl{c:\fooooooo\barrrr}
> 	\end{document}
> The problem is that docbook -> latex translation uses \nolinkurl for
> local paths, too, as above, and there are Windows paths.
> 
> I confirmed that using the hypertex files from TL2007 the same 
> document works without any problem.
> 
> I wanted to ask you if that is a changed that is intended, or a regression.
> And if it is intended what you suggest as a replacement.

The change was intended, from ChangeLog:

| 2007-10-29  6.77a  Heiko Oberdiek
|     * \nolinkurl supports escaped characters the same way as \url
|       (Joseph Wright).

Now the behaviour is consistent between hyperref's version of
\url and \nolinkurl.

The old behaviour read the url verbatim, the backslash had
catcode 12. However \url supports escaping, that requires
a backslash with catcode 0.

Unhappily I didn't inherited any specification, thus I had to
guess often. If I don't change something some people are
unhappy, if I change it, then other people are complaining.

At least there is now some consistency: \nolinkurl behaves
like \url without the link part.

But package `url' provides \DeclareUrlCommand to get
a replacement for the redefined \url:

  \DeclareUrlCommand\MyPath{}

  Test \MyPath{c:\foo...\bar...}

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>


More information about the tex-live mailing list