I'm trying to emphasize my figure references with bold text. When referencing a labeled figure with \cref{fig:mylabel}
I get the correct text Abbildung 1
, however I'm having trouble formatting it.
I'm using the packages hyperref
and cleveref
with a German document setting. As per documentation there is the option \crefdefaultlabelformat
, however when I try to make the entire label bold (so including the name) with \crefdefaultlabelformat{\bfseries#2#1#3}
only the number reference will get emphasized. Same is true for \creflabelformat{figure}...
.
There is also the option to format the links provided by hyperref, but I was unable to find something that only targets these specific links.
\documentclass[ngerman]{article}
\usepackage{babel}
\usepackage[labelfont=bf]{caption}
\usepackage[colorlinks]{hyperref}
\usepackage[noabbrev, nameinlink]{cleveref}
\crefdefaultlabelformat{\bfseries#2#1#3}
\begin{document}
\begin{figure}[h]
\caption{Some image}
\label{fig:mylabel}
\end{figure}
This should all be bold \(\rightarrow\) \cref{fig:mylabel}
\end{document}