
我正在嘗試調整我的公式,並且在每個公式的末尾我想看到數字。因為我想解釋我的報告中的所有公式。然而,在進行以下更改後,我遇到了許多錯誤,不僅與我處理過的文件有關,而且即使我沒有進行更改,也與其他文件有關。我有一點困惑。您能檢查一下嗎:
\begin{align}
$processTime& = (U / calcRate_{byte/s}) + (D / calcRate_{byte/s})$ \tag{1}\\[2ex]
$safetyTime& = (1.0 + safety)* processTime$ \tag{2}\\[2ex]
\end{align}
答案1
我想你在這裡。您不必添加\tag
,編號是自動的。另外,不要\\
在末尾添加:它會創建一個新行和一個新標籤。
\documentclass[a4paper, 11pt]{book}
\usepackage[utf8]{inputenc}
\usepackage{fourier, heuristica} % not necessary, just personal preference
\usepackage{mathtools}
\begin{document}
\begin{align}
\text{processTime}& = (U / \text{calcRate}_\text{\,byte/s}) + (D / \text{calcRate}_\text{\,byte/s})\\[2ex]
\text{safetyTime}& = (1.0 + \text{safety})* \text{processTime}
\end{align}
\end{document}