32

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)?

lockstep
  • 250,273

3 Answers3

38

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).

Caramdir
  • 89,023
  • 26
  • 255
  • 291
18

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}
lockstep
  • 250,273
6

Try

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

(using ntheorem in place of amsthm).

Charles Stewart
  • 21,014
  • 5
  • 65
  • 121
  • 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