如何使对齐环境中的所有文本都变成斜体?从下面的代码中可以看出,我首先在每一行中添加 \textit,但当我将分数变成斜体时,出现了错误。有没有更好的方法?
\begin{align*}
\textit{27 + 183}
& \textit{= 210}\\
\textit{27 + 2}
& \textit{= 29}\\
\frac{1}{2} \times 29
&= 14.5\\
14.5 × 14.5
& = 210.25\\
210.25 - 210
& = 0.25\\
(0.25)
& = 0.5
\end{align*}
答案1
假设你只是想要数字而不是所有斜体符号我只需要用你的编辑器来 ([0-9.]+)
替换 \\mathit{\1}
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\mathit{27} + \mathit{183}
&= \mathit{210}\\
\mathit{27} + \mathit{2}
& = \mathit{29}\\
\frac{\mathit{1}}{\mathit{2}} \times \mathit{29}
&= \mathit{14.5}\\
\mathit{14.5} × \mathit{14.5}
& = \mathit{210.25}\\
\mathit{210.25} - \mathit{210}
& = \mathit{0.25}\\
(\mathit{0.25})
& = \mathit{0.5}
\end{align*}
\end{document}