I'm new to Latex and I want to put a long URL in a figure caption without having to escape every special character like "_" with a backslash. Since \verb cannot be used in a command argument, I tried putting the URL between the \begin{verbatim} and \end{verbatim} commands. Unfortunately, it doesn't seem to work. The error MiKTeX 2.7 gives me is:
Here is my code:LaTeX Error: Something's wrong--perhaps a missing \item.
Code: Select all
\begin{figure}[h!]
\begin{center}\
\includegraphics{my image name}
\caption{Visual processing areas of the brain. Source:
\begin{verbatim}
http://thebrain.mcgill.ca/flash/a/a_02/a_02_cr/a_02_cr_vis/a_02_cr_vis_3c.jpg
\end{verbatim}}
\end{center}
\end{figure}
Thanks.