數字之間有破折號的定理

數字之間有破折號的定理

我想讓定理看起來像這樣,但間距更好:

1-1定理 定理名稱 定理的陳述。

這是我目前擁有的:

\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}

我只是不知道如何將點改為破折號。

答案1

正如評論中提到的,您可以簡單地使用這個:

\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}}

這會創造這樣的東西:

在此輸入影像描述

重要的部分是:

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



您也可以刪除我放在那裡的空格:

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

在此輸入影像描述

或創造一些完全不同的東西:

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

在此輸入影像描述

相關內容