使用 hyperref 时,如何使超链接导航到 LaTeX 中的图形顶部? [英] How to make a hyperlink navigate to the top of the figure in LaTeX when using hyperref?

查看:20
本文介绍了使用 hyperref 时,如何使超链接导航到 LaTeX 中的图形顶部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 LaTeX 文档,其中包含一个图形和对它的引用:

I have a LaTeX document with a figure and references to it:

egin{figure}
...
caption{...}
label{fig:1}
end{figure}


ef{fig:1}

我使用 hyperref 包在生成的 PDF 中获取超链接.但是,指向该图的链接导航到标题,使该图本身不在视图中.如何让它导航到图形的开头而不将标题移动到顶部?

I use the hyperref package to get hyperlinks in the resulting PDF. However the link to the figure navigates to the caption leaving the figure itself out of the view. How can I make it navigate to the start of the figure instead without moving the caption to the top?

推荐答案

在你的序言中添加这个

usepackage{hyperref}
usepackage[all]{hypcap}    %for going to the top of an image when a figure reference is clicked

确保 usepackage[all]{hypcap} 是在 hyperref 包被导入之后编写的.

Make sure that the usepackage[all]{hypcap} is written after the hyperref package is imported.

这篇关于使用 hyperref 时,如何使超链接导航到 LaTeX 中的图形顶部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆