пытаюсь исправить ошибку, которая дает conjecture неправильное число

пытаюсь исправить ошибку, которая дает conjecture неправильное число

У меня есть ошибка в каком-то коде LaTeX, над которым я работаю, из-за которой он дает гипотезе неправильный номер. Вот короткий фрагмент кода, который воспроизводит проблему, извините, если код немного слишком длинный. В коде, который я привожу ниже, проблема принимает форму, в которой гипотеза отображается как гипотеза 2.0.2, а не гипотеза 2.0.1.

\documentclass[12pt]{amsart}
\usepackage[alphabetic]{amsrefs}
\usepackage{amssymb,amsmath,amsthm,mathrsfs,ulem,tikz, caption}
\usepackage[alphabetic]{amsrefs}
\usepackage{amsmath,amssymb,amsthm,enumerate,tikz,graphicx}
%\usepackage{MnSymbol}
\usepackage[all,cmtip]{xy}
\usepackage[applemac]{inputenc}
\usepackage{color}

\textheight 20cm

\parindent 0pt
\parskip 7pt

\newtheorem{thm}{Theorem}[subsection]
\newtheorem{theorem}[thm]{Theorem}
\newtheorem{conj}[thm]{Conjecture}

\begin{document}

\title{Poincar\'e Series and Zeta functions}
\author{Anton Deitmar,  Ming-Hsuan Kang, \& Rupert    
  M\MakeLowercase{c}Callum}
\date{}
\maketitle

\section{Gallery zeta functions}
\subsection{Zeta function of closed walks}

We summarize the above discussion as the following theorem.
\begin{theorem}

Let $\Gamma$ be a discrete cocompact subgroup of $G$ and $\pi$ be the 
representation of the Hecke algebra $H(W,S)$ 

Then 
\end{theorem}

\section{Alternating products of Poincar\'{e} series}
Note that one can generalize the definition of straight strips to higher   
rank cases and study their stabilizers. We expect that there exists an 
analogue of Theorem [blank] for the cases of higher rank. More precisely, 

\begin{conj}
the following two identities holds.
\begin{enumerate}
\item $w_i$ is the generator of the stabilizer of some straight tube.
\item For any representation $\rho$ of $H_q(W,S)$, 
there exists certain ordering of 

such that their product under this ordering is equal to $W(\rho,u)$.
\end{enumerate}
\end{conj} 

\end{document}

решение1

Вероятно, вы используете старое ядро ​​LaTeX (до 2015 г.). В этом случае счетчики, связанные с subsectionне сбрасываются при sectionшаге. Они сбрасываются в LaTeX с версии 2015/01/01.

Лучше всего обновиться, конечно. Иначе придется вручную добавлять сброс, скажем, с помощью

\usepackage{chngcntr}

и затем, после определения счетчика, добавляем

\counterwithin*{thm}{section}

Вот код, который проверяет дату ядра LaTeX и применяет исправление, если дата его выпуска до 2015 года; в противном случае он ничего не делает.

\documentclass[12pt]{amsart}

\newtheorem{thm}{Theorem}[subsection]
\newtheorem{theorem}[thm]{Theorem}
\newtheorem{conj}[thm]{Conjecture}

%%% Patching code
\begingroup\makeatletter
\def\eky#1/#2/#3#4{%
  #1
    \expandafter\endgroup\expandafter\@firstofone
  \else
    \expandafter\endgroup\expandafter\@gobble
  \fi
}
\ifnum2015>\expandafter\eky\fmtversion
 {
  \usepackage{chngcntr}
  \counterwithin*{thm}{section}
  % add also other counters depending on subsection
 }
%%% end of patching code

\begin{document}

\section{Gallery zeta functions}
\subsection{Zeta function of closed walks}

Some text

\begin{theorem}
A theorem
\end{theorem}

\section{Alternating products of Poincar\'{e} series}

Some text

\begin{conj}
A conjecture
\end{conj} 

\end{document}

введите описание изображения здесь

Связанный контент