
나는 "정리 A, 정리 B, 정리 B^+, 정리 B^#" 등과 같이 다소 자체 정의된 출력을 사용하여 일부 정리를 작성하고 이러한 특수 정리가 일반 정리 카운터 외부에 있기를 원합니다. 정리는 "정리 B"가 사이에 있더라도 "정리 1.1, 정리 1.2"와 같은 고유한 번호 매기기를 유지합니다. 이것을 달성하는 쉬운 방법이 있습니까?
이것은 질문과 관련이 있을 수 있습니다.여기그러나 나는 그것이 여기서 내 질문의 가치가 아니라고 생각합니다. 미리 감사드립니다!
답변1
이 같은?
\documentclass{article}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{theoremvar}{Theorem}
\newenvironment{theorem*}[1]
{\renewcommand{\thetheoremvar}{#1}\theoremvar}
{\endtheoremvar}
\begin{document}
\section{Title}
\ref{normal1},
\ref{normal2},
\ref{normal3},
\ref{normal4},
\ref{special1},
\ref{special2},
\ref{special3}
\begin{theorem}\label{normal1}
This is a normal theorem.
\end{theorem}
\begin{theorem}\label{normal2}
This is a normal theorem.
\end{theorem}
\begin{theorem*}{A}\label{special1}
This is a special theorem.
\end{theorem*}
\begin{theorem}\label{normal3}
This is a normal theorem.
\end{theorem}
\begin{theorem*}{B$^+$}\label{special2}
This is a special theorem.
\end{theorem*}
\begin{theorem*}{B$^{\sharp}$}\label{special3}
This is a special theorem.
\end{theorem*}
\begin{theorem}\label{normal4}
This is a normal theorem.
\end{theorem}
\end{document}
환경 theorem*
에는 특수 레이블에 대한 필수 인수가 있습니다.