
Para las URL, sé que la URL básica se puede poner en negrita, como se ilustra en esta pregunta:¿Cómo poner la URL en negrita?.
¿Cómo puedo hacer lo mismo, para un documento completo, para el campo de texto de \href
?
Respuesta1
Redefinir \href
para usar siempre \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}
Respuesta2
Si desea que todas sus URL estén en negrita \href
, puede redefinir la \href
macro agregando \bfseries
al segundo argumento la siguiente manera:
\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}