我找不到如何\newfloat
使用现有计数器(例如,sibling=theorem
但对于\newfloat
)对创建的浮点数进行编号。有什么想法吗?
平均能量损失:
\documentclass[options]{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{thmtools}
\declaretheorem[name=Theorem,numberwithin=section]{theorem}
\declaretheorem[name=Lemma,sibling=theorem]{lemma}
\usepackage{float}
\floatstyle{ruled}
\newfloat{Protocol}{htbp}{lop}[theorem]
\begin{document}
\section{My theorems}
\begin{theorem}
Blabla
\end{theorem}
\begin{lemma}
Lemma can use sibling to be numbered with the same counter as theorem.
\end{lemma}
\begin{Protocol}\caption{I want it to be 1.3, not 1.2.1}
But I can't find how to do it for custom floats.
\end{Protocol}
\end{document}