可重述环境:定理成立,引理不成立

可重述环境:定理成立,引理不成立

我有两个版本的手稿:第一个版本使用可重述的,这对定理和引理都按预期工作;第二个版本使用会议 (COLT 2020) 提供的 jmlr 样式文件,可重述的给我带来了麻烦。具体来说,任何在某个时刻陈述然后在稍后重述的定理都是正确编号的。但对于引理,编号后来会发生变化。这很奇怪,我不明白如何解决这个问题。这是一个最小工作示例,您需要从此处下载 colt2020.cls、jmlr.cls 和 jmlrutils.sty:http://learningtheory.org/colt2020/submission.html

\documentclass[anon,12pt]{colt2020} % Anonymized submission
\usepackage{enumerate}
\usepackage{enumitem}
\usepackage{xfrac, bm} 
\usepackage[toc, page]{appendix}
\usepackage[makeroom]{cancel}  
\usepackage{physics}
\usepackage{graphicx,psfrag}
\usepackage{thm-restate}
\usepackage[small,bf]{caption}
\usepackage{tcolorbox,tikz,color,graphics,subcaption}
\usepackage{algorithm,algpseudocode,algorithmicx}
\usepackage{float} 
\usepackage{xifthen} 
\usepackage{booktabs}
\usepackage{array}
\numberwithin{equation}{section}
\usepackage{makecell} 
\usepackage[noabbrev,capitalize]{cleveref} 

\begin{document}

\begin{restatable}{theorem}{thmuno}\label{thm-1} This is my theorem.
\end{restatable}
\begin{restatable}{lemma}{lemuno}\label{lem-1} This is my lemma.
\end{restatable} 
Some words. 

\thmuno* 

More words 

\lemuno*
\end{document}

答案1

问题是由jmlrutils.sty第 485 行引起的

%You should delete this from the .sty file
\newtheorem{lemma}[theorem]{Lemma}

回到你的文档,你应该重新定义lemma

\usepackage{thm-restate}
\newtheorem{lemma}[theorem]{Lemma}

并且它有效。但是,您正在编辑模板代码,因此请先询问。另一种方法(推荐的方法)并不意味着模板代码重写,而是使用“Lemma”标签定义一个新环境:

%We use another name to avoid clashes with jmlrutils.sty
\newtheorem{lemmma}[theorem]{Lemma}

所以thm-restate有效:

\documentclass[anon,12pt]{colt2020} % Anonymized submission
\usepackage{enumerate}
\usepackage{enumitem}
\usepackage{xfrac, bm} 
\usepackage[toc, page]{appendix}
\usepackage[makeroom]{cancel}  
\usepackage{physics}
\usepackage{graphicx,psfrag}
\usepackage{thm-restate}
\newtheorem{lemmma}[theorem]{Lemma}
\usepackage[small,bf]{caption}
\usepackage{tcolorbox,tikz,color,graphics,subcaption}
\usepackage{algorithm,algpseudocode,algorithmicx}
\usepackage{float} 
\usepackage{xifthen} 
\usepackage{booktabs}
\usepackage{array}
\numberwithin{equation}{section}
\usepackage{makecell} 
\usepackage[noabbrev,capitalize]{cleveref} 
\begin{document}

\begin{restatable}{theorem}{thmuno}\label{thm-1} This is my theorem.
\end{restatable}
\begin{restatable}{lemmma}{lemuno}\label{lem-1} This is my lemma.
\end{restatable} 
Some words. 

\thmuno* 

More words 

\lemuno*
\end{document}

在此处输入图片描述

相关内容