我想知道 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}