I am trying to make a reference in my text to a sidewaystable. but if I click the link in my pdf it keeps sending me to the wrong place. when I changed sidewaystable to table it worked fine. what should I do?
\documentclass[12pt]{article}
\usepackage{tabularx}
\usepackage{hyperref}
\begin{sidewaystable}
\begin{tabularx}{\textwidth}{XXXXX}
the contents of my table
\end{tabularx}
\caption{\footnotesize Articles included in the review.}
\label{IncludedArticles}
\end{sidewaystable}
\documentclass[12pt]{article}
\usepackage{rotating,tabularx}
\usepackage{hyperref}
\begin{document}
\autoref{IncludedArticles}
\begin{sidewaystable}
\begin{tabularx}{\textwidth}{XXXXX}
the contents of my table
\end{tabularx}
\caption{\footnotesize Articles included in the review.}
\label{IncludedArticles}
\end{sidewaystable}
\end{document}
I'm sorry for the incomplete post, I hope this one is better.
I did have the rotating package in my preamble. I made another more simple sidewaystable and it refers me to the wrong place as well. the first sidewaystable is on page 8 but the reference sends me to the top of page 4, the second sidewaystable is on page 9 and the reference sends me to the top of page 5
boschjesman wrote:I'm sorry for the incomplete post, I hope this one is better.
This one works for me as expected. What problem exactly do you have with it? Where does it jump to if you click "Table 1"?
the first sidewaystable is on page 8 but the reference sends me to the top of page 4, the second sidewaystable is on page 9 and the reference sends me to the top of page 5
Your example has only 2 pages so I'm not able to reproduce this.
the table is part of a larger document that I can't post completely. if I click table 3 (the reference to my original table) it jumps to page 4, if I click table 4 (the simplified example I posted) it jumps to page 5.
After you said it worked I made a new document with just the example I posted. then I get two pages, one with the link 'table 1' and one with the table. when I click this link nothing happens. after I added some extra pages it jumps to page 2 when I click table 1.
When I compile that, I get a 7 page document. There's a link on page 6 "Table 1", and a sideways table on page 7. When I click the link, it takes me to the table on page 7. Is that not what you're seeing? Does compiling an extra time help?
that is exactly what I would expect. but if i run this file I get a 7 page document with 'table 1' as reference on page 6 and the sidewaystable on page 6. however, when is click the link it jumps to page 2. compiling an extra time didn't help
I used the pdf within latex itself. When I open it with adobe reader it works just fine . still strange that it doesn't work within latex, but their is no real problem anymore.
boschjesman wrote:I used the pdf within latex itself.1
I don't follow that. LaTeX (and pdfLaTeX) are command-line programs which convert a source document into DVI (or PDF). They don't have built in viewers.
You probably mean the built-in PDF viewer of an editor like TeXworks or TeXmaker or TeXshop. Those are not the same thing as "LaTeX itself". It might be worth mentioning which one in case anyone else has the same problem.