28

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 3

33

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

3
  • 2
    Thanks, this look nice, too. I am a bit embarrassed that I missed it while skimming the documentations... Aug 18, 2010 at 10:48
  • 1
    Is it possible to base a new style on an existing style, and to change only some of the parameters?
    – Alexey
    Oct 7, 2013 at 21:15
  • @Alexey: AFAIK, not with amsthm. Possibly with thmtools or ntheorem. Best to ask a new question (search first if it has already been asked).
    – Caramdir
    Oct 7, 2013 at 22:40
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}
2
  • Interesting. I am currently using Caramdir's approach, though. Aug 25, 2010 at 12:35
  • 2
    This is a much better syntax. In fact, it starts to look like Context's \defineenumeration... Aug 25, 2010 at 13:34
6

Try

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

(using ntheorem in place of amsthm).

2
  • Thanks, this looks interesting. In your experience, are there any side effects I should be aware of (changed margins, changed spacing etc.)? Aug 18, 2010 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. Aug 18, 2010 at 11:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .