我试图显示以下内容,居中,但每行中的第一个等号都对齐。这是我找到的建议方法之一,但没有奏效。
%
\begin{equation*}
\begin{aligned}
$\frac{6}{7} &{}= R_1 + \frac{1}{2}$,
\newline
$R_1 &{}= \frac{6}{7} - \frac{1}{2} = \frac{6}{14} = R_2 + \frac{1}{3}$,
\newline
$R_2 &{}= \frac{6}{14} - \frac{1}{3} = \frac{2}{21} = R_3 + \frac{1}{11}$,
\newline
$R_3 &{}= \frac{2}{21} - \frac{1}{11} = \frac{1}{231}$,
\newline
$\frac{6}{7} = \frac{1}{2} + \frac{1}{3} + \frac{1}{11} + \frac{1}{231}$,
\end{aligned}
\end{equation*}
\newline
答案1
在显示数学时不要使用\newline
、$
或空行:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\frac{6}{7} &= R_1 + \frac{1}{2},\\
R_1 &= \frac{6}{7} - \frac{1}{2} = \frac{6}{14} = R_2 + \frac{1}{3},\\
R_2 &= \frac{6}{14} - \frac{1}{3} = \frac{2}{21} = R_3 + \frac{1}{11},\\
R_3 &= \frac{2}{21} - \frac{1}{11} = \frac{1}{231},\\
\frac{6}{7} &= \frac{1}{2} + \frac{1}{3} + \frac{1}{11} + \frac{1}{231},
\end{align*}
\end{document}