3

I was wondering if anyone could help me. I don't know much about LaTeX, but I'm trying to reference sideways figures in my text. When I click on the links in the pdf they take me to completely different pages to those intended. All the other links to figures which are not sideways work fine though.

\documentclass{book}
\renewcommand{\rmdefault}{pbk}
\usepackage[margin=1in]{geometry}                  
\geometry{a4paper,margin=1in,}                 
\usepackage[demo]{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
\usepackage{textcomp}
\usepackage{fontenc}
\usepackage{rotating}
\usepackage{multirow}
\usepackage{amsmath}
\usepackage{mathcomp}
\usepackage{url}
\usepackage{makeidx}
\usepackage{mathabx}
\usepackage{hyperref}
\usepackage[all]{hypcap}

\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
\newcommand{\LINN}[1]{\emph{#1}}

\renewcommand{\rmdefault}{pbk}
\renewcommand{\sfdefault}{pag}
\renewcommand{\ttdefault}{pcr}

\makeindex

\begin{document}

A map and satellite picture of the study site are presented in figure~\ref{fig:studysite}. 


\begin{center}
\begin{sidewaysfigure}
\centering
\includegraphics[scale=0.48]{../../../PHDMaps/Studysite.jpg}
\caption{Map and satellite picture of the study site.\label{fig:studysite}}
\end{sidewaysfigure}
\end{center}
\end{document}
3
  • you can use the option [demo] for graphicx, wehen the image is not available for others. I cannot see a problem here. Clicking on the link I get the image.
    – user2478
    Dec 28, 2010 at 12:14
  • The center environment is superfluous since the floating environment inside it will "float" out of it.
    – user2574
    Dec 28, 2010 at 12:25
  • Using the caption package with hypcap=true instead of the hypcap package solved this problem for me. See this answer
    – Emit Taste
    Nov 2, 2013 at 18:07

1 Answer 1

3

Your example code works fine here. What versions of the hyperref and hypcap package are you using? Please place a \listfiles at the head of your document and take a look at the resulting logfiles.

These are the versions I have used:

hyperref.sty    2010/10/30 v6.81t Hypertext links for LaTeX
  hypcap.sty    2008/09/08 v1.10 Adjusting anchors of captions (HO)
2
  • hyperref 2009/10/09 v6.79a Hypertext links for LaTeX and hypcap 2008/09/08 v1.10 Adjusting anchors of captions (HO). Is there an easy way to update the versions? Thank you very much.
    – Anna
    Dec 28, 2010 at 12:50
  • What LaTeX distribution (i.e. MikTeX, TeX Live, MacTeX) do you have? Edit: For MikTeX on Windows, use the Update manager, that you'll find in the MikTeX folder in the start menu. Dec 28, 2010 at 13:08

You must log in to answer this question.