Punto faltante en la enumeración de teoremas

Punto faltante en la enumeración de teoremas

Yo uso llncs(¡no el artículo!) as \documentclassy los amspaquetes. Y ahora la numeración no funciona. ÉlesEs posible usar simplemente \begin{theorem} y numerar mis teoremas 1,2,..., pero no sumando \newtheorem{mytheorem}{Theorem}[section]y \begin{mytheorem}ya que esto produce cosas como 11,12,21,22, sin un punto. Lo que obviamente prefiero sería 1.1 o incluso 1.1.1. Y un \renewcommandteorema sólo lleva a TeXla tontería: el error no existe. Bien entonces \newcommand:

El error existe. (Tiene que ver con que TeX tiene algo así como un maestro Zen, o que \newtheorem tiene 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}

Respuesta1

La llncsclase tiene su propio método para definir entornos similares a teoremas, utilizando \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}

ingrese la descripción de la imagen aquí

información relacionada