LaTeX:禁用或关闭目录的超链接?

发布于 2024-08-07 10:33:26 字数 255 浏览 7 评论 0原文

我想要一个目录,但我不希望每一行都是可单击的超链接。我该怎么做?

细节: 我正在使用 Shorttoc 包中的 \anothertoc 命令从另一个文档“导入”目录。工作正常,除了导入的目录的所有链接都已损坏(显然)......所以,我想取消它们的链接。

不确定这是否相关,但我导入的目录来自使用 hyperref 包的文档。我有一种感觉 hyperref 正在使目录超链接,但我找不到 hyperref 包的任何选项来禁用目录的超链接。

I want a table of contents, but I don't want each line to be a clickable hyperlink. How do I do this?

Details:
I am using the \anothertoc command from the shorttoc package to "import" the TOC from another document. Works fine, except that all the links for the imported TOC are broken (obviously)... so, I want to de-linkify them.

Not sure whether this is relevant, but the TOC that I'm importing is from a document that uses the hyperref package. I have a feeling that hyperref is making the TOCs hyperlinked, but I can't find any option for the hyperref package to disable hyperlinking for TOCs.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

一枫情书 2024-08-14 10:33:26

您可以在导入包时考虑 linktoc 参数,例如
\usepackage[linktoc=none]{hyperref}
\usepackage[linktoc=page]{hyperref}
您可以参考手册第 5.13 段 https://mirrors.chevalier.io/CTAN/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf

You can consider the linktoc parameter when importing the package with for instance
\usepackage[linktoc=none]{hyperref} or
\usepackage[linktoc=page]{hyperref}.
You can refer to paragraph 5.13 of the manual at https://mirrors.chevalier.io/CTAN/macros/latex/contrib/hyperref/doc/hyperref-doc.pdf

薄暮涼年 2024-08-14 10:33:26

你如何“导入”目录?

我想看看 hyperref 手册:http://www.tug。 org/applications/hyperref/manual.html

简单的解决方案是关闭您正在导入的文档目录中的超链接,尽管我意识到这可能是不可能的。

How are you "importing" the toc?

I'd have a look at the hyperref manual at : http://www.tug.org/applications/hyperref/manual.html

The simple solution would be to turn off hyperlinking in the document toc that you are importing, though I realize that might not be possible.

青芜 2024-08-14 10:33:26

使用基于 \NoHyperNormadize 答案 的解决方案与 Shorttoc 包配合良好:

{\protect\NoHyper%
\anothertoc{other-document}{Toc from other document}{1}
\protect\endNoHyper}%

A solution using Normadize's answer based on \NoHyper working well with the shorttoc package:

{\protect\NoHyper%
\anothertoc{other-document}{Toc from other document}{1}
\protect\endNoHyper}%
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文