# Make all \href text bold

For url's, I know the bare URL can be made bold, as illustrated in this question: How to make URL bold?.

How can I do the same thing, for an entire document, for the text field of \href?

Redefine \href to always use \href[.]{..}{\bfseries ...}:

\documentclass{article}

\usepackage{hyperref}
\usepackage{letltxmacro,xparse}

\LetLtxMacro\oldhref\href
\RenewDocumentCommand{\href}{o m m}{%
\IfValueTF{#1}
{\oldhref[#1]{#2}{\bfseries #3}}
{\oldhref{#2}{\bfseries #3}}%
}

\begin{document}

\href{http://tex.stackexchange.com}{\TeX.SE}

\end{document}


If you want all your urls bold using \href, you can redefine the \href macro by adding \bfseries to the second argument as follows:

\documentclass{article}
\usepackage{hyperref}

\let\oldhref\href
\renewcommand{\href}[2]{\oldhref{#1}{\bfseries#2}}

\begin{document}

Bold font:

\href{http://tex.stackexchange.com/}{http://tex.stackexchange.com/}

\href{http://tex.stackexchange.com/}{http://tex.stackexchange.com/}

\end{document}


• This doesn't reference \href at all – Adam_G Feb 2 '17 at 1:22
• @Adam_G - I modified for the case of href. Please see my edit. – AboAmmar Feb 2 '17 at 1:56