6

I want to use PDF bookmarks with LaTeX->PS->PDF (with MiKTeX 2.9 on Windows 8.1 with DviPs and Ghostscript).

The bookmarks appear correctly in the PDF, but clicking them does nothing.

If I use pdflatex to compile the same document, the bookmarks appear and work correctly when being clicked. I also tried another document not written by myself which also works in pdflatex but not with latex.

I don't get any error or warning concerning bookmarks or hyperref.

I included the following packages last:

\usepackage[ps2pdf]{hyperref}
\usepackage{bookmark}

I also tried just \usepackage{hyperref}instead of the ps2pdf one.

In my document, the structure is as follows:

\chapter{Chapter}\label{cha:Chapter}
\section*{Section}\label{sec:Section}
\subsection{Subsection}\label{sec:Subsection}

Any help would be very appreciated.

Edit: Here is a minimal working example:

\documentclass[11pt, a4paper, twoside, fleqn, ngerman]{scrreprt}

\usepackage[ps2pdf]{hyperref}
\usepackage{bookmark}

\begin{document}

\chapter{Chapter 1}\label{cha:Chapter1}

\section*{Section 1}\label{sec:Section1}
Text here

\newpage

\section*{Section 2}\label{sec:Section2}

\newpage
\chapter{Chapter 2}\label{cha:Chapter 2}

\end{document}
  • 1
    Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 May 19 '14 at 12:41
  • I used your MWE and it works perfectly, i.e. clicking leads to the right place! Do you use the latest TeX distribution? – user31729 May 19 '14 at 13:15
  • I use MiKTeX 2.9 and the newest Ghostscript 9.14. So maybe something is wrong with my configuration? – Lars May 19 '14 at 13:19
  • Do you use ps2pdf as conversion from dvips output to .pdf? There is also dvipdf, the direct conversion from .dvi to .pdf format, omitting the ps2pdf step (if applied at all) – user31729 May 19 '14 at 13:20
  • Yes, I use ps2pdf with dvips output! – Lars May 19 '14 at 13:23
6

Ghostscript 9.14 is broken, Ulrike Fischer has already reported it: Bug 695162 - Internal hyperlinks lost when converting to pdf. And Ken Sharp has fixed this in the master sources (2014-04-23).

Workarounds:

  • Use an older ghostscript (9.10 works),
  • build ghostscript from the current master sources or
  • wait for 9.15.

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.