![繼續在演算法環境中對定理進行編號](https://rvso.com/image/472727/%E7%B9%BC%E7%BA%8C%E5%9C%A8%E6%BC%94%E7%AE%97%E6%B3%95%E7%92%B0%E5%A2%83%E4%B8%AD%E5%B0%8D%E5%AE%9A%E7%90%86%E9%80%B2%E8%A1%8C%E7%B7%A8%E8%99%9F.png)
我正在使用該thmtools
套件來獲取類似定理的環境,其中定理編號的形式為 SECTION.THEOREMNUMBER:
\declaretheorem[numberwithin = chapter]{theorem}
\declaretheorem[sibling = theorem, style = definition]{definition}
\declaretheorem[sibling = theorem, style = definition]{lemma}
現在我還想包括使用套件algorithm
和 的演算法algpseudocode
。我已經指定了第一個通過 打包的\usepackage[section]{algorithm}
。但是,現在的編號僅為 SECTION.ALGORITHMNUMBER。如果演算法之前有定理,則它們將被忽略(即不繼續編號)。換句話說:一節中的演算法獨立於定理進行編號。我該如何解決這個問題?