I am using Texmaker 3.1 on Windows 7 (also tried Texmaker 3.3.3 with the same result) with a MikTeX 2.9 back end to compile a document where I would like the table of contents to link to the pages. For this I normally use the hyperref package, and this has worked before in Texmaker on other machines.

On my present machine, Texmaker compiles without complaints, but in the resulting output the table of contents entries are not clickable. Here is a minimal example:

\documentclass[10pt,a4paper]{article}

\usepackage{hyperref}

\hypersetup{
citecolor=black,
filecolor=black,
urlcolor=black
}

\oddsidemargin 0.0in
\textwidth 6.5in

\begin{document}

\tableofcontents

\newpage

\section{First Section}

This is the first section.

\newpage

\section{Second Section}

This is the second section.

\subsection{A Subsection}
This is a subsection.

\end{document}


In this example I've coloured the links blue to demonstrate that my output does colour links correctly (my table of contents has blue entries) but nothing is clickable. In addition no PDF bookmarks are available in the output when I open it in Acrobat.

Since Texmaker isn't complaining about missing packages, etc., I'm at a loss as to what's going wrong. Any suggestions are appreciated.

UPDATE: I have got the Texmaker 3.1 version producing correct, clickable output now, but I'm not convinced this issue can be considered 'answered'. To share the stop-gap solution: I changed the settings in Texmaker for QuickBuild to be "pdfLaTeX + View PDF." This still doesn't explain why the other methods available for ending up with a PDF file don't work with the clickable table of contents entries, however.

UPDATE: As no responses have come at the original Stack Overflow location for this question, I am posting it here to expose it to the expert TeXnicians on this site.

-
Which underlying TeX distribution do you use? I'm guessing it's either TeXLive (2011?) or MikTeX (2.9?), but it's worth being explicit about this. After all, TeXmaker is "just" a front-end to whatever TeX engine that does the actual work... For what it's worth, when I run your MWE through MikTeX2.9 on a Windows Vista (gasp) machine and open the resulting pdf file in either Acrobat or Adobe Reader, all bookmarks one would expect to see are there. –  Mico Jun 12 '12 at 14:52
@Mico I've added the information about the distribution (MikTex 2.9, as you guessed). I've found this trouble occurs on my MacBook Pro using (confirmatory sigh) Windows Vista whereas my successful runs on a desktop machine were under Windows XP, so it was tempting to wonder whether that had something to do with it. The mystery is that I installed exactly the same (portable) MikTex and Texmaker files between my the XP and Vista machines, and yet I encountered this problem only in the case of Vista. –  jsl50 Jun 13 '12 at 9:54

It has obviously nothing to do with Texmaker or any other editor. I compiled your MWE first with Texworks 0.4.4 (1043) and then with Texmaker 3.3.4, both on Windozs 7 Enterprise.

So it is something with your system setup. Are you sure your version of hyperref is not corrupt? Try:

\usepackage{bookmarks}


bookmarks is part of the Oberdiek-bundle. See the documentation at CTAN.

And check your latex-engine. You are sure are using PDFLaTeX-profile so you are compiling PDFs directly and not indirectly using DVI->PDF?

UPDATE: As you say in your UPDATE: You have used the wrong profile (or the wrong options to the package). Try compile with the old profile but set dvipsor similar option (see page 3 in the hyperref's users manual).

You also write in your updated question:

This still doesn't explain why the other methods available for ending up with a PDF file don't work with the clickable table of contents entries, however.

Yes, this explain why. If you want clickable links using another engine than PDFLaTEx, you have to load hyperrefwith correct options for the engine.

-