如何获取页码链接到乳胶目录?
我看过一个 pdf LaTeX 文档,其中页面底部的页码是超引用链接,单击它们会使您跳转到目录。我没有 tex 文件,无法弄清楚它是如何从 hyperref 包中完成的。有人可以帮忙吗?
I've seen a pdf LaTeX document where the page numbers at the bottom of the page are hyperref links, and clicking them causes you to jump to the contents table. I don't have the tex file and couldn't work out how it's done from the hyperref package. Can anyone help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以在目录中设置一个锚点并重新定义
\thepage
以链接到它。举个例子:如果你使用 babel 并希望重新定义
\contentsname
,可以使用 babel 的\addto
命令,或者在之后重新定义
。\contentsname
>\begin{文档}You could set an anchor at the toc and redefine
\thepage
to link to it. Here's an example:If you use babel and wish to redefine
\contentsname
, use the\addto
command of babel or redefine\contentsname
after\begin{document}
.您是否尝试过使用它来定义页码?
其中 \markright 指定带有内容页面链接的页码。
Have you tried defining the page numbering using this?
where \markright specifies the page number with a link to the content page.
这是我的做法,
您当然可以在序言中将链接文本自定义回目录,请阅读
titlesec
了解更多详细信息。Here is how I did it
you can of course customize the link text back to table of contents however you like in the preamble, please read documentation of
titlesec
for more details.这对我有用。
另请参阅:https://tex.stackexchange.com/questions/227356/how-can-i-get-page-numbers-to-link-to-the-table-of-contents-in-latex
This worked for me.
See also: https://tex.stackexchange.com/questions/227356/how-can-i-get-page-numbers-to-link-to-the-table-of-contents-in-latex