Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question

3 Answers 3

up vote 15 down vote accepted

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

share|improve this answer
1  
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
    
Is it possible to base a new style on an existing style, and to change only some of the parameters? –  Alexey Oct 7 '13 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 '13 at 22:40

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}
share|improve this answer
    
Interesting. I am currently using Caramdir's approach, though. –  Bran the Blessed Aug 25 '10 at 12:35
2  
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).

share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.