4

I am getting red boxes around hyperlinks on the PDF output. Apparently contrary to this question the boxes are actually part of the final PDF, as when I save a copy of the PDF the red boxes remain.

I think the problem is coming from the only error I get on build:

! Package hyperref Error: Wrong DVI mode driver option 'hypertex'

which I believe has been produced since changing from LaTeX>>DVI to LaTeX>>PDF

Using TeXnic Center and the following packages:

\documentclass[a4paper,twoside,10pt]{report}
\usepackage[hypertex]{hyperref}
\usepackage[USenglish]{babel} %francais, polish, spanish, ...
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage[ansinew]{inputenc}
\usepackage{lmodern} %Type1-font for non-english texts and characters
\usepackage{caption}

\renewcommand{\labelitemii}{$\star$}
\begin{document}
Sean Allred
  • 27,421
Stumbler
  • 199
  • 1
  • 2
  • 7

1 Answers1

12

The red boxes are link annotations that are part of the final PDF file, of course. But they are not part of the page description and they are usually not printed (sometimes configurable).

The documentation of hyperref lists many options regarding the visual appearance of the links, e.g.:

  • colorlinks: Instead of the boxes, the contents is colored, but this color is part of the page description and is always printed.
  • linkcolor and friends set the color for the link types and option colorlinks.
  • linkbordercolor and friends set the link border color for the different link types.
  • hidelinks: the reader does not see any link markings.

If you compile the document with pdflatex, then the correct driver option is pdftex. DVI driver options like hypertex are wrong in this case. Thus the error message is correct. Some drivers are detected automatically, e.g.:

  • pdfTeX/luaTeX in PDF mode
  • XeTeX
  • VTeX

The DVI driver is a program that runs after LaTeX, therefore hyperref cannot know the driver. It uses (will use) dvips as default driver option. If you prefer hypertex in this case, then you can also use

\usepackage[driverfallback=hypertex]{hyperref}

However, the link appearance cannot be set by hyperref, because the hypertex specials can only say, where is a link. The appearance depends on the viewer/dvi driver.

Heiko Oberdiek
  • 271,626
  • 1
    Answer \usepackage[driverfallback=hypertex]{hyperref} To remove build error and, from comment on linked question, \documentclass[hidelinks,12pt]{report} And thus adding the necessary parameter as a global option to the \documentclass declaration. – Stumbler Jul 30 '13 at 21:03