TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use \usepackage{url} and \url{…} to typeset URLs, but the typewriter font stands out a little too much. How can I have the URLs typeset in a different font?

share|improve this question
May I suggest you leave your questions up for a short while before answering them yourself; there was a little discussion on this: meta.tex.stackexchange.com/questions/4/… – Loop Space Jul 30 '10 at 19:33
up vote 31 down vote accepted

According to the README,

you can switch the style of printing using \urlstyle{tt}, where tt can be any defined style. The pre-defined styles are tt, rm, sf, and same, all of which produce the same linebreaks but use different fonts—the first three select a specific font and the ‘same’ style uses the current text font.

You can also define your own font:


%% Now actually use the newly defined style.

(The last example is from http://www.kronto.org/thesis/tips/url-formatting.html.)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.