我有一个证明,其中显示了定理陈述之后的许多部分,并且我希望证明说“重要定理的证明”,并带有指向定理陈述的超链接。
\autoref
我可以用或来做到这一点\ref
,但我得到的是“定理 1.0 的证明”,这不是我想要的。我需要证明中定理的名称。
\documentclass{article}
\usepackage{amsmath,amsfonts,amssymb,amsthm,bbm}
\usepackage{hyperref}
\newtheorem{theorem}{Theorem}[section] %restarts every section
\begin{document}
\begin{theorem}[Important Theorem]\label{important} this is the theorem
\end{theorem}
%This works, but it's not what I want
\begin{proof}[Proof of \autoref{important}] It's obvious.
\end{proof}
%This one doesn't work
%\begin{proof}[Proof of \hyperref[important]{Important Theorem} ] It's obvious. \end{proof}
\end{document}
当我尝试这样的事情时
\begin{proof}[Proof of \hyperref[important]{Important Theorem} ] It's obvious. \end{proof}
我收到一个错误。
有没有办法手动将hyperref
's 添加到证明标题中?
答案1
[...]
在可选参数中使用是问题所在,但你可以通过包装\hyperref[important]{Important Theorem}
一组额外的{...}
\documentclass{article}
\usepackage{amsmath,amsfonts,amssymb,amsthm,bbm}
\usepackage{hyperref}
\newtheorem{theorem}{Theorem}[section] %restarts every section
\begin{document}
\begin{theorem}[Important Theorem]\label{important} this is the theorem
\end{theorem}
\begin{proof}[Proof of {\hyperref[important]{Important Theorem}}] It's obvious.
\end{proof}
\end{document}