
「定理 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*
には、特殊ラベルの必須引数があります。