定理枚舉中的缺失點

定理枚舉中的缺失點

我使用llncs(不是文章!)作為\documentclassams。現在編號不起作用。它可以簡單地使用\begin{theorem} 並對我的定理 1,2,... 進行編號,但不能通過添加\newtheorem{mytheorem}{Theorem}[section]and\begin{mytheorem}來進行編號,因為這會產生諸如 11,12,21,22 之類的結果 - 沒有點。我顯然更喜歡 1.1 甚至 1.1.1。定理\renewcommand只會導致TeX愚蠢:錯誤,不存在。好吧,那麼\newcommand

錯誤,確實存在。 (要麼與 TeX 具有某種禪宗大師有關,要麼與 \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}

在此輸入影像描述

相關內容