# amsthm - Missing number error

(I made a quick search and I didn't find this question posed earlier, but if someone know that this has been asked and answered earlier I would be grateful to be pointed in the right direction.)

I'm a part of a group that is about to write a lengthy document that will probably rely heavily on the amsthm package. Unfortunately I get a "Missing number error" when defining (and using) new styles. Currently I have mostly problem with the following definition of a new definition style:

\newtheoremstyle{definition}% name
{9pt}           %       Space above, empty = 'usual value'
{9pt}           %       Space below
{}              %       Body font
{0cm}           %       Indent amount (empty = no indent, \parindent = para indent)
{\ }            %       Punctuation after thm head
{}              %       Space after thm head: \newline = linebreak
{}              %       Thm head spec

\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]


When I use this style I get a missing number error, but if I use \newline in the style definition I don't get the missing number error. Because of this I don't think that the error originates from a package clash, but I don't know so much of the more technical parts in LaTex so it's very possible that I'm wrong (I would say it's likely).

If anyone has an answer/idea of how to solve it I would be very glad to hear!

• Welcome to TEX.SE. Could you please post your full code so that we can help you easier? – bmv Feb 16 '18 at 13:53
• \newtheoremstyle{definition}{9pt}{9pt}{}{0cm}{\bfseries}{\ }{ }{} should give you the desired result. Please note the blank in the 8th pair of brackets. (See section '4.3 New theorem styles' of the amsthm documentation) – leandriis Feb 16 '18 at 13:54
• Thank you bmv! I would add more code if not leandriis suggestion solved the problem. Thank you for quick answers! I'll check section 4.3. Thanks again! – O. Carlsson Feb 16 '18 at 13:58
• @leandriis -- thanks for the (implicit) suggestion. a note will be added to the documentation with the next update: "This argument must not be empty; \verb+{}+ will result in a Missing number'' error." – barbara beeton Feb 16 '18 at 18:13

The following MWE will produce the desired result:

\documentclass{article}
\usepackage{amsthm}
\newtheoremstyle{definition}% name
{9pt}           %       Space above, empty = 'usual value'
{9pt}           %       Space below
{}              %       Body font
{0cm}           %       Indent amount (empty = no indent, \parindent = para indent)
{\ }            %       Punctuation after thm head
{ }             %       Space after thm head: \newline = linebreak

\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]

\begin{document}
\begin{definition}
foo
\end{definition}
\end{document}


Please note the not empty eigth argument of \newtheoremstyle. Allowed are:

• \newline for a linebreak
• { } for a normal interword space
• a lenghth of the user's choice

Leaving this argument empty will result in the described Missing number` error.