# Punctuation in amsthm Theorem headers

If I number theorems by sections, then amsthm numbers the first theorem in the first section as

Theorem 1.1.


How can I change this to

Theorem 1-1


?

• A quick method is \makeatletter \renewcommand{\@thmcountersep}{-} \makeatother Sep 23 at 16:57
• @barbarabeeton Many thanks Barbara! Unfortunately, in my case, this does not seem to work. Sep 23 at 18:23
• What have you tried? Please provide an MWE (from \documentclass... to \end{document}) that we can compile that shows what you have done and what the problem is. Why should we have to try and guess your code? Sep 23 at 18:33
• As I write below, what Mico proposes works just fine. That's good enough for me. Sep 23 at 18:39

If you've set up a theorem-like environment called, say, theorem, via

\newtheorem{theorem}{Theorem}[section]


then all you need to add is the instruction

\renewcommand\thetheorem{\thesection-\arabic{theorem}}


As per @barbarabeeton's comment, if you want to change the numbering style for all theorem-like environments, it would actually be much easier to execute

\makeatletter
\renewcommand{\@thmcountersep}{-}
\makeatother


in the preamble.

If, in addition, you also want to suppress the . ("dot", aka "full stop") after the composite theorem number, I suggest you execute the following code in the preamble:

\usepackage{etoolbox}
\makeatletter
\makeatother


A full MWE (minimum working example):

\documentclass{amsart} % or some other suitable docuemnt class
%% \usepackage{amsthm} % not needed if 'amsart' doc. class is in use

\usepackage{etoolbox}
\makeatletter
\renewcommand{\@thmcountersep}{-} % per @barbarabeeton's suggestion
\makeatother

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}

\begin{document}
\setcounter{section}{3}
\begin{theorem} Bla bla bla. \end{theorem}
\begin{definition} Ble ble ble. \end{definition}
\end{document}

• Many thanks Mico! Barbara's solution does not work in my case. I don't know why. Modifying the \thetheorem command does however work. Another method to remove the final dot is to use a custom theoremstyle. Sep 23 at 18:29
• @220284 - The \patchcmd{\@thm}{...}{...}{}{} method suggested above is certainly a global-scople method. I would advocate the \newtheoremstyle route if I wanted to remove the dot just for some theorem-like environments but not for all.
– Mico
Sep 23 at 20:01