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 would like to change the font size of the URLs in my latex document. I did:


Figure 1: \scriptsize{\url{my url}}\\
Figure 2: \scriptsize{\url{my url}}

The problem is that these commands make the font size of the "Figure 2" also in \scriptsize and I don't want that.

Can someone help me?

share|improve this question
Welcome to TeX.sx! The font changing commands don't take an argument, but are "declarations": {\scriptsize\url{...}} should do. – egreg Jan 2 '13 at 21:35
up vote 10 down vote accepted

According to url, a quick fix would be to redefine \UrlFont, perhaps as follows


However, the documentation also says that it would be better to define your own url-style (which would be a bit more involved).




Figure 1: \url{my url}

Figure 2: \url{my url}
share|improve this answer
This will change the size of all URLs in the document – egreg Jan 2 '13 at 21:52
@egreg indeed, that was my intention :) the OP said that he would like to change the size of 'the urls' – cmhughes Jan 2 '13 at 21:55
Although not economical, you could use \newcommand{\URL}[1][\scriptsize]{\renewcommand{\UrlFont}{#1}\url}, which allows you to use \URL[\normalsize]{...} for fun. – Werner Jan 2 '13 at 22:15
For me the best solution was to use \let\OldUrlFont\UrlFont \renewcommand{\UrlFont}{\small\OldUrlFont} instead, which allows to keep the URL format and just adds your prefered font size. – matheburg Mar 25 '14 at 12:54

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.