我已经努力让自己的牙齿对齐看起来好看了好久了。经过大量的谷歌搜索,我终于实现了几乎我想要的是:
现在的问题是方程式编号(示例中的 1 和 3)没有垂直居中。请帮我把它们弄对!MWE:
\documentclass[12pt,a4paper]{article}
\usepackage{mathtools}
\usepackage{amsmath, amsfonts, amssymb, siunitx}
\begin{document}
\nocite{*}
\begin{alignat}{2}
&\phantom{U_{\mathrm{HETKELLINEN}}}&f
&= \frac{1}{T}\notag\\
&\Leftrightarrow
&T &=\frac{1}{f}=\SI{0,001}{\second}\\
%
& &\hat{U}
&= \sqrt{2} \cdot U = \SI{14,1421}{\volt}\\
%
& &U_{\mathrm{HETKELLINEN}}
&= \hat{U} \cdot \sqrt{2 \cdot \pi \cdot f \cdot t}\notag\\
& & &= \SI{14,1421}{\volt} \cdot \sqrt{2 \cdot \pi \cdot \SI{1}{\kilo\hertz} \cdot \SI{0,0011}{\second}}\notag\\
&&&= \SI{8,3125}{\volt}
\end{alignat}
\end{document}
答案1
您可以使用split
:
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath, amssymb, siunitx}
\usepackage{mathtools}
\begin{document}
\begin{align}
\begin{split}
f &= \frac{1}{T}\\
\Leftrightarrow\hphantom{U_{\mathrm{HETKELLINEN}}}
T &= \frac{1}{f}=\SI{0,001}{\second}
\end{split}
\\
%
\hat{U} &= \sqrt{2} \,U = \SI{14,1421}{\volt}\\
%
\begin{split}
U_{\mathrm{HETKELLINEN}}
&= \hat{U} \sqrt{2\pi ft}\\
&= \SI{14,1421}{\volt} \cdot \sqrt{2\pi \cdot \SI{1}{\kilo\hertz}
\cdot \SI{0,0011}{\second}}\\
&= \SI{8,3125}{\volt}
\end{split}
\end{align}
\end{document}