# hyperref with breaklinks option + hypdvips give unexpected output

Consider the following example:

\documentclass[a4paper,12pt]{article}

\usepackage[hmargin=2.4cm]{geometry} % to get margins which create a line break within the link
\usepackage{hypdvips}

\begin{document}

\subsection{something}
\label{spm:41}
\subsection{something}
\label{spm:43}
F{\o}lgende figur viser en skitse, der er set fra siden, af biografsalen,
som omtales i \autoref{spm:41}--\ref{spm:43}:

\end{document}


Why is the entire text hyperlinked and not just subsec-, tion 0.1, and 0.2 and how do I fix this?

P.S. I compile via latex --> dvips --> ps2pdf.

Do you want quadpoints=false? Otherwise, hypdvips tries to set the link area to an entire rectangle so that it can create a single link, even when the link text breaks across lines. So, when a reference is split across lines, it ends up including the area before the reference starts and the area after the reference ends to create a single rectangle. At least, that's what I gather from the documentation. Setting this to false creates separate links on each line.

\documentclass[a4paper,12pt]{article}

\usepackage[hmargin=2.4cm]{geometry} % to get margins which create a line break within the link