3

I'm using the amsthm package, and I noticed that a remark is automatically italicized, while a theorem and a proposition are not.

What other keywords have their content automatically italicized by the package?

Edit: I did not define any theorem styles. I simply used

\newtheorem{theorem}{Theorem}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{remark}[theorem]{Remark}
3

It is set by \theoremstyle{#1}. The possible values are plain, definition and remark. E.g.

\documentclass{article}
\usepackage{amsthm}

\theoremstyle{plain}% default
\newtheorem{thm}{Theorem}[section]
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}


\theoremstyle{definition}
\newtheorem{defn}{Definition}[section]
\newtheorem{exmp}{Example}[section]


\theoremstyle{remark}
\newtheorem{rem}{Remark}


\begin{document}

\section{First}

\begin{thm}
One plus one equals two.
\end{thm}

\begin{lem}
One plus one equals two.
\end{lem}

\begin{prop}
One plus one equals two.
\end{prop}


\begin{defn}
Two is one plus one.
\end{defn}

\begin{rem}
One plus one equals two.
\end{rem}


\end{document}

enter image description here

4

This is based on the the style that you define the environment with. amsmath provides three styles by default (plain, definition and remark), but you can define your own styles using \newtheoremstyle{<style>}.

Here are the basic styles that amsthm defines:

enter image description here

\documentclass{article}
\usepackage{amsthm}% http://ctan.org/pkg/amsthm
\theoremstyle{theorem}\newtheorem{theorem}{Theorem}
\theoremstyle{definition}\newtheorem{definition}{Definition}
\theoremstyle{remark}\newtheorem{remark}{Remark}
\begin{document}
\begin{theorem} Some theorem. \end{theorem}
\begin{definition} Some definition. \end{definition}
\begin{remark} Some remark. \end{remark}
\end{document}

New styles have the following interface (taken directly from the amsthm documentation, section 4.3 New theorem styles, p 4):

\newtheoremstyle{note}% <name>
  {3pt}% <Space above>
  {3pt}% <Space below>
  {}% <Body font>
  {}% <Indent amount>
  {\itshape}% <Theorem head font>
  {:}% <Punctuation after theorem head>
  {.5em}% <Space after theorem head>
  {}% <Theorem head spec (can be left empty, meaning 'normal')>

The custom theorem head specification is a little more tricky, details of which are included in the AMS Class documentation (section Custom theorem styles, p 63):

There is a \newtheoremstyle command provided to make the creation of custom theorem styles fairly easy.

Usage:

                  #1
\newtheoremstyle{NAME}%
    #2          #3          #4
  {ABOVESPACE}{BELOWSPACE}{BODYFONT}%
    #5      #6        #7         #8
  {INDENT}{HEADFONT}{HEADPUNCT}{HEADSPACE}%
    #9
  {CUSTOM-HEAD-SPEC}

Leaving the 'indent' argument empty is equivalent to entering 0pt. The 'headpunct' and 'headspace' arguments are for the punctuation and horizontal space between the theorem head and the following text. There are two special values that may be used for 'headspace': a single space means that a normal interword space should be used; "\newline" means that there should be a line break after the head instead of horizontal space. The 'custom-head-spec' argument follows a special convention: it is interpreted as the replacement text for an internal three-argument function \thmhead, i.e., as if you were defining

\renewcommand{\thmhead}[3]{...#1...#2...#3...}

but omitting the initial \renewcommand{\thmhead}[3]. The three arguments that will be supplied to \thmhead are the name, number, and optional note components. Within the replacement text you can (and normally will want to) use other special functions \thmname, \thmnumber, and \thmnote. These will print their argument if and only if the corresponding argument of \thmhead is nonempty. For example

{\thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}}

This would cause the theorem note #3 to be printed with a preceding space and enclosing parentheses, if it is present, and if it is absent, the space and parentheses will be omitted because they are inside the argument of \thmnote.

Finally, if you have an extra bit of arbitrary code that you want to slip in somewhere, the best place to do it is in the 'body font' argument.

The \newtheoremstyle command is designed to provide, through a relatively simple interface, control over the style aspects that are most commonly changed. More complex requirements must be addressed through a separate LaTeX package.

When you set up custom theorem styles with \newtheoremstyle you should not use \swapnumbers. You have full control of the ordering of elements in the theorem head, just place them where you want. Or, if you do use \swapnumbers, you must look at the definition of \swappedhead and change it appropriately.

  • this is very late, but ... at the top, you say that "amsmath provides three styles by default". not amsmath, but amsthm. (that's properly identified in the rest of the answer. i figured i'd let you make the fix yourself. do so, and i'll zap this comment.) – barbara beeton Mar 27 '15 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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