使用 theoremref 显示标签

使用 theoremref 显示标签

我使用该theoremref包是为了更轻松地引用早期的定理,但我还想使用 showlabels,这样我就可以显示我的标签以便于引用。有没有办法让 showlabels 显示给出的标签\thlabel

答案1

只需添加\showlabels{thlabel}

\documentclass{book}
\usepackage{showlabels}
\usepackage{theoremref}

\showlabels{thlabel}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}

\begin{document}

The references: \thref{exact,zorn,main}

% replicate the manual's example

\setcounter{chapter}{2}\setcounter{section}{1}\setcounter{theorem}{4}

\begin{lemma}\thlabel{zorn}
Zorn's lemma
\end{lemma}

\setcounter{chapter}{5}\setcounter{section}{7}\setcounter{theorem}{6}

\begin{lemma}\thlabel{exact}
Exact
\end{lemma}

\setcounter{chapter}{6}\setcounter{section}{6}\setcounter{theorem}{3}

\begin{theorem}\thlabel{main}
Main theorem
\end{theorem}

\end{document}

在此处输入图片描述

相关内容