![在一系列等式旁边写上文字](https://linux22.com/image/422626/%E5%9C%A8%E4%B8%80%E7%B3%BB%E5%88%97%E7%AD%89%E5%BC%8F%E6%97%81%E8%BE%B9%E5%86%99%E4%B8%8A%E6%96%87%E5%AD%97.png)
https://proofwiki.org/wiki/Self-Inverse_Elements_Commute_iff_Product_is_Self-Inverse
我如何像这样对齐每个方程的描述?使用对齐会将文本放在页面的右侧太远的地方。TeX 用户是否有一种首选方法来标记这种不等式?
答案1
正如 John Kormylo 所建议的,人们可以做到这一点。
\documentclass{article}
\usepackage{amsmath}
\usepackage{xcolor}
\begin{document}
\begin{align*}
(x\circ y) \circ (x\circ y) & = x\circ (y\circ x)\circ y & &\textnormal{$\circ$ is \color{blue}{associative}}\\
& = x \circ (x\circ y) \circ y & &\textnormal{$x$ and $y$ \textcolor{blue}{commute}}\\
& = (x\circ x) \circ (y \circ y) & &\textnormal{$\circ$ is \textcolor{blue}{associative}}\\
& = e_G \circ e_G & & \textnormal{$x$ and $y$ are \textcolor{blue}{self-inverse}}\\
& = e_G & & \textnormal{Definition of \textcolor{blue}{Identity Element}}
\end{align*}
\end{document}