New theorem environment with manual theorem number

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.

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.