脚注超链接位于脚注文本的末尾

脚注超链接位于脚注文本的末尾

我使用以下代码来获取脚注样式。创建 PDF 后,如果我单击脚注编号,它会转到“第一个脚注文本”的第二行,而不是第一行。此外,第二个脚注只包含一行文本。如果我单击第二个脚注,它会转到第三个脚注文本。

请建议如何转到每个脚注的第一行而不是第二行。

\documentclass{article}

\usepackage[hyperfootnotes,raiselinks]{hyperref}
\hypersetup{
    colorlinks,%
    citecolor=blue,%
    filecolor=blue,%
    linkcolor=blue,%
    urlcolor=blue
}

\usepackage{footnote}

\begin{document}

This is a sample text. This is a sample text. This is a sample text. This is a sample text.
This is a sample text. This is a sample text. This is a sample text. This is a sample text.
This is a sample text.\footnote{Footnote text Footnote text Footnote text Footnote text Footnote text Footnote text
Footnote text Footnote text Footnote text Footnote text Footnote text} This is a sample text. This is a sample text. This is a sample text.
This is a sample text. This is a sample text. This is a sample text. This is a sample text.

This is a sample text. This is a sample text. This is a sample text. This is a sample text.
This is a sample text. This is a sample text. This is a sample text. This is a sample text.
This is a sample text.\footnote{Footnote text Footnote text Footnote text Footnote text Footnote} This is a sample text. This is a sample text. This is a sample text.
This is a sample text. This is a sample text. This is a sample text. This is a sample text.

This is a sample text. This is a sample text. This is a sample text. This is a sample text.
This is a sample text. This is a sample text. This is a sample text. This is a sample text.
This is a sample text.\footnote{Footnote text Footnote text Footnote text Footnote text Footnote text Footnote text
Footnote text Footnote text Footnote text Footnote text Footnote text} This is a sample text. This is a sample text. This is a sample text.
This is a sample text. This is a sample text. This is a sample text. This is a sample text.

.....
.....
.....

\end{document}

答案1

抱歉,其实我想以评论的形式发布,但我不能。所以我决定以答案的形式发布。

首先,我认为问题出在您的应用程序上(可能?)。我对您的原始代码进行了少许修改,测试后发现运行正常。我在 Ubuntu 14.04 上使用 Document Viewer 和 Foxit Reader 6.14 进行了测试。

我提供了 2 个代码供您测试。第一个代码是对您的原始代码进行了一些修改。第二个代码只需将您的虚拟文本替换为长文本即可。这样,您就可以看到脚注指针到底指向什么。

第一个代码

\documentclass{article}

\usepackage[hyperfootnotes,raiselinks]{hyperref}
\hypersetup{
    colorlinks,%
    citecolor=blue,%
    filecolor=blue,%
    linkcolor=blue,%
    urlcolor=blue
}

\usepackage{footnote}

\begin{document}

This is a sample text. This is a sample text. This is a sample text. This is a sample text.
This is a sample text. This is a sample text. This is a sample text. This is a sample text.
This is a sample text.\footnote{Footnote text Footnote text Footnote text Footnote text Footnote text Footnote text
Footnote text Footnote text Footnote text Footnote text Footnote text} This is a sample text. This is a sample text. This is a sample text.
This is a sample text. This is a sample text. This is a sample text. This is a sample text.

This is a sample text. This is a sample text. This is a sample text. This is a sample text.
This is a sample text. This is a sample text. This is a sample text. This is a sample text.
This is a sample text.\footnote{Footnote text Footnote text Footnote text Footnote text Footnote} This is a sample text. This is a sample text. This is a sample text.
This is a sample text. This is a sample text. This is a sample text. This is a sample text.

This is a sample text. This is a sample text. This is a sample text. This is a sample text.
This is a sample text. This is a sample text. This is a sample text. This is a sample text.
This is a sample text.\footnote{Footnote text Footnote text Footnote text Footnote text Footnote text Footnote text
Footnote text Footnote text Footnote text Footnote text Footnote text} This is a sample text. This is a sample text. This is a sample text.
This is a sample text. This is a sample text. This is a sample text. This is a sample text.

.....
.....
.....
\newpage
test
\end{document}

屏幕截图 #1(使用文档查看器) 在此处输入图片描述

第二

\documentclass{article}

\usepackage[hyperfootnotes,raiselinks]{hyperref}
\hypersetup{
    colorlinks,%
    citecolor=blue,%
    filecolor=blue,%
    linkcolor=blue,%
    urlcolor=blue
}

\usepackage{footnote}

\usepackage{lipsum}

\begin{document}
\footnote{\lipsum[1]}\lipsum[1]
\footnote{\lipsum[2]}\lipsum[2]
\footnote{\lipsum[3-6]}\lipsum[3]
\end{document}

屏幕截图 #2(使用文档查看器) 在此处输入图片描述

相关内容