![如何正确对齐、居中和编号多步骤算术问题?](https://linux22.com/image/458362/%E5%A6%82%E4%BD%95%E6%AD%A3%E7%A1%AE%E5%AF%B9%E9%BD%90%E3%80%81%E5%B1%85%E4%B8%AD%E5%92%8C%E7%BC%96%E5%8F%B7%E5%A4%9A%E6%AD%A5%E9%AA%A4%E7%AE%97%E6%9C%AF%E9%97%AE%E9%A2%98%EF%BC%9F.png)
如图所示,我想要几样东西:
- 编号步骤(如果可能,在左侧)
- 正确对齐和居中,因此看起来很专业。
- 步骤#2 中的总和需要与加号正确对齐。
\documentclass{article}
\usepackage{dcolumn}
\begin{document}
\begin{equation}
\begin{array}{l@{}l@{}l}
5 & 4 & \rightarrow 50 + 4 \\
\times & 7 \\
\cline{1-2}
\end{array}
\end{equation}
\begin{equation}
\begin{array}{l@{}l@{}l}
50 & \times 7 & = 350 \\
4 & \times 7 & = +28 \\
\cline{3-3}
& & 378
\end{array}
\end{equation}
\end{document}
答案1
- 欢迎来到 TeX.SE
- 我猜你正在寻找以下内容
\documentclass[leqno]{article}
\usepackage{amsmath}
\usepackage{enumitem}
\begin{document}
With \verb+enumerate+:
\begin{enumerate}
\item\hfil $\begin{array}[t]{rl}
54 & \rightarrow 50 + 4 \\
\times 7 & \\
\cline{1-1}
\end{array}$
\item\hfil $\begin{array}[t]{r @{} r}
50 \times 7 = & 350 \\
4 \times 7 = & +\phantom{3}28 \\
\cline{2-2}
& 378
\end{array}$
\end{enumerate}
Or with \verb+align+:
\begin{align}
& \begin{array}[t]{rl}
54 & \rightarrow 50 + 4 \\
\times 7 & \\
\cline{1-1}
\end{array} \\[2ex]
& \begin{array}[t]{r @{} r}
50 \times 7 = & 350 \\
4 \times 7 = & {}+\phantom{3}28 \\
\cline{2-2}
& 378
\end{array}
\end{align}
\end{document}