我的代码是:
\documentclass[12pt,a4paper,oldfontcommands,twoside]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[inner=4cm,outer=2cm]{geometry}
\usepackage{amssymb,amsmath,amsfonts}
\setlength{\parskip}{5pt}
\let\equation\gather
\let\endequation\endgather
\usepackage{mathrsfs}
\usepackage{bm}
\usepackage[noadjust]{cite}
\usepackage{mathtools}
\usepackage{float}
\usepackage{bbm,enumitem}
\numberwithin{equation}{chapter}
\begin{document}
\chapter{Chapter 1}
\section{Section 1 of chapter 1}
\begin{equation}
a^2=b^2+c^2
\end{equation}
\chapter{Chapter 2}
\section{Section 1 of chapter 1}
\begin{equation}
a^2=b^2+c^2
\end{equation}
\end{document}
答案1
只是改变
\numberwithin{equation}{chapter}
到
\numberwithin{equation}{section}
\documentclass[12pt,a4paper,oldfontcommands,twoside]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[inner=4cm,outer=2cm]{geometry}
\usepackage{amssymb,mathtools,mathrsfs,bm}
\setlength{\parskip}{5pt}
\let\equation\gather
\let\endequation\endgather
\usepackage[noadjust]{cite}
\usepackage{float} % are you sure you need this package?
\usepackage{bbm,enumitem}
\numberwithin{equation}{section} % <-- new
\begin{document}
\setcounter{chapter}{3} % just for this example
\setcounter{section}{2}
\begin{equation} a^2=b^2+c^2 \end{equation}
\end{document}