2

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[breaklinks]{hyperref}
\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}

output

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.

2

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.

falsify quadpoints

\documentclass[a4paper,12pt]{article}

\usepackage[hmargin=2.4cm]{geometry} % to get margins which create a line break within the link
\usepackage[breaklinks]{hyperref}
\usepackage[quadpoints=false]{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}

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.