gpt4 book ai didi

latex - 如何在 LaTeX 中发出引用的文本内容?

转载 作者:行者123 更新时间:2023-12-04 22:38:50 26 4
gpt4 key购买 nike

我有一个部分:

\section{Introduction} \label{sec:introduction}

我想要一个指向该部分的链接,其中链接文本是该部分的名称。我可以用 hyperref :
The \hyperrf[sec:introduction]{Introduction} introduces the paper.

但这需要重复部分标题(“介绍”)。有没有办法捕获它? ref产生部分编号,这是不正确的。 autoref产生“部分”,然后是部分编号,这也是不对的。

最佳答案

有几个软件包可以为您提供此功能。 nameref 作为 hyperref 的一部分分发以执行此操作:
http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=nameref

有一个更通用的包,用于交叉引用基本上任何东西,称为 zref:
http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=zref

它与 hyperref 的作者 Heiko Oberdiek 相同;这是我会选择的。下面是一个例子:

\documentclass[oneside,12pt]{article}
\usepackage[user,titleref]{zref}
\begin{document}
\section{Introduction of sorts.}\zlabel{sec:intro}
Hello
\subsection{Structure}
We begin in `\ztitleref{sec:intro}'.
\end{document}

请注意,它甚至会删除部分标题中的尾随句点。

关于latex - 如何在 LaTeX 中发出引用的文本内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/522838/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com