当使用正常的 时\begin{align}
,它在右侧使用的计数器是数字。如果使用 ,则\begin{subequations}
章节中第一个等式将得到 1a。我的问题是:如何删除数字而不删除字母,同时重置每个新对齐环境的计数器?
答案1
我不会重载align
,而是为此目的定义一个新的环境。在这里我滥用parentequation
了 的计数器,因为在 内部subequations
使用 的这种变体没有多大意义。align
subequations
但请注意,您将无法引用这些数字。
\documentclass{article}
\usepackage{amsmath}
\newenvironment{alphalign}
{%
% save the value of equation
\setcounter{parentequation}{\value{equation}}%
% reset equation and make it \alph
\setcounter{equation}{0}%
\renewcommand{\theequation}{\alph{equation}}%
% start a standard align
\align
}
{%
% end align
\endalign
% restore equation
\setcounter{equation}{\value{parentequation}}
}
\begin{document}
An alphabetic align for starter
\begin{alphalign}
a&=b\\
c&=d\\
e&=f
\end{alphalign}
Now a numbered equation
\begin{equation}
x=y
\end{equation}
and another alphabetic align
\begin{alphalign}
a&=b\\
c&=d\\
e&=f
\end{alphalign}
The end.
\end{document}
答案2
也许是这样的?
\documentclass[]{book}
\usepackage{amsmath}
\begin{document}
\chapter{First Chapter}
\renewcommand{\theequation}{\alph{equation}}
\begin{align}
\text{1st line}&: E^2 = m_0^2c^4 +p^2c^2\\
\text{2nd line}&: \delta S = 0\\
\text{3rd line}&: \partial_\mu F^{\mu\nu} = \mu_0j^\nu
\end{align}
\setcounter{equation}{0}
\begin{align}
\text{1st line}&: E^2 = m_0^2c^4 +p^2c^2\\
\text{2nd line}&: \delta S = 0\\
\text{3rd line}&: \partial_\mu F^{\mu\nu} = \mu_0j^\nu
\end{align}
\end{document}