4

This question already has an answer here:

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}

marked as duplicate by mafp, Stefan Kottwitz Jul 30 '13 at 20:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Add the colorlinks option to hyperref and check over the LaTeX Wikibook. – Sean Allred Jul 30 '13 at 20:05
  • And, as before, it's always best to include a minimal working example. – Sean Allred Jul 30 '13 at 20:09
  • 1
    Skip that option for loading hyperref. And load hyperref later on: see this question. – jon Jul 30 '13 at 20:10
  • Though this statement doesn't contain a question, the link to the mentioned question may help. Please write in form of a question if you have one, not just like "I'm getting something." - which may be normal. – Stefan Kottwitz Jul 30 '13 at 20:54
11

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.

  • 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

Not the answer you're looking for? Browse other questions tagged or ask your own question.