hyperref 和 showkeys 与 autoref 之间的冲突

hyperref 和 showkeys 与 autoref 之间的冲突

也许这是一个愚蠢的问题,但我想知道为什么\autoref{}hyperref与包冲突showkeys(允许在draft模式下查看标签),即使将final选项传递给documentclass

我留下一段代码

\documentclass[11pt, a4paper, final]{article}

\usepackage[usenames,dvipsnames]{xcolor}    
\usepackage{amsmath,amsthm}

\usepackage{hyperref}
\hypersetup{
    hidelinks,   
    linktocpage = false,              
    colorlinks = true,  
    citecolor = NavyBlue,     
    linkcolor = NavyBlue,   % colore links        
    urlcolor = NavyBlue,   % web sites links color    
}

%\usepackage{showkeys}

\newtheorem{theorem}{Theorem}

\begin{document}


\section{The Pythagoras Theorem}\label{sec:pythagoras}
In this section bla bla bla 

\begin{theorem}\label{thm:pythagoras}
    Pythagoras theorem states bla bla bla
    \begin{equation}
        a^{2} + b^{2} = c^{2} \,.
    \end{equation}
\end{theorem}

As may be seen in theorem \ref{thm:pythagoras} or, alternatively, in \autoref{thm:pythagoras}, bla bla bla

\section{Second section}
In this section bla bla bla we refer to \autoref{sec:pythagoras}

\end{document}

我知道解决问题所需要做的就是在写完后注释掉 showkeys 包,但我真的很想知道是否存在根本原因。

如果有办法在最后不评论的showkeys情况下做出“同意”hyperrefshowkeys

相关内容