I am wondering how to create a new theorem environment / style which allows me to insert the theorem number manually. That is, I am imagining something like

      This is a theorem.

to translate into

Theorem 2.3' (title). This is a theorem.

As a second example,

      This is a theorem.

should give

Theorem A (title). This is a theorem.

How would one be able to define such a theorem environment with argument which is (apart from the manual insertion of the "number") identical to the usual theorem environment?

Note, if I add a \label to a theorem of this type, I would like the corresponding \ref command to print the theorem number defined in the argument. That is, in the above example \ref should print 2.3'.

I would be grateful for any help with this! Many thanks in advance!


Quite easy! ;-) 1




This is a theorem.

This is a theorem.

Here is \ref{foo} and \ref{baz}.


enter image description here

1 Been there, done that.

  • Pronto, prontissimo... mamma mia! :) – Ruben Sep 14 '17 at 22:06
  • @Ruben Son come il fulmine :-D – egreg Sep 14 '17 at 22:08
  • prime would be better than apostrophe. (just being pedantic.) – barbara beeton Sep 15 '17 at 2:56
  • 1
    @barbarabeeton That's left to the OP to decide. – egreg Sep 15 '17 at 8:06
  • Note: does not work with cleveref out of the box. – Bach Dec 15 '19 at 4:01

First of all, you can't define a theorem-like environment newtheorem as there is alredy the \newtheorem macro that defines those environments simply due to the name clash. Assume we have an environment theorem. Then you can locally change \thetheorem:


  This is a theorem.

When wrapping this into an own environment you don't need to group explicitly as the \begin and \end definitions take care of this:


The custom environment would then be used as requested by the OP:

  This is a theorem.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.