Numeración de teoremas con subteorema, sin número de sección

Numeración de teoremas con subteorema, sin número de sección

Estoy usando la IEEEtranclase y \usepackage{amsthm}. ¿Cómo puedo configurar un contador para los teoremas, independientemente de las secciones? Digamos que mi primer teorema tiene tres partes y mi segundo teorema tiene dos partes. ¿Cómo puedo generar?:

Teorema 1.1

Teorema 1.2

Teorema 1.3

Teorema 2.1

Teorema 2.2

Respuesta1

Le sugiero que cree una variable de contador dedicada (llamada mythmcounter, digamos) y cree un entorno similar a un teorema dedicado (llamado mythm, digamos) cuya numeración esté subordinada al valor de mythmcounter. Ejecute la instrucción \stepcounter{mythmcounter}según sea necesario.

ingrese la descripción de la imagen aquí

\documentclass{IEEEtran}
\usepackage{amsthm}

\newcounter{mythmcounter}
\newtheorem{mythm}{Theorem}[mythmcounter]

\begin{document}

\stepcounter{mythmcounter}
\begin{mythm} abc \end{mythm}
\begin{mythm} def \end{mythm}

\stepcounter{mythmcounter}
\begin{mythm} ghi \end{mythm}
\begin{mythm} jkl \end{mythm}
\begin{mythm} mno \end{mythm}

\end{document}

Respuesta2

No estoy seguro de haber entendido la pregunta en toda su extensión, pero debería haber subtheoremsun número de teorema y subteorema. La forma más sencilla es definir un nuevo subtheorementorno que utilice el theoremcontador como contador de controladores.

La primera aparición de tal subteorema necesita a \setcounter{theorem}{1}, la siguiente (si va seguida directamente de un subteorema) requiere a \stepcounter{theorem}para forzar el reinicio del contador del subteorema.

ingrese la descripción de la imagen aquí

\documentclass{IEEEtran}


\usepackage{amsthm}

\newtheorem{theorem}{Theorem}

\newtheorem{subtheorem}{Subtheorem}[theorem]

\begin{document}

\section{Foo section}
\setcounter{theorem}{1}
\begin{subtheorem}{Part one}
\end{subtheorem}


\begin{subtheorem}{Part two}
\end{subtheorem}


\begin{subtheorem}{Part three}
\end{subtheorem}

\stepcounter{theorem}
\begin{subtheorem}{Part one}
\end{subtheorem}


\begin{subtheorem}{Part two}
\end{subtheorem}


\end{document}

Respuesta3

Préstamo subequationsde amsmath:

\documentclass{IEEEtran}
\usepackage{amsthm}

\newtheorem{theorem}{Theorem}

\makeatletter
\newcounter{parenttheorem}
\newenvironment{subtheorems}{%
  \refstepcounter{theorem}%
  \protected@edef\theparenttheorem{\thetheorem}%
  \setcounter{parenttheorem}{\value{theorem}}%
  \setcounter{theorem}{0}%
  \def\thetheorem{\theparenttheorem.\arabic{theorem}}%
  \ignorespaces
}{%
  \setcounter{theorem}{\value{parenttheorem}}%
  \ignorespacesafterend
}
\makeatother

\begin{document}

\begin{theorem}
This has no parts.
\end{theorem}

\begin{subtheorems}
\begin{theorem}
First part 2
\end{theorem}

\begin{theorem}
Second part 2
\end{theorem}
\end{subtheorems}

\begin{theorem}
This has no parts.
\end{theorem}

\begin{subtheorems}
\begin{theorem}
First part 4
\end{theorem}

\begin{theorem}
Second part 4
\end{theorem}

\begin{theorem}
Third part 4
\end{theorem}
\end{subtheorems}

\begin{theorem}
This has no parts.
\end{theorem}

\end{document}

ingrese la descripción de la imagen aquí

información relacionada