Theoremstyle:添加点

Theoremstyle:添加点

我需要在格式中添加一个额外的点\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} 

输出

在此处输入图片描述

相关内容