25

I'm trying to get hyperref to work with pdflatex, but I'm getting the error hyperref Warning: Draft mode on and since all hyperrefs are disabled in draft mode, there are no links being created.

I tried doing the following: \usepackage[final]{hyperref} but still no success.

I'm using document class book: \documentclass{book} so nowhere do I say that I want draft enabled.

Tried compiling on two different machines with TexnicCenter using pdflatex(LaTeX=>PDF).

Any suggestions?

Filip Ekberg
  • 2,503

3 Answers3

31

According to the documentation,

\hypersetup{final}

should do the trick.

egreg
  • 1,121,712
19

Try:

\usepackage[draft=false]{hyperref}

Additionally, if you want to leave hyperref on for links but keep the same printed output, use something like:

\usepackage[hidelinks,draft=false]{hyperref}

When combined with a package like

\usepackage[obeyDraft]{todonotes}

it's really great and you can just change the draft option in the \documentclass[] and you can turn your 'to do' notes on and off really easily.

codebeard
  • 1,285
0

I'm using your same code (with no relevant variations) and it works perfectly for me:

\documentclass[11pt,a4paper,twoside,openright,draft]{book}
\PassOptionsToPackage{obeyDraft}{todonotes}
%PassOptionsToPackage{hidelinks}{hyperref} % uncomment to hide links
\PassOptionsToPackage{final}{hyperref}
\usepackage{thesis-preamble}
\begin{document}

thesis-preamble.sty contains the line:

\RequirePackage{hyperref}

Also \RequirePackage[final]{hyperref} (and no PassOptionsToPackage) works.