When typesetting URLs in LaTeX using the url
package, they are set in a mono space font by default. While I just accepted that as a fact for a long time, I am now starting to wonder why?
In Browsers, for example, the URL in the address bar is also not monospace. It does not make the link more readable, in my opinion rather on the contrary. The only explanation I can come up with is that it sets the link apart from the remeaining text. But honestly, even that sometimes looks a bit obstrusive.
So is the reasons really just to set links apart from the text?
Best Answer
The default was chosen by the package author, according to the common way of setting URLs. Using a monospaced font helps distinguishing them, and this is the main reason.
However the font can be changed with
\urlstyle
that accepts one argument amongThe default is equivalent to
\urlstyle{tt}
; with\urlstyle{rm}
and\urlstyle{sf}
the font will be the roman or sans serif upright font. With\urlstyle{same}
the current font will be used.