![如何在对齐环境下将一组对齐的方程式单独编号为两列?](https://linux22.com/image/479045/%E5%A6%82%E4%BD%95%E5%9C%A8%E5%AF%B9%E9%BD%90%E7%8E%AF%E5%A2%83%E4%B8%8B%E5%B0%86%E4%B8%80%E7%BB%84%E5%AF%B9%E9%BD%90%E7%9A%84%E6%96%B9%E7%A8%8B%E5%BC%8F%E5%8D%95%E7%8B%AC%E7%BC%96%E5%8F%B7%E4%B8%BA%E4%B8%A4%E5%88%97%EF%BC%9F.png)
我对只对整个方程组进行一次编号感到困难。目前,有两个数字,每个数字代表一行。我需要在行的中间仅显示一个数字:
\documentclass[11pt,letterpaper,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage[total={6in,10in},left=1.5in,top=0.5in,includehead,includefoot]{geometry}
\usepackage{nccmath,amsmath}
\usepackage{mathtools}
\begin{document}
Blabla bla:
\begin{align}
x_1 &= \ell \sin \theta_1,
&y_1 &= \ell \cos \theta_1, \\
x_2 &= \ell \sin \theta_1 + \ell \sin \theta_2,
&y_2 &= \ell \cos \theta_1 + \ell \cos \theta_2.
\end{align}
\end{document}
通常我会使用方程环境周围对齐环境,但我需要减少垂直空间。我不知道该怎么做。我可以使用\nonumber \\ \\ \nonumber
而不是单个\\
,但这是一种 hack!
答案1
评论太多了。你可以使用split
,我对 有强烈的个人偏好subequations
。
\documentclass[11pt,letterpaper,twoside]{book}
\usepackage[T1]{fontenc}
\usepackage[total={6in,10in},left=1.5in,top=0.5in,includehead,includefoot]{geometry}
\usepackage{nccmath,amsmath}
\usepackage{mathtools}
\usepackage{tensor}
%\newcommand{\tensor}[1]{\ensuremath{\boldsymbol{#1}}}
\begin{document}
Original \texttt{align*}
\begin{align}
x_1 &= \ell \sin \theta_1,
&y_1 &= \ell \cos \theta_1, \\
x_2 &= \ell \sin \theta_1 + \ell \sin \theta_2,
&y_2 &= \ell \cos \theta_1 + \ell \cos \theta_2.
\end{align}
Naive \texttt{aligned}:
\begin{equation}\label{eq:aligned}
\begin{aligned}
x_1 &= \ell \sin \theta_1,
&y_1 &= \ell \cos \theta_1, \\
x_2 &= \ell \sin \theta_1 + \ell \sin \theta_2,
&y_2 &= \ell \cos \theta_1 + \ell \cos \theta_2.
\end{aligned}
\end{equation}
We can refer here to the combined equations \eqref{eq:aligned}.
With \texttt{split}:
\begin{align}\label{eq:splittensors}
\begin{split}
\tensor{x}{_1} &= \ell \sin \theta_1,\\
\tensor{x}{_2} &= \ell \sin \theta_1 + \ell \sin \theta_2,
\end{split}
&
\begin{split}
\tensor{y}{_1} &= \ell \cos \theta_1, \\
\tensor{y}{_2} &= \ell \cos \theta_1 + \ell \cos \theta_2.
\end{split}
\end{align}
We can refer here to the combined equations \eqref{eq:splittensors} as well.
With \texttt{subequations}:
\begin{subequations}\label{eq:tensors}
\begin{align}
\tensor{x}{_1} &= \ell \sin \theta_1,
&\tensor{y}{_1} &= \ell \cos \theta_1,\label{eq:tensor_1} \\
\tensor{x}{_2} &= \ell \sin \theta_1 + \ell \sin \theta_2,
&\tensor{y}{_2} &= \ell \cos \theta_1 + \ell \cos \theta_2.\label{eq:tensor_2}
\end{align}
\end{subequations}
We can refer to the combined equations \eqref{eq:tensors}, \emph{and} to its
subequations, \eqref{eq:tensor_1} and \eqref{eq:tensor_2}.
One problem with \texttt{split} and \texttt{aligned} is that it can be ambiguous.
\begin{align}\label{eq:splittensors2}
\begin{split}
\tensor{x}{_1} &= \ell \sin \theta_1,\\
\tensor{x}{_2} &= \ell \sin \theta_1 + \ell \sin \theta_2,\\
\tensor{x}{_3} &= \ell \sin \theta_1 - \ell \sin \theta_2,
\end{split}
&
\begin{split}
\tensor{y}{_1} &= \ell \cos \theta_1, \\
\tensor{y}{_2} &= \ell \cos \theta_1 + \ell \cos \theta_2,\\
\tensor{y}{_3} &= \ell \cos \theta_1 - \ell \cos \theta_2.
\end{split}
\end{align}
When one now refers to \eqref{eq:splittensors2}, it could either mean the
equations in the middle or all of them.
Some like to add a brace
\begin{equation}
\left. \begin{aligned}
\tensor{x}{_1} &= \ell \sin \theta_1,
&\tensor{y}{_1} &= \ell \cos \theta_1, \\
\tensor{x}{_2} &= \ell \sin \theta_1 + \ell \sin \theta_2,
&\tensor{y}{_2} &= \ell \cos \theta_1 + \ell \cos \theta_2,\\
\tensor{x}{_3} &= \ell \sin \theta_1 - \ell \sin \theta_2,
&\tensor{y}{_3} &= \ell \cos \theta_1 - \ell \cos \theta_2.
\end{aligned}\quad\right\}
\end{equation}
With \texttt{subequations} there is no ambiguity:
\begin{subequations}\label{eq:moretensors}
\begin{align}
\tensor{x}{_1} &= \ell \sin \theta_1,
&\tensor{y}{_1} &= \ell \cos \theta_1, \\
\tensor{x}{_2} &= \ell \sin \theta_1 + \ell \sin \theta_2,
&\tensor{y}{_2} &= \ell \cos \theta_1 + \ell \cos \theta_2,\\
\tensor{x}{_3} &= \ell \sin \theta_1 - \ell \sin \theta_2,
&\tensor{y}{_3} &= \ell \cos \theta_1 - \ell \cos \theta_2.
\end{align}
\end{subequations}
We can refer to the combined equations \eqref{eq:moretensors} without ambiguity.
\end{document}