I want theorems and lemmas to be referred to in the text as "Theorem 1" and "Corollary 2", sharing the same counter. This works fine when I'm using the normal article documentclass, but fails when I've to use the custom lipics format a conference requires me to use. (One needs to download and unzip the .tgz file in the same folder as the MWE).

Here's a MWE:


\usepackage{amsthm, cleveref}


\section{Section title}

    Here is the theorem.

    Here is the corollary.

The theorem reference is given by \cref{thm:test} and the corollary reference is given by \cref{cor:test}.


I've read here that one needs to declare the newtheorem commands after loading cleveref, but the problem as I've discovered is that lipics.cls declares them in the class file at the very outset. So, is there any way for me to redeclare the newtheorem commands after loading cleveref?

Here's the output I currently get: enter image description here

How do I correct it so that the corollary reference is correct?

  • honestly you could redefine stuff so it works but it's bad form to redefine conference styles, the whole point is that it makes it easier for the conference organisers to merge articles to make the proceedings if everyone is using the same macros. even if normally you use cleverref can't you use a standard \ref here? Nov 24, 2014 at 21:45
  • Is there any way to load cleveref along with documentclass lipics, so that it can pick up the newtheorem defns from lipics?
    – TCSGrad
    Nov 24, 2014 at 21:50
  • I haven't looked but the answer is always yes, latex is a macro expansion language and you can redefine anything, but if you put definitions before \documentclass and redefine the conference proceedings macros then you are making life for the conference organisers difficult, and if it was my proceedings I'd return the document and tell you to use the mandated style. Nov 24, 2014 at 21:52

2 Answers 2


Found a rather crude but effective solution: I defined lemma, theorem after loading cleveref in my document, but using different keywords (lemma becomes lem, theorem is thm and so on). I've ensured that the new environments are consistent with the default ones defined in lipics.cls, so the pdf file would look exactly the same, with the benefit that I dont have to use \ref anymore! This seems to be the only way to resolve this issue - I'd be glad if someone found a less crude, more DRY approach!


If cleveref is loaded right after amsthm (that is, before any newtheorem) then it works.




The \Cref{lem:1} and the \Cref{thm:1}.

  • Don't know why this is downvoted, it works for me.
    – J. Schmidt
    Jul 25, 2023 at 14:24
  • Yup, no clue what people are angry about there...
    – Michaël
    Jul 25, 2023 at 21:12

You must log in to answer this question.

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