这段文本代码该如何对齐书写?
\begin{align}
\text{2 $\times$ value of 1 step algo $\ge$ total value of 2nd (l+1)th item}
\text{Or, 2$\times$ value of 1 step algo $\ge$ total value of solution}
\end{align}
答案1
我想你需要做出一个选择:你是想在符号上对齐\ge
,还是在两个“句子”的开头对齐?这些选择如下:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\text{2 $\times$ value of 1 step algo} &\ge \text{total value of 2nd (l+1)th item}\\
\text{Or, 2 $\times$ value of 1 step algo} &\ge \text{total value of solution}
\end{align}
\begin{align}
&\text{2 $\times$ value of 1 step algo} \ge \text{total value of 2nd (l+1)th item}\\
&\text{Or, 2 $\times$ value of 1 step algo} \ge \text{total value of solution}
\end{align}
\end{document}