
Eu uso llncs
(não artigo!) como \documentclass
e os ams
pacotes. E agora a numeração não funciona. Istoéé possível simplesmente usar \begin{theorem
} e numerar meus teoremas 1,2,..., mas não adicionando \newtheorem{mytheorem}{Theorem}[section]
e \begin{mytheorem}
pois isso resulta em coisas como 11,12,21,22 - sem ponto. O que eu obviamente prefiro seria 1.1 ou mesmo 1.1.1. E um \renewcommand
teorema apenas leva à TeX
tolice: o erro não existe. Tudo bem então \newcommand
:
Erro, existe. (Ou tem a ver com o fato de o TeX ter algo como um mestre Zen, ou com o \newtheorem ter parâmetros :-) 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}
Responder1
A llncs
classe tem seu próprio método para definir ambientes semelhantes a teoremas, usando \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}