数/字母定理

数/字母定理

有没有办法从下面的代码中生成数字字母/数字定理?我正在尝试实现标记为 1.1A 的定理。

\documentclass{book}
\usepackage{amsthm}

 \newtheorem{theo}{Theorem}[chapter]
 \newcounter{tmp}

 \begin{document}

 \chapter{Test Chapter}
 \begin{theo}
 test
 \end{theo}

 \begingroup
 \setcounter{tmp}{\value{theo}}% store current value of theorem counter
 \setcounter{theo}{0} %assign desired value to theorem counter
  \renewcommand\thetheo{\Alph{theo}}% locally redefine the representation of    the theorem counter
 \begin{theo}
 test
 \end{theo}
  \endgroup


 \end{document}

答案1

在我看来,与使用等以及存储计数器、更改输出等相比, 2nd依赖于upper级别环境的定理环境theo是一个更清晰的解决方案。\begingroup...\endgroup

\documentclass{book}
\usepackage{amsthm}

\newtheorem{theo}{Theorem}[chapter]

\newtheorem{subtheo}{Subheorem}[theo] % Use theo as driver counter
\renewcommand{\thesubtheo}{\thetheo\Alph{subtheo}} % Change subtheo counter for alpha output


\begin{document}

\chapter{Test Chapter}
\begin{theo}
test
\end{theo}

\begin{subtheo}
test
\end{subtheo}


\end{document}

enter image description here

相关内容