如何在不同的定理中使用连续编号?

如何在不同的定理中使用连续编号?

我有两个新定理,分别名为“remark”和“remarks”。我想让它们使用相同的编号,例如:

备注1:tatatatatata

备注2:blablalalba

备注3:

註釋4:


这就是我在我的代码中使用的内容:

\newtheoremstyle{theoremddq}% name of the style to be used  
{\topsep}% measure of space to leave above the theorem. E.g.: 3pt  
{\topsep}% measure of space to leave below the theorem. E.g.: 3pt  
{\itshape}% name of font to use in the body of the theorem   
{2mm}%measure of space to indent   
{\bfseries}% name of head font   
{}%punctuation between head and body   
{ }% space after theorem head; " "= normal interword space   
{\underline{\thmname{#1} \thmnumber{#2}:} {\underline{\thmnote{\textit{(#3)}}}} }

\newframedtheorem[   enhanced jigsaw,   colback={white!70!white},  
   colframe=black,   coltitle=black,   boxrule=1pt,   sharp corners,  
   breakable, ]{remark*}{Remarque}

\theoremstyle{theoremdd}

\newframedtheorem[   enhanced jigsaw,   colback={white!70!white},  
   colframe=black,   coltitle=black,   boxrule=1pt,   sharp corners,  
   breakable, ]{remarks*}{Remarques}

答案1

一般来说,您需要在定理声明中添加可选参数来表明它们应该使用相同的数字系统。

这意味着[remark*]在您的\newframedtheorem命令中添加remarks*如下内容:

\newframedtheorem[...]{remarks*}[remark*]{Remarques}

这是一个工作示例,借用了这个答案

\documentclass{amsart}
\usepackage{xparse}
\usepackage[most]{tcolorbox}

\NewDocumentCommand{\newframedtheorem}{O{}momo}{%
  \IfNoValueTF{#3}
   {%
    \IfNoValueTF{#5}
     {\newtheorem{#2}{#4}}
     {\newtheorem{#2}{#4}[#5]}%
    }
   {\newtheorem{#2}[#3]{#4}}
  \tcolorboxenvironment{#2}{#1}%
}

\newtheoremstyle{theoremddq}% name of the style to be used  
{\topsep}% measure of space to leave above the theorem. E.g.: 3pt  
{\topsep}% measure of space to leave below the theorem. E.g.: 3pt  
{\itshape}% name of font to use in the body of the theorem   
{2mm}%measure of space to indent   
{\bfseries}% name of head font   
{}%punctuation between head and body   
{ }% space after theorem head; " "= normal interword space   
{\underline{\thmname{#1} \thmnumber{#2}:} {\underline{\thmnote{\textit{(#3)}}}} }

\newframedtheorem[   enhanced jigsaw,   colback={white!70!white},  
   colframe=black,   coltitle=black,   boxrule=1pt,   sharp corners,  
   breakable, ]{remark*}{Remarque}

\theoremstyle{theoremddq}

\newframedtheorem[   enhanced jigsaw,   colback={white!70!white},  
   colframe=black,   coltitle=black,   boxrule=1pt,   sharp corners,  
   breakable, ]{remarks*}[remark*]{Remarques}

\begin{document}

\begin{remark*} Remark here. \end{remark*}
\begin{remarks*} Some remarks. \end{remarks*}
\begin{remarks*} Some more remarks. \end{remarks*}
\begin{remark*} Another remark. \end{remark*}

\end{document}

乳胶输出显示连续编号

相关内容