I sent these ideas for url.sty to Don Arseneau a few days
ago. While awaiting his reply, though I'd post here too.
1. It seems like & should be a special character, since it's
one of the
url separators. If you think it's too late to add it by
default, we
could at least have an option like [amp] to turn it on.
What I did
for now was just:
\let\saveurlbreaks=\UrlBreaks
\def\UrlBreaks{\do\&\saveurlbreaks}
2. I often find myself needing to explicitly force a line
break instead
a url. I've used ! for this. Another option, like
[bangnewline] or
something? I can't think of a good way to make the
special character
configurable, or to do it on a per-url basis, either of
which would
probably be better. What I did for now:
\mathcode`\!="8000
\let\saveurlspecials=\UrlSpecials
\def\UrlSpecials{\do\!{\newline}\saveurlspecials}
3. Sometimes I find myself wanting to allow stretchy glue
around /
characters (only) to help with justification, etc. In
practice it's
proven too much to allow glue around any of the other usual
characters. Unfortunately this now allows a line break
between the
slashes of http://, but again, nothing obvious came to
mind for
dealing with that :(.
\mathcode`\/="8000 % space around /'s.
\def\Urlspaceyslash{%
\mskip\Urlslashmuskip
\mathbin{\hbox{/}}% need text / to avoid recursion
\mskip\Urlslashmuskip}
\let\saveurlspecials=\UrlSpecials
\def\UrlSpecials{\do\/{\Urlspaceyslash}\saveurlspecials}
4. Finally, the documentation is evidently stale. It refers
to \Url@do,
which I do not see defined. If you like I can work up
some updates.
(Now that we have url.tex, do we need to keep up the
documentation in
url.sty? I'd be inclined to remove it instead of
maintaining it
twice, personally ...)