![如何使用 autoref 打印 \sectionautorefname,但不超链接 \sectionautorefname?](https://linux22.com/image/325523/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%20autoref%20%E6%89%93%E5%8D%B0%20%5Csectionautorefname%EF%BC%8C%E4%BD%86%E4%B8%8D%E8%B6%85%E9%93%BE%E6%8E%A5%20%5Csectionautorefname%EF%BC%9F.png)
编辑:@Faekynn 和 @Mico 你们说得对,带星号的版本禁用了超链接,但是否可以仅为 禁用它\sectionautorefname
,但仍为 保留它section number
?
==============================
如何实现 的功能autoref
,即打印sectionautorefname+ section number
但没有 的超链接sectionautorefname
。
它必须适用于其他分段单元。
答案1
如果hyperref
加载了该包,请使用各种交叉引用宏的“带星号”的版本-- \autoref*
,,\ref*
等等--如果您不想创建超链接。
\documentclass{article}
\usepackage[colorlinks]{hyperref}
\begin{document}
\section{First} \label{sec:first}
\subsection{abc} \label{subsec:abc}
\subsection{xyz} \label{subsec:xyz}
As argued in \autoref{subsec:abc}, \dots % hyperlink is created
\medskip\noindent
As argued in \autoref*{subsec:xyz}, \dots % hyperlink is not created
\end{document}