![数/字母定理](https://linux22.com/image/329780/%E6%95%B0%2F%E5%AD%97%E6%AF%8D%E5%AE%9A%E7%90%86.png)
有没有办法从下面的代码中生成数字字母/数字定理?我正在尝试实现标记为 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}