
私はllncs
(冠詞ではなく)をパッケージとして\documentclass
使用しますams
。そして、番号付けが機能しなくなりました。は}を使って定理に\begin{theorem
1、2、... と番号を付けることもできますが、 と を追加する\newtheorem{mytheorem}{Theorem}[section]
と\begin{mytheorem}
ドットなしの 11、12、21、22 のような番号になります。明らかに私が好むのは 1.1 または 1.1.1 です。定理に を使用すると、エラー、存在しませんという愚かな結果\renewcommand
になるだけです。それでは、次のようになります。TeX
\newcommand
エラーは存在します。(TeX に Zen Master のようなものがあるのか、または \newtheorem にパラメータがあるかのどちらかです :-) MWE:
\documentclass[10pt,a4paper]{llncs}
\usepackage{amsmath}
\newtheorem{mytheorem}{Theorem}[section]
\begin{document}
\section{foo}
\begin{mytheorem}
\end{mytheorem}
\begin{theorem}
\end{theorem}
\section{bar}
\begin{mytheorem}
\end{mytheorem}
\begin{theorem}
\end{theorem}
\end{document}
答え1
クラスllncs
には、 を使用して定理のような環境を定義する独自のメソッドがあります\spnewtheorem
。
\documentclass[10pt,a4paper,envcountsect]{llncs}
\usepackage{amsmath}
% \spnewtheorem{env_nam}{caption}[within]{cap_font}{body_font}
% or \spnewtheorem{env_nam}[numbered_like]{caption}{cap_font}{body_font}
% or \spnewtheorem*{env_nam}{caption}{cap_font}{body_font}
\spnewtheorem{mytheorem}{Theorem}[section]{\bfseries}{\itshape}
\begin{document}
\section{foo}
\begin{mytheorem}
Some text.
\end{mytheorem}
\begin{theorem}
Some text.
\end{theorem}
\section{bar}
\begin{mytheorem}
Some text.
\end{mytheorem}
\begin{theorem}
Some text.
\end{theorem}
\end{document}