4

I want to make theorems that look like this, but with better spacing:

1-1 Theorem ( Theorem name ) Statement of the theorem.

Here is what I currently have:

\documentclass{article}
\usepackage{amsthm}

\newtheoremstyle{theorem}
{1.5em} % Space above
{} % Space below
{\itshape} % Body font
{}  % Indent amount
% Indent amount: empty = no indent; \parindent = normal paragraph indent
{\bfseries\itshape} % Theorem head font
{} % Punctuation after theorem head
{1em} % Space after theorem head
% Space after theorem head: { } = normal interword space; \newline = line break
{\thmnumber{#2}\thmname{\hspace{1em}#1}\thmnote{ \textup({#3}\textup)}}
% Theorem head spec (can be left empty, meaning `normal`)

\theoremstyle{theorem}
\newtheorem{thm}{Theorem}[section]

\begin{document}

\begin{thm}[Theorem name] Statement of the theorem.
\end{thm}

\end{document}

I just don't know how to change the dot to a dash.

1
  • 4
    \renewcommand{\thethm}{\thesection--\arabic{thm}} after the \newtheorem statement.
    – egreg
    May 1, 2015 at 15:21

1 Answer 1

4

As mentioned in the comment you can simply use this:

\newtheoremstyle{theorem}
{1.5em} % Space above
{} % Space below
{\itshape} % Body font
{}  % Indent amount
% Indent amount: empty = no indent; \parindent = normal paragraph indent
{\bfseries\itshape} % Theorem head font
{} % Punctuation after theorem head
{1em} % Space after theorem head
% Space after theorem head: { } = normal interword space; \newline = line break
{\thmnumber{#2}\thmname{\hspace{1em}#1}\thmnote{ \textup({#3}\textup)}}
% Theorem head spec (can be left empty, meaning `normal`)

\theoremstyle{theorem}
\newtheorem{thm}{Theorem}[section]
\renewcommand{\thethm}{\thesection\ --\ \arabic{thm}}

This would create something like this:

enter image description here

The important part is this:

\renewcommand{\thethm}{\thesection\ --\ \arabic{thm}}



There you can also remove the spaces I put there:

\renewcommand{\thethm}{\thesection--\arabic{thm}}

enter image description here

Or create something completely different:

\renewcommand{\thethm}{\thesection\ $\cdot$ \Roman{thm}}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .