平均能量损失
\documentclass[a4paper,11pt]{book}
\usepackage{tabularx}
\usepackage[svgnames]{xcolor}
\usepackage{footnote}
\usepackage[colorlinks=true,linkcolor=blue]{hyperref}
\makesavenoteenv{tabular}
\makesavenoteenv{table}
\begin{document}
FIRST PAGE
\newpage
\begin{tabular}{|l|c|c|l|c|c|}
\hline
A & 1 & 2\footnote{Go to 1. page}& 1 & 2\footnote{Go to 1. page} \\ \hline
B & 2 & 1 & 1 & 2\footnote{Go to 1. page} \\ \hline
C & 3 & 3 & 1 & 2\footnote{Go to 2. page}\\ \hline
\end{tabular}
\begin{tabular}{|l|c|c|}
\hline
A & 1 & 2\footnote{Go to 2. Page} \\ \hline
B & 2 & 1 \\ \hline
C & 3 & 3 \\ \hline
\end{tabular}
\begin{tabular}{|l|c|c|}
\hline
A & 1 & 2\footnote{Go to 1. Page} \\ \hline
B & 2\footnote{Go to 2. Page} & 1 \\ \hline
C & 3 & 3 \\ \hline
\end{tabular}
\begin{tabular}{|l|c|c|}
\hline
A & 1 & 2\footnote{Go to 1. Page} \\ \hline
B & 2\footnote{Go to 1. Page} & 1 \\ \hline
C\footnote{Go to 2. Page} & 3 & 3 \\ \hline
\end{tabular}
\end{document}
并输出
事实上,整个脚注都是Go to 2. page
用鼠标消息编写的。我该如何纠正我的 MWE?也许吧threeparttable
?
有关的:表格中的脚注出现在错误的页面上
[已编辑]对于@JohnKormylo 的回答
\documentclass[a4paper,11pt]{book}
\usepackage{tabularx}
\usepackage[svgnames]{xcolor}
\usepackage{footnote}
\usepackage[colorlinks=true,linkcolor=blue]{hyperref}
\makesavenoteenv{tabular}
\makesavenoteenv{table}
\usepackage{blindtext}
\begin{document}
FIRST PAGE
\newpage
\begin{tabular}{|l|c|c|l|c|c|}
\hline
A & 1 & 2\footnote{Go to 1. page}& 1\hyperlink{z}{\ \color{magenta}{$^{2}$}}%
\addtocounter{footnote}{1}\footnotetext{\hypertarget{z}{\blindtext}} & 2\\ \hline
B & 2 & 1 & 1 & 2 \\ \hline
C & 3 & 3 & 1 & 2\footnote{Go to 2. page}\\ \hline
\end{tabular}
\newpage
FIRST PAGE
\newpage
FIRST PAGE
\end{document}
并且,第二个脚注单击输出
并且,第三个脚注点击输出
可以看出,第二个脚注从一半开始。第三个脚注从整行开始。有人知道如何修复它吗?
答案1
随着tablefootnote 包此外,\spewtabnotes
您还应该能够获得所需的脚注/链接:
\documentclass[a4paper,11pt]{book}
\usepackage{tabularx}
\usepackage[svgnames]{xcolor}
\usepackage{footnote}
\usepackage{tablefootnote}
\makeatletter%
\newcommand{\spewtabnotes}{%
\tfn@tablefootnoteprintout%
\global\let\tfn@tablefootnoteprintout\relax%
\gdef\tfn@fnt{0}}%
\makeatother%
\usepackage[colorlinks=true,linkcolor=blue]{hyperref}
\makesavenoteenv{tabular}
\makesavenoteenv{table}
\usepackage{blindtext}
\begin{document}
FIRST PAGE
\newpage
\phantomsection\label{interesting}SECOND PAGE
\begin{tabular}{|l|c|c|l|c|c|}
\hline
A & 1 & 2\tablefootnote{Go to 1. page}& 1\tablefootnote{\blindtext} & 2\\ \hline
B & 2 & 1& 1 & 2 \\ \hline
C & 3 & 3 & 1 & 2 \tablefootnote{Go to \protect\pageref{interesting}. page}\\ \hline
\end{tabular}
\spewtabnotes
\newpage THIRD PAGE
\newpage FOURTH PAGE
\end{document}
而且当您使用hyperref
anyway时,您也可以链接到目标页面。