MiKTeX and proTeXtHyperref pointing to incorrect object

Information and discussion about MikTeX distribution for Windows and the related proTeXt: Installing, updating, configuring
Post Reply
wasabi
Posts: 3
Joined: Sat Jun 21, 2014 4:34 am

Hyperref pointing to incorrect object

Post by wasabi »

I am running Texmaker (latest version, with MikTeX 2.9) on Windows. I have the following code (an MWE, obviously):

Code: Select all

\documentclass[12pt]{book}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage[backref=page,dvipdfm,colorlinks=false,bookmarksopen=true,breaklinks=true]{hyperref}
\begin{document}
\begin{figure}[htbp]
    \centering
    \subfigure[Perfil e elevao da viga, com traado do cabo]
    {
        An image
        \label{fig:f1a}
    }
    \\
    \subfigure[do cabo]
    {
        Another image
        \label{fig:f1b}
    }
    \\
    \subfigure[Ancoragem do cabo e da viga]
    {
        Yet another image
        \label{fig:f1c}
    }
    \caption{Viga com protenso axial}
    \label{fig:f1}
\end{figure}
\pagebreak
\begin{figure}[htbp]
    \centering
    \subfigure[Perfil e elevao da viga, com traado do cabo]
    {
        An image 2
        \label{fig:f2a}
    }
    \\
    \subfigure[Perfil de tenses na]
    {
        Another image 2
        \label{fig:f2b}
    }
    \caption{Viga com excentrica}
    \label{fig:f2}
\end{figure}
\ref{fig:f1a}
\ref{fig:f2a}
\end{document}
The resulting file is attached. It is two pages, each with a subfigure. There are also two references thrown in, pointing each to different subfigures in different figures. However, both of these references are clearly pointing to the same subfigure (1a). The reason I post this in the MikTeX forum is because I've been told that when this is compiled in TeXlive 2014 on Linux, this error does not occur, which tells me I'm probably doing something wrong, MikTeX-wise (or Texmaker).
Attachments
DissertacaoPKKN.pdf
(7.27 KiB) Downloaded 371 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: Hyperref pointing to incorrect object

Post by kaiserkarl13 »

Have you tried running this example without TeXMaker? I've found such IDE-like environments to be a great way to obscure error messages. If you get the same error with latex + dvipdfm, you know it's TexMaker's fault.

By the way, is there a specific reason to use dvipdfm over pdflatex? The latter handles PDF specificts more directly, and usually cooperates better with hyperref in my experience.
Post Reply