
答案1
如果你使用的話,這相當容易amsthm
。
\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage{amsthm}
\theoremstyle{definition}
\newtheorem{teorema}{Teorema}[subsection]
由於幾個原因,我不建議根據小節對定理進行編號。首先,你必須使用小節,但這並不總是必要的;其次,如果課程有章節,你最終會得到定理四數字。
我也不建議使用直排字體,因為斜體提供了視覺線索,可以更輕鬆地找到語句。
答案2
其工作方式\newtheorem
以及可修補的定義環境\newtheorem
取決於文件類別和所使用的套件。
使用文章類別並且不使用套件,您可以執行以下操作:
\documentclass{article}
\newtheorem{teorema}{Teorema}[subsection]
\makeatletter
\@ifdefinable\Oldteorema{\let\Oldteorema=\teorema}%
\renewcommand\teorema{\@ifnextchar[{\teoremaopt}{\Oldteorema\normalfont}}%
\newcommand\teoremaopt[1][]{\Oldteorema[{#1}]\normalfont}%
\makeatother
\begin{document}
\begin{teorema}
This is a new theorem.
\end{teorema}
\begin{teorema}[someone]
This is a new theorem.
\end{teorema}
\end{document}
我不保證這適用於其他文件類,例如,beamer。
您是否考慮過使用amsthm 包及其\newtheoremstyle
/ \theoremstyle
-指令?