有人知道如何在乳胶中输入这个公式吗? 在网上找了半天,看了书,也没找到相关的解决方法
我尝试对齐或多行,他们只是包装我的公式,我想让他们像截图中那样做
\begin{aligned}
\text{CPU execution time for a program} &= \\
\text{CPU clock cycles for a program} \times \text{Clock cycle time}
\end{aligned}
以上是一个错误的例子
align
用于排版数学表达式。
在这种情况下,您应该使用 tabular 表中的每个术语有 5 列。你应该熟悉这个环境并在 LaTeX 中制作表格。一个困难可能是那些多线细胞。旧包 makecell 可以很好地处理这个问题——手册可以在 CTAN 上找到。
这是代码。在最后一个单元格中,
\raisebox{}{}
是将 imes 符号与内容垂直居中(可能需要您进行调整)。
\documentclass{article}
\usepackage{makecell}
\begin{document}
\begingroup
\setlength\tabcolsep{3pt}%
\centering
\begin{tabular}{@{} *5{c} @{}}
\makecell{CPU execution time\\for a program}
& $=$
& \makecell{CPU clock cycles\\for a program}
& $\times$
& \raisebox{-0.15ex}{Clock cycle time}
\end{tabular}
\par
\endgroup
\end{document}