General ⇒ how to fix anchor problem for a landscape long table
how to fix anchor problem for a landscape long table
I use \caption for my long table and also use \landscape to rotate the table. The \label command is right after \caption command. Whenever I click on that table hyperlink in pdf file, it will jump to the last page of that table instead of the top of that table. The same commands work well for non-rotated long table, is anyone know how to fix this anchor problem?
Thanks for your help.
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
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
how to fix anchor problem for a landscape long table
Code: Select all
\usepackage[all]{hypcap}
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
further question: fix anchor problem in landscape long table
Thanks for your reply, however it fixes all except the table with the following format:
\usepackage{times}
\usepackage{color}
\usepackage{longtable}
\setlongtables
\usepackage{rotating}
\usepackage{lscape}
\usepackage[hyperindex, pdfmark]{hyperref}
\usepackage[all]{hypcap}
\begin{landscape}
\begin{document}
\begin{longtable}{|c|c|c|c|c|c|c|l|}
\caption{Resonances}
\label{resonances}\\
\hline
$E_{\rm res}$ (MeV${}\pm{}$keV)
& $\Gamma_{\rm lab}$ (keV)
& $\Gamma_{\rm n}$ (keV)
& $\Gamma_{\rm p}$ (keV)
& $\Gamma_{\alpha}$ (keV)
& $J^{\pi}$
& \nuc{15}{N}* (MeV)
& \multicolumn{1}{|c|}{Refs.}\\
\hline
\endfirsthead
\caption{Resonances (continued)} \\
\hline
$E_{\rm res}$ (MeV${}\pm{}$keV)
& $\Gamma_{\rm lab}$ (keV)
& $\Gamma_{\rm n}$ (keV)
& $\Gamma_{\rm p}$ (keV)
& $\Gamma_{\alpha}$ (keV)
& $J^{\pi}$
& \nuc{15}{N}* (MeV)
&\multicolumn{1}{|c|}{Refs.}\\
\hline
\endhead
\hline
\endlastfoot
.........
\end{longtable}
\end{document}
\end{landscape}
Do you see any mistakes?
Thanks again!
Grace
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
how to fix anchor problem for a landscape long table
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
how to fix anchor problem for a landscape long table
Thanks for your reply.
If I run the following file 15.tex by using my style file, Datacomp.sty (see below for files) by using the commands: latex 15.tex dvips -z 15.dvi -Ppdf -o 15.ps
ps2pdf 15.ps 15.pdf ( I need to create ps file first for personal reason.)
Then, I click the blue link 15.1 in 15.pdf, it will be anchored to the second page of the table instead of the top of the table.
Can you see why?
Thanks again for your patience to answer my question.
- Attachments
-
- datacomp.sty
- (4.12 KiB) Downloaded 165 times
-
- 15.tex
- (4.34 KiB) Downloaded 190 times
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
how to fix anchor problem for a landscape long table
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: how to fix anchor problem for a landscape long table
Here is the BoxedEPS.tex.
Thanks.
- Attachments
-
- BoxedEPS.tex
- (25 KiB) Downloaded 194 times