LaTeX forum ⇒ Text Formattinghyperref | Option "breaklinks" with dvips Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

hyperref | Option "breaklinks" with dvips

Postby svend_tveskaeg » Mon Feb 06, 2012 2:43 am

Hi all.

Consider the following MWE:

  1. \documentclass{article}
  2. \usepackage[danish]{babel}
  3. \usepackage[breaklinks=true]{hyperref}
  4.  
  5. \begin{document}
  6.  
  7. \tableofcontents
  8. \bigskip
  9.  
  10. \section{A title which is longer that the width of the page in order to illustrate the problem}
  11.  
  12. \end{document}

When I compile via latex + dvips + ps2pdf (I have PSTricks figures and EPS pictures in my real document), I get the following warning:

Package hyperref Warning: You have enabled option `breaklinks'.
(hyperref) But driver `hdvips.def' does not suppport this.
(hyperref) Expect trouble with the link areas of broken links.

Is there any way to fix this so that the link from a ToC entry, which i longer than the textwidth, will be correct? (It obviously is not correct in the MWE above.)

Thank you in advance!

P.S. The two and a half lines just before the beginning of section 3.3 in the hyperref manual is not very encouraging reading. :( Therefore, I am looking for some other trick.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)

User avatar
Stefan Kottwitz
Site Admin
Posts: 9406
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Mon Feb 06, 2012 9:18 am

Hi,

load the hypdvips package. It adds support for breaking links with dvips.

  1. \usepackage{hypdvips}


Stefan
Site admin

User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Postby svend_tveskaeg » Mon Feb 06, 2012 3:45 pm

Awesome!

Thank you.

To other users: You have to load the package after hyperref. (It is all in the documentation.)
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 2 guests