7
%url package
\usepackage{url}

%code that makes URL font the same
\newcommand{\urlwofont}[1]
{
\urlstyle{same}\url{#1}
}

\begin{figure}[htbp]
    \centering
    \includegraphics[width=8cm, scale=0.55]{../Figures/~}
    \caption{\small ~).
\protect\urlwofont{http://www.google.com/~}}
    \label{~}
\end{figure}

I am using this sequence when stating reference URL for figures.

However, how can I make this URL bold?? I tried to use {\bf}, but I don`t know where to put it or how to use it. Can anybody give advice for this?

  • Hi Michita, welcome to tex exchange! I indented your code snippets by clicking on the {} icon, and used backticks to highlight your {\bf}. I also removed the thanks- it may sound strange, but the best way to thank folks is to 'upvote' (and hopefully, accept) their answers :) – cmhughes Mar 9 '12 at 22:36
9
\documentclass{article}
\pagestyle{empty}
\usepackage{url}  % or \usepackage{hyperref}
\begin{document}

Normal font:
\url{http://tex.stackexchange.com/}


Bold:
\def\UrlFont{\bfseries}
\url{http://tex.stackexchange.com/}
\end{document}

enter image description here

6

You may use UrlFont like this:

\def\UrlFont{\bfseries\rmfamily}  
\url{This is bold roman}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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