1

Im writing a thesis and uses \cref for my references. However every single \cref provides a Warning stating 'Suppressing empty link'. I could ignore this warnings, but its actually so many of them that they starts to clog up the message log. Any ideas how to remove these empty links?

\hypersetup{
colorlinks = true,
citecolor = title,
linkcolor = title,
    urlcolor = title
}
\usepackage[noabbrev]{cleveref}
\creflabelformat{figure}{\color{tudelft-dark-blue} \textbf{#1#2#3}}
\crefname{figure}{figure}{figures}
\creflabelformat{table}{\color{tudelft-dark-blue} \textbf{#1#2#3}}
\crefname{table}{table}{table}
\creflabelformat{equation}{[#1#2#3]}
\creflabelformat{equation}{\color{tudelft-dark-blue}(#1#2#3)}
\crefname{equation}{\color{tudelft-dark-blue}equation}{equations}
\crefrangeformat{equation}{eq. #3[#1]#4--#5[#2]#6}
\crefrangeformat{equation}{equation #3#1#4--#5#2#6}

enter image description here

  • 2
    can you not make a small self-contained document that shows the problem, so people can debug it? – David Carlisle Nov 20 '16 at 11:04
2

The references are indeed empty:

\creflabelformat{figure}{\color{tudelft-dark-blue} \textbf{#1#2#3}}

#1 is the reference text, #2 the start link and #3 the end link. The order should be #2#1#3:

\documentclass{article}
\usepackage{xcolor}
\colorlet{title}{blue}
\colorlet{tudelft-dark-blue}{blue!50!black}
\usepackage{hyperref}

\hypersetup{
colorlinks = true,
citecolor = title,
linkcolor = title,
    urlcolor = title
}
\usepackage[noabbrev]{cleveref}
\creflabelformat{figure}{\color{tudelft-dark-blue} \textbf{#2#1#3}}
\crefname{figure}{figure}{figures}
\creflabelformat{table}{\color{tudelft-dark-blue} \textbf{#2#1#3}}
\crefname{table}{table}{table}
\creflabelformat{equation}{[#2#1#3]}
\creflabelformat{equation}{\color{tudelft-dark-blue}(#2#1#3)}
\crefname{equation}{\color{tudelft-dark-blue}equation}{equations}
\crefrangeformat{equation}{eq. #3[#1]#4--#5[#2]#6}
\crefrangeformat{equation}{equation #3#1#4--#5#2#6}

\begin{document}
  \section{Section}\label{sec:section}
  \begin{equation}E=mc^2\label{eq:equation}\end{equation}
  \begin{figure}\caption{Caption}\label{fig:figure}\end{figure}

  Section \cref{sec:section}\\
  Equation \cref{eq:equation}\\
  Figure \cref{fig:figure}
\end{document}
| improve this answer | |
  • So sorry i didnt provide a small self-contained document that shows the problem. Didnt know the numbering within the equation had any indications thank you Heiko – onmikkelsen Nov 20 '16 at 12:08

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.