6

Is there an option which allows me to typeset bold hyperlinks? Here's a MWE explaining my problem:

\documentclass[a4paper, 11pt]{article}

\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{hyperref}
\hypersetup{%
    colorlinks=true,
    linkcolor=black,
    citecolor=Magenta}

\begin{filecontents}{biblio.bib}

@book{borgesESP,
  author = {Borges, J. L.},
  publisher = {Emecé},
  year = {1956},
  title = {Ficciones},
  }
\end{filecontents}

\begin{document}
``Mirrors and fatherhood are abominable'' \cite{borgesESP}

\bibliography{biblio}{}
\bibliographystyle{amsalpha}
\hrulefill 
\end{document}

enter image description here

I want the "Bor56" to be in boldface. Is there a way to do this?

The naive way (modifying the \cite command) gives no result, or an error:

\newcommand{\citebf}[2][]{\cite[#1]{\bf #2}}

thinks the \bf as inside the reference label.

9

Yes, you can override the kernel \@cite macro to make it bold. But then you'd probably also like to make the label in the bibliography - \@biblabel - bold:

enter image description here

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage{filecontents}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{hyperref}
\hypersetup{%
    colorlinks=true,
    linkcolor=black,
    citecolor=Magenta}

\begin{filecontents}{biblio.bib}
@book{borgesESP,
  author = {Borges, J. L.},
  publisher = {Emecé},
  year = {1956},
  title = {Ficciones},
  }
\end{filecontents}

\makeatletter
\def\@cite#1#2{[\textbf{#1\if@tempswa , #2\fi}]}
\def\@biblabel#1{[\textbf{#1}]}
\makeatother

\begin{document}
``Mirrors and fatherhood are abominable'' \cite{borgesESP}

\bibliography{biblio}{}
\bibliographystyle{amsalpha}

\end{document}
  • I accepted the answer since it works in the MWE, but it doesn't work in the real file and I can't understand why! – Fosco Jun 23 '15 at 6:28
  • @tetrapharmakon: Without posting something that reproduces the problem, it's impossible to say how to solve your issue. We can't read your mind... – Werner Jun 23 '15 at 6:34
  • 1
    Sure, I'm working on it; I was only saying "I'll be back". – Fosco Jun 23 '15 at 7:58
  • Apparently, commenting the \usepackage[noadjust]{cite} row in the preamble makes everything work fine. Now, why does this happen? (you can use the former MWE, just de/commenting \usepackage[noadjust]{cite}) – Fosco Jun 23 '15 at 10:42
  • @tetrapharmakon: I can't seem to reproduce your problem. With or without \usepackage[noadjust]{cite} I still receive the expected output. If you're still experiencing the same problem, please provide the community with a minimal working example (MWE) that replicates the problem. – Werner Jun 23 '15 at 17:18

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.