![对齐环境中的方程编号定位](https://linux22.com/image/275787/%E5%AF%B9%E9%BD%90%E7%8E%AF%E5%A2%83%E4%B8%AD%E7%9A%84%E6%96%B9%E7%A8%8B%E7%BC%96%E5%8F%B7%E5%AE%9A%E4%BD%8D.png)
如何控制环境中方程编号和右边距之间的间距align
?
答案1
下面的例子侵入了 的内部来align
添加可以使用 进行配置的额外空间\alignnumbersep
:
\documentclass{article}
\usepackage{amsmath}
\newdimen\alignnumbersep
\setlength{\alignnumbersep}{10mm}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\math@cr@@@align@measure}
{\df@tag\fi\fi}
{\df@tag\fi\fi\kern\alignnumbersep}
{}{}
\patchcmd{\math@cr@@@align}
{\make@display@tag}
{\make@display@tag\kern\alignnumbersep}
{}{}
\makeatother
\begin{document}
\begin{gather}
\text{gather}
\end{gather}
\begin{align}
a&=b & c&=d\\
aa&=bb & cc&=dd
\end{align}
\end{document}