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 have several theorem environments:

\newtheorem{theorem}{Theorem}
\newtheorem{definition}{Definition}
\newtheorem{proposition}{Proposition}

etc.

and I want to change them so that they all use "small" for font size. Is there a way to re-define the font size for all of these environments?

share|improve this question
2  
Do you use any package to create/format these theorems? Perhaps create a minimal working example (MWE) that we can work with... –  Werner Dec 8 '13 at 7:10
    
Do you want the font size change to apply to just the environments' headers (e.g., "Theorem 1" in small, body of the theorem in normal font size) or to both the header and body of the theorem-like environment? Speaking for myself, I'd like to counsel against changing the font size in this manner. Doing so significantly raises the odds of your document looking like a ransom note. And even if you don't irritate your readers directly, your document will likely look more cute than cool. Do you want to create the impression that your theorems, definitions, and propositions are cute? –  Mico Dec 8 '13 at 7:27
2  
...for a visual of a ransom note, see The effect of the anonymous letter. :) –  Werner Dec 8 '13 at 7:34
add comment

2 Answers

up vote 9 down vote accepted

I wouldn't do that, but if you really need it...

  1. If you need BOTH the header and the body of the theorem in \small size you can load the package etoolbox and issue the command

    \AtBeginEnvironment{theorem}{\small}
    

    that is, add the following lines in the preamble:

    \usepackage{etoolbox}
    \AtBeginEnvironment{theorem}{\small}
    
  2. If you need ONLY the body of the theorem in \small size you can redefine the theorem environment as follows:

    \let\oldtheorem\theorem
    \let\oldendtheorem\endtheorem
    \renewenvironment{theorem}
      {\oldtheorem\small}
      {\oldendtheorem}
    

In the following MWE theorem has both the header and the body in \small size, while definition has only the body and proposition is left as it was originally.

\documentclass{article}

\newtheorem{theorem}{Theorem}
\newtheorem{definition}{Definition}
\newtheorem{proposition}{Proposition}

\usepackage{etoolbox}
\AtBeginEnvironment{theorem}{\small}

\let\olddefinition\definition
\let\oldenddefinition\enddefinition
\renewenvironment{definition}
  {\olddefinition\small}
  {\oldenddefinition}

\begin{document}
\begin{theorem}
My theorem
\end{theorem}
\begin{definition}
My definition
\end{definition}
\begin{proposition}
My proposition
\end{proposition}
\end{document} 

Output:

enter image description here

Note that it works fine with amsthm and ntheorem as well.

share|improve this answer
add comment

You can patch the command that's responsible for setting the statement. There are two different cases: (1) when no theorem package is loaded and (2) when amsthm or ntheorem is loaded. I never use the last package, but always amsthm.

However, I don't understand why you'd want to do this in the first place.

\documentclass{article}
\usepackage{lipsum} % just for the example

\usepackage{amsthm} % optional, but recommended
%\usepackage{ntheorem} % I don't recommend this one

\usepackage{etoolbox}

\makeatletter
\@tempswafalse
\@ifpackageloaded{amsthm}{\@tempswatrue}{}
\@ifpackageloaded{ntheorem}{\@tempswatrue}{}
\if@tempswa
  \patchcmd\@thm{\trivlist}{\small\trivlist}{}{}
\else
  \patchcmd\@begintheorem{\trivlist}{\small\trivlist}{}{}
  \patchcmd\@opargbegintheorem{\trivlist}{\small\trivlist}{}{}
\fi
\makeatother

\newtheorem{thm}{Theorem}
\newtheorem{lem}{Lemma}

\begin{document}

\lipsum[2]

\begin{thm}
This statement will be small in type.
\end{thm}

\lipsum[2]

\begin{lem}
Also this one will have smaller type.
\end{lem}

\lipsum[3]

\end{document}

You could also look into thmtools and its preheadhook key for defining new theorem styles.

enter image description here

share|improve this answer
add comment

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.