4

I have two versions of a manuscript: the first uses restatable, and this works as expected for both theorems and lemmas; the second uses the jmlr style files provided by a conference (COLT 2020), and restatable is causing me trouble. Specifically, any theorem, stated at some point and then restated later, is numbered correctly. But with lemmas, the numbering changes later on. It's very weird, and I don't understand how to fix this. Here is a minimum working example, and you'd need to download colt2020.cls, jmlr.cls, and jmlrutils.sty from here: 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 Answer 1

4

The problem is caused by jmlrutils.sty, line 485

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

Back on your document, you should redefine lemma

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

And it works. However, you're editing template code, so ask first. Another way (the recommended one) does not imply template code rewriting and consists of defining a new environment with the "Lemma" label:

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

So thm-restate works:

\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}

enter image description here

2
  • This was a great answer, thank you! It now works :) Could you provide me with an explanation for how you figured this out? In other words, why does either your fix to the jmlr style file or to the main file change the outcome of the process?
    – lazulikid
    Commented Jan 7, 2020 at 17:40
  • 1
    It seems one has to define a restatable theorem after thmtools and not before (I guess thmtools redefines some environments, counters, or the like). Since jmlrutils defines a lemma environment in advance, the lemma label, id est, the lemma counter, does not work the way it should.
    – user193767
    Commented Jan 7, 2020 at 17:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .