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?

10
  • 2
    Make a complete example. Aug 6, 2012 at 9:47
  • @UlrikeFischer, Working on it.. creating just a simple MWE works, so gotta figure out what breaks it.. :) Aug 6, 2012 at 9:50
  • Look in the log-file if another package loads hyperref before you do it. Or if you load a package which could interact with hyperref. Aug 6, 2012 at 9:52
  • 1
    @UlrikeFischer, Maybe this is the culpit? \RequirePackage[unicode=true,draft,bookmarks=false]{hyperref} Aug 6, 2012 at 9:53
  • It's quite strange that a package loads hyperref with the draft option turned on.
    – egreg
    Aug 6, 2012 at 10:08

3 Answers 3

31

According to the documentation,

\hypersetup{final}

should do the trick.

2
  • where should I place it
    – F 505
    Dec 4, 2017 at 20:58
  • 1
    @F505 Just before \begin{document} should do.
    – egreg
    Dec 4, 2017 at 21:15
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.

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.

2
  • This seems to be almost the same as in the already stated answers. Mar 29, 2018 at 18:21
  • Other answers have minor differences, what I mean that I've done exactly the same thing as the asker, but it works for me Mar 29, 2018 at 18:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .