![Theoremstyle:添加点](https://linux22.com/image/303708/Theoremstyle%EF%BC%9A%E6%B7%BB%E5%8A%A0%E7%82%B9.png)
我需要在格式中添加一个额外的点\theoremstyle
,例如;
2.1.3. 定理
2.1. 引理
我用 :
\documentclass{article}
\usepackage{amsthm}
\swapnumbers
\newlength{\spacelength}
\settowidth{\spacelength}{\normalfont\ }
\newtheoremstyle{mystyle}
{\baselineskip}{\baselineskip}{\itshape}{}{}{\vspace{\baselineskip}}{\newline}
{\thmname{#1}\thmnumber{ #2}\thmnote{ #3}}
\theoremstyle{mystyle}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\begin{document}
\section{test}
\begin{theorem}
A theorem
\end{theorem}
\begin{lemma}
A lemma
\end{lemma}
\end{document}
答案1
只需评论该行
\swapnumbers
并使用
\newtheoremstyle{mystyle}
{\baselineskip}{\baselineskip}{\itshape}{}{}{\vspace{\baselineskip}}{\newline}
{\thmnumber{#2}.\thmname{ #1}\thmnote{ #3}}
平均能量损失
\documentclass{article}
\usepackage{amsthm}
%\swapnumbers
\newlength{\spacelength}
\settowidth{\spacelength}{\normalfont\ }
\newtheoremstyle{mystyle}
{\baselineskip}{\baselineskip}{\itshape}{}{}{\vspace{\baselineskip}}{\newline}
{\thmnumber{#2}.\thmname{ #1}\thmnote{ #3}}
\theoremstyle{mystyle}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\begin{document}
\section{test}
\begin{theorem}
A theorem
\end{theorem}
\begin{lemma}
A lemma
\end{lemma}
\end{document}
输出