![如何写出没有 $ 的数学方程式](https://linux22.com/image/330781/%E5%A6%82%E4%BD%95%E5%86%99%E5%87%BA%E6%B2%A1%E6%9C%89%20%24%20%E7%9A%84%E6%95%B0%E5%AD%A6%E6%96%B9%E7%A8%8B%E5%BC%8F.png)
答案1
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
g\Bigl(x\mathrel{\Big|}\mu_i,\sum_i\Bigr) = {}&\frac{1}{\sqrt{(2\pi)^D |\sum_i|}} \exp\biggl(-\frac{1}{2}(x-\mu_i)^{'} \notag \\
& \times\sum_i^{-1}(x-\mu_i)\biggr),
\end{align}
\[H_2 = \sum_\Omega^{} \log(|B(f_k,f_k)|)\]
\end{document}
对第二个方程进行编号并对齐两个=
符号(感谢@Mico 纠正二项分布的符号):
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
g(x\mathrel{|}\mu_i,\Sigma_i^{})
&= \frac{1}{\sqrt{(2\pi)^D |\Sigma_i|}} \exp\Bigl(-\frac12(x-\mu_i)^{'}\notag \\
& \phantom{={}} \times\Sigma_i^{-1}(x-\mu_i)\Bigr),\\
H_2 &= \sum_\Omega^{} \log(|B(f_k,f_k)|)
\end{align}
\end{document}
答案2
和alignedat
:
\documentclass{article}
\usepackage{mathtools} %
\begin{document}
\begin{equation}
\begin{alignedat}{2}
&g\Bigl(x \mathrel{\Big\vert} \mu_i,∑_i\Bigr) ={} & &\frac{1}{√{(2π)^D}\lvert∑_i\rvert}\exp\biggl(-\frac{1}{2}(x-\mu_i)' \\[-1ex]
& & & × ∑_i^{-1 } (x-\mu_i)\biggr),\\
& H₂ = {} \mathrlap{∑_{Ω}\log()\lvert B(f_k, f_k)\rvert)}
\end{alignedat}
\end{equation}
\end{document}