I just noticed something weird of the \theoremstyle command. Here is the code of a sample document:

\thm 1
\defn 2
\case 3
\thm 4

I expected the theorem after "Case" to behave like the first theorem, however the out put looks like this:


Any explanation or solution? Am I using amsthm wrong?

  • 2
    The correct way to invoke a theorem is \begin{thm}...\end{thm}, not \thm. I don't know what specifications there are for using \thm as you did. – Ari Brodsky Feb 10 '13 at 6:48
  • Thanks. I figured out the same thing. I wish there is some package that automatically make \thm as \begin{thm}#1\end{thm}. – h__ Feb 10 '13 at 6:52
  • 1
    Where should it put the \end{thm}, if you have no way to show where the theorem ends? – Federico Poloni Feb 10 '13 at 8:46
  • 1
    I think we can close this question, as it's just a small mistake of using environments as commands. – Stefan Kottwitz Feb 10 '13 at 9:30
  • @FedericoPoloni I mean, something automatically provides \newcommand{\thm}[1]{\begin{thm}#1\end{thm}} when thm is defined as a newtheorem. – h__ Feb 10 '13 at 17:27

With \newtheorem{thm}{Theorem}[section] you are defining a thm environment that requires to be used as

A statement.

The fact that \thm doesn't give errors is just because of the internal implementation of the \begin and \end commands, which shouldn't really be relied upon.

The \theoremstyle declaration uses the property of environments of being a group in the TeXnical sense: declarations inside them end their scope at the corresponding \end command.

When you do


in the preamble and have \begin{case} in your document, LaTeX performs some assignments such as stating that the "Case" label is typeset in italics. This is made by the internal \case macro (which you shouldn't be using). In this case no "end of scope" is seen and so the next instance of thm will inherit the font attributes of case for the label: being in the default plain style, \thm doesn't issue font declarations.

The \begin\end syntax is also much clearer, in my opinion: it gives visual clues in your input for finding things more easily. It's just a question of training and, maybe, of having a good text editor that inserts the \begin and \end tags with just a keystroke.

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.