# Problems with URL's size

I would like to change the font size of the URLs in my latex document. I did:

\begin{document}
...
\usepackage{url}

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?

-
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

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

\renewcommand{\UrlFont}{\scriptsize}


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

\documentclass{article}
\usepackage{url}

\renewcommand{\UrlFont}{\scriptsize}

\begin{document}

Figure 1: \url{my url}

Figure 2: \url{my url}
\end{document}

-
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
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 at 12:54