
答え1
を使用するとかなり簡単ですamsthm
。
\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage{amsthm}
\theoremstyle{definition}
\newtheorem{teorema}{Teorema}[subsection]
定理をサブセクションごとに番号付けすることは、いくつかの理由からお勧めできません。まず、サブセクションの使用を強制されますが、これは必ずしも必要ではありません。次に、クラスに章がある場合は、定理が四数字。
斜体の方が文を見つけやすく視覚的な手がかりとなるため、直立型の使用もお勧めできません。
答え2
\newtheorem
の動作方法と、 で定義された環境にパッチを適用できる方法は、\newtheorem
ドキュメントクラスと使用中のパッケージによって異なります。
article-class を使用し、パッケージを使用しない場合は、次の操作を実行できます。
\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
ですか?