Gaya teorema yang mewah

Sep 04 2020

Saya ingin menulis beberapa teorema dengan keluaran yang agak terdefinisi sendiri seperti "Teorema A, Teorema B, Teorema B ^ +, Teorema B ^ #" dll. Dan ingin agar teorema khusus ini berada di luar pencacah teorema normal, yaitu yang lain Teorema tetap menggunakan penomorannya sendiri seperti "Teorema 1.1, Teorema 1.2" bahkan sampai "Teorema B" ada di antara keduanya. Adakah cara mudah untuk mencapai ini?

Ini mungkin terkait dengan pertanyaan di sini tapi saya pikir itu tidak mempertanyakan pertanyaan saya di sini. Terima kasih sebelumnya!

Jawaban

6 egreg Sep 03 2020 at 23:27

Sesuatu seperti ini?

\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}

The theorem*lingkungan memiliki argumen wajib untuk label khusus.