# How to change the way theorems are displayed?

I am in the process of writing a large document containing some theorems, lemma, and propositions. Currently, I am using packages amsmath and amsthm. I defined my own environment for theorems by adding

\theoremstyle{plain}
\newtheorem{thm} {Theorem}[chapter]


to the preamble. However, I am not quite satisfied with the looks. So is there a possibility to change the way this would be displayed? I would like to have the word "Theorem" appear in small caps. Furthermore, I would like a line break after the theorem's title.

What is the best way to do this? Are there nice packages for this purpose (prefereably without too much fiddling)?

-

## 3 Answers

amsthm provides the \newtheoremstyle command for defining new theorem styles. It is described in the amsthm documentation. To have a style that is the same as plain except for the header font, you can use

\newtheoremstyle{mytheoremstyle} % name
{\topsep}                    % Space above
{\topsep}                    % Space below
{\itshape}                   % Body font
{}                           % Indent amount
{\scshape}                   % Theorem head font
{.}                          % Punctuation after theorem head
{.5em}                       % Space after theorem head
{}  % Theorem head spec (can be left empty, meaning ‘normal’)

\theoremstyle{mytheoremstyle}
\newtheorem{thm}{Theorem}


The ntheorem package provides even more flexibility (as Charles hinted).

-
 Thanks, this look nice, too. I am a bit embarrassed that I missed it while skimming the documentations... – Bran the Blessed Aug 18 '10 at 10:48

You may also use the thmtools package which offers a key-value-interface to define new theorem styles and theorems. (The package acts as a frontend to the amsthm and ntheorem packages, and one of these should be loaded before thmtools.)

\documentclass{article}

\usepackage{amsthm}
\usepackage{thmtools}
\declaretheoremstyle[headfont=\scshape,postheadspace=\newline]{mystyle}
\declaretheorem[style=mystyle]{theorem}

\begin{document}

\begin{theorem}
Some text.
\end{theorem}

\end{document}

-
Interesting. I am currently using Caramdir's approach, though. – Bran the Blessed Aug 25 '10 at 12:35
This is a much better syntax. In fact, it starts to look like Context's \defineenumeration... – Charles Stewart Aug 25 '10 at 13:34

Try

\usepackage[amsthm]{ntheorem}
\newcommand{\theoremheaderfont}{\scshape}


(using ntheorem in place of amsthm).

-
 Thanks, this looks interesting. In your experience, are there any side effects I should be aware of (changed margins, changed spacing etc.)? – Bran the Blessed Aug 18 '10 at 10:45 @Bran: The amsthm option to ntheorem is supposed to give amsthm-like definitions. I couldn't say how good an approximation they are, since I never used amsthm. – Charles Stewart Aug 18 '10 at 11:39