สไตล์ทฤษฎีบทแฟนซี
Sep 04 2020
ฉันต้องการเขียนทฤษฎีบทที่มีผลลัพธ์ที่ค่อนข้างกำหนดเองเช่น "ทฤษฎีบท A, ทฤษฎีบท B, ทฤษฎีบท B ^ +, ทฤษฎีบท B ^ #" เป็นต้นและต้องการให้ทฤษฎีบทพิเศษเหล่านี้อยู่นอกตัวนับทฤษฎีบทปกตินั่นคืออีกอัน ทฤษฎีบทจะมีการกำหนดหมายเลขของตัวเองเช่น "ทฤษฎีบท 1.1, ทฤษฎีบท 1.2" แม้จะผ่าน "ทฤษฎีบท B" ก็ตาม มีวิธีง่ายๆในการบรรลุเป้าหมายนี้หรือไม่?
สิ่งนี้อาจเกี่ยวข้องกับคำถามที่นี่แต่ฉันคิดว่านั่นไม่ใช่ราคาคำถามของฉันที่นี่ ขอบคุณล่วงหน้า!
คำตอบ
6 egreg Sep 03 2020 at 23:27
อะไรทำนองนี้?
\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*สภาพแวดล้อมที่มีผลบังคับใช้สำหรับอาร์กิวเมนต์ฉลากพิเศษ