獨立的“子方程式”環境,但水平對齊相同

獨立的“子方程式”環境,但水平對齊相同
\begin{subequations}
\begin{align}
a_1 x + b_1 &\geq 0 \\
a_2 x + b_2 &\geq 0 \\
a_3 x + b_3 &\geq 0
\end{align}
\end{subequations}
\begin{align}
\therefore x \leq 0
\end{align}

程式碼產生以下結果:

「子方程式」環境和兩個「對齊」環境的 TeX 範例

編號是我想要的,但是,這些表達式沒有水平對齊,&因為程式碼將align環境分為三個。此外,由於分割,線(1c)和(2)之間以及線(2)和(3)之間的間隔比其他線更大。

如果我設定方程號(2a)而不是(2),這兩個問題可以用中的方法解決對齊連續的對齊環境並保持方程式編號,但是上面的情況能解決嗎?我嘗試編寫一些程式碼但無法解決它。

答案1

這可行,但你應該重新考慮你是否真的想要它。

\renewcommand如果您的方程式編號具有更多結構,則應進行調整。

\documentclass{article}
\usepackage{amsmath,amssymb}

\newcommand{\resetparent}[1][0]{%
  \stepcounter{parentequation}%
  \setcounter{equation}{#1}%
}

\begin{document}

\begin{subequations}%
\renewcommand{\theparentequation}{\arabic{parentequation}}%
\begin{align}
a_1 x + b_1 &\geq 0 \\
a_2 x + b_2 &\geq 0 \\
a_3 x + b_3 &\geq 0 \\
\resetparent[-1]
\therefore x &\leq 0 \\
\resetparent
aaaa_1 x + b_1 &\geq 0 \\
a_2 x + b_2 &\geq 0 \\
a_3 x + b_3 &\geq 0
\end{align}
\end{subequations}

\end{document}

在此輸入影像描述

相關內容