37

I think I may have found a bug in either hyperref, cleverefoder varioref but can't determine the details any further. If do not load hyperref in the following example, the result is fine.

\documentclass[ngerman]{scrartcl}

\usepackage{babel}
%\usepackage{hyperref}
\usepackage{varioref}
\usepackage{cleveref}

\begin{document}

\section{Erster Abschnitt}\label{sec}

\begin{figure}
\rule{\textwidth}{1cm}
\caption{bild}\label{bild}
\end{figure}

Siehe \vref{sec}, siehe \vref{bild}

\end{document} 

good results without hyperref

If I load hyperref the reference reference to the section cannot be expanded, I get the following error instead:

! Argument of \@fourthoffive has an extra }.
<inserted text> 
                \par 
l.19 Siehe \vref{sec}
                     , siehe \vref{bild}
? 

bad results with hyperref

Any idea from which package this error may result?

38

Load varioref first, then hyperref, then cleveref. See section 14.1 of the cleveref manual.

\documentclass[ngerman]{scrartcl}

\usepackage{babel}
\usepackage{varioref}
\usepackage{hyperref}
\usepackage{cleveref}

\begin{document}

\section{Erster Abschnitt}\label{sec}

\begin{figure}
\rule{\textwidth}{1cm}
\caption{bild}\label{bild}
\end{figure}

Siehe \vref{sec}, siehe \vref{bild}

\end{document}

enter image description here

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.