# How to put the url centered under the caption of a figure?

I would like to put a source under the caption of my figure. The only thing that is not working is when I put the URL, the caption and the URL don't stay in the middle. Also \url{...} didn't work by itself:

\begin{figure}[!h]
\centering
\includegraphics[width=70mm]{figure3}
\\ \small{source by:\protect\url{www.aly-abbara.com/livre_gyn_obs/images/testosterone_DHT.html}}}
\label{figure3}
\end{figure}

-
Welcome to TeX.SE. A tip: If you indent lines by 4 spaces, then they're marked as a code sample. You can also highlight the code and click the "code" button ({}). I took the liberty to format you post a little. See this link for more details on available formatting. – Peter Grill Apr 19 '12 at 3:24
While code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. – Peter Grill Apr 19 '12 at 3:25

If the source information must not follow possible modifications made beforehand to the caption layout, I agree with Peter Grill's solution; however, I'd like to propose an alternative solution using the caption* command from the caption package; with this approach, the additional (unnumbered, unlisted) caption will also be sensible to modifications made to the caption layout.

Consider the following example: the first image shows that the source doesn't obey the 7cm width declared for captions; in the second image (using \caption*), the source will obey the 7cm modification:

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage{url}

\captionsetup[figure]{width=7cm}

\begin{document}

\begin{figure}
\centering
\includegraphics[width=70mm]{figure3}
\caption{TITLE OF IMAGE}
\small source by:\url{www.aly-abbara.com/livre_gyn_obs/images/testosterone_DHT.html}
\label{figure3}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=70mm]{figure3}
\caption{TITLE OF IMAGE}
\caption*{\small source by:\url{www.aly-abbara.com/livre_gyn_obs/images/testosterone_DHT.html}}
\label{figure4}
\end{figure}

\end{document}


-

You can place additional text outside of the \caption:

Also, as @GonzaloMedina pointed out, \small is a switch and does not take a parameter.

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{url}

\begin{document}
\begin{figure}[!h]
\centering
\includegraphics[width=70mm]{figure3}