数学で番号付きの例を書く他の方法はありますか? 私は asmart クラスを使用しています。
\textbf{Example 1 }
答え1
このスタイルが達成したいものであるかどうかはわかりませんが、通常の/アプローチで参照できる\newtheorem
番号付き環境を取得する方法を示した MWE がここにあります。example
label
ref
\documentclass{amsart}
\theoremstyle{definition}
\newtheorem{thm}{Theorem}[section]
\newtheorem{example}[thm]{Example}
\begin{document}
\begin{example}
some example
\label{test example}
\end{example}
Reference the above example: \ref{test example}
\end{document}
コメントで barbara beeton が述べているように、上記の例では、同じカウンターを使用して例と定理に番号を付けます。例を個別に番号付けしたい場合は、\newtheorem{example}{Example}[section]
代わりに を使用します。
答え2
自動番号付け、コンテキストに応じた正しい垂直間隔が必要な場合は、次のようにします。
\newtheorem{example}{Example}
......
\begin{document}
......
\begin{example}
......
\end{example}
......
\end{document}
amsthm
レイアウトの詳細は、 や などの専用パッケージでntheorem
、定義済みの のいずれかを使用してカスタマイズできますstyles
。 の両方と連携する などのパッケージを使用thmtools
すると、さらにカスタマイズが可能になります。