我想知道 LaTeX(或 amsthm 套件)是否可以將定理、引理、推論、定義等的編號樣式改為引理 1B5 而不是引理 1.2.5。 (避免所有標點符號)。例如,這將是第 1 章 B 節中的第 5 個結果。如果可行,則引理 1B5b 可能是引理 1B5 的 b 部分。這是比引理 1.2.5.2 更緊湊的樣式。我為實現這一目標而失敗的嘗試如下。
\documentclass[12pt,leqno]{book}
\usepackage{amsthm}
\usepackage{enumitem}
\renewcommand{\thechapter}{\arabic{chapter}}
\renewcommand{\thesection}{\thechapter\Alph{section}}
\renewcommand{\thesection}{\arabic{chapter}\Alph{section}}
\renewcommand{\thesubsection}{\thesection\arabic{subsection}}
\renewcommand{\thesubsubsection}{\thesubsection.\Alph{subsubsection}}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\begin{document}
\chapter{Modules}
\section{Definition $R$-modules}
Let $R$ be a ring.
\begin{theorem} First Theorem\end{theorem}
\begin{lemma}\label{2}
Second Lemma
\begin{enumerate}[label={\rm (\alph*)}]
\item part a
\item part b\label{b}
\end{enumerate}
\end{lemma}
It follows from Lemma~\ref{2}\ref{b} that \dots.
\section{Examples of $F[t]$-modules}
\begin{proposition} First proposition\end{proposition}
\begin{lemma} Second lemma\end{lemma}
\end{document}
答案1
\documentclass[12pt,leqno]{book}
\usepackage{amsthm}
\usepackage{enumitem}
\renewcommand{\thechapter}{\arabic{chapter}}
\renewcommand{\thesection}{\thechapter\Alph{section}}
\renewcommand{\thesection}{\arabic{chapter}\Alph{section}}
\renewcommand{\thesubsection}{\thesection\arabic{subsection}}
\renewcommand{\thesubsubsection}{\thesubsection.\Alph{subsubsection}}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\renewcommand\thetheorem{\thesection\arabic{theorem}}
\begin{document}
\chapter{Modules}
\section{Definition $R$-modules}
Let $R$ be a ring.
\begin{theorem} First Theorem\end{theorem}
\begin{lemma}\label{2}
Second Lemma
\begin{enumerate}[label={\textup{(\alph*)}},ref=\alph*]
\item part a
\item part b\label{b}
\end{enumerate}
\end{lemma}
It follows from Lemma~\ref{2}\ref{b} that \dots.
\section{Examples of $F[t]$-modules}
\begin{proposition} First proposition\end{proposition}
\begin{lemma} Second lemma\end{lemma}
\end{document}