我已经基于使用罗马数字的化学反应方程式创建了新环境。我想基于使用此编号格式的子方程式创建另一个环境。您可以在下面找到 MWE。
\documentclass[a4paper,twoside,openright,12pt]{memoir}
\usepackage{amsmath}
\newcounter{chemEquationCounter}[chapter]
\renewcommand*\thechemEquationCounter{\thechapter. \Roman{chemEquationCounter}}
\newenvironment{chemEquation}{%
\stepcounter{chemEquationCounter}%
\begin{equation}%
}%
{\tag{\thechemEquationCounter}%
\end{equation}%
}
\newenvironment{mathSubEquations}%
{%
\begin{subequations}%
\renewcommand{\theequation}{\theparentequation-\alph{equation}%
}
}%
{%
\end{subequations}%
}%
\newenvironment{chemSubEquations}%
{%
\begin{subequations}%
\renewcommand{\theequation}{\theparentequation-\alph{equation}%
}
}%
{%
\end{subequations}%
}%
\newenvironment{eqs}
{\subequations\align}
{\endalign\endsubequations}
\begin{document}
\chapter{Chapter 1}
\begin{equation}
a=b.c
\end{equation}
\begin{chemEquation}
2H_2 + O_2 \rightarrow 2H_2O
\end{chemEquation}
\begin{mathSubEquations}
\begin{equation}
a=b.c
\end{equation}
\begin{equation}
d=e.f
\end{equation}
\end{mathSubEquations}
\begin{chemSubEquations}
\begin{chemEquation}
CH_4 + O_2 \rightarrow CO_2 + 2H_2O
\end{chemEquation}
\begin{chemEquation}
NaOH + HCl \rightarrow NaCl + H_2O
\end{chemEquation}
\end{chemSubEquations}
\end{document}