對齊 (Amsmath):增加方程式和數字之間的間距

對齊 (Amsmath):增加方程式和數字之間的間距
\documentclass{article}
\usepackage{amsmath}

\begin{document}
\begin{align}
    &\left(\phi^{\alpha_{t}}\partial_{\tau}+\mathbf{v}_{\parallel}\cdot\phi^{\alpha_{x}}\nabla_{\mathbf{\xi}}+\omega\partial_{z}\right)\omega+\phi\left(2\mathbf{\Omega}\times\mathbf{v}\right)_{\bot}+\frac{1}{\phi^3\rho}\partial_{z}p=Q_{\omega}^{\phi}-\frac{1}{\phi^3}
\end{align}
\end{document}

如何增加方程式和方程式編號之間的間距?

答案1

您可以做兩件事:

  • \left( ... \right)透過(a)用對替換對以及(b)將一些下標符號(並且是主要候選者) \bigl( ... \bigr)「緊貼」到相關項,使方程式總體上使用更少的空間。你的原始方程式如下面的方程式(1)所示;建議的節省空間操作的結果如公式(2)所示。誠然,影響力並不大,但也不容小覷。\xi\bot

  • 在方程式末尾插入\quad或甚至\qquad將方程式向左移動;參見下面的等式(3)和(4)。就我自己而言(還有誰?!),我認為執行這些左移都沒有優勢。

以下螢幕截圖中的框架線之所以存在,是因為該解決方案也載入了showframe套件。

在此輸入影像描述

\documentclass{article}
\usepackage{amsmath} % for 'gather*' env.
\usepackage{bm}      % for '\bm' ("bold math") macro
\usepackage{showframe} % draw lines around text block

\begin{document}

\begin{equation}
\left(\phi^{\alpha_{t}}\partial_{\tau}+\mathbf{v}_{\parallel}\cdot
\phi^{\alpha_{x}}\nabla_{\mathbf{\xi}}+\omega\partial_{z}\right)\omega
+\phi\left(2\mathbf{\Omega}\times\mathbf{v}\right)_{\bot}
+\frac{1}{\phi^3\rho}\partial_{z}p=Q_{\omega}^{\phi}-\frac{1}{\phi^3}
\end{equation}
\begin{equation}
\bigl(\phi^{\alpha_{t}}\partial_{\tau}+\mathbf{v}_{\parallel}
\cdot\phi^{\alpha_{x}}\nabla_{\!\bm{\xi}}+\omega\partial_{z}\bigr)\omega
+\phi\bigl(2\bm{\Omega}\times\mathbf{v}\bigr)_{\!\bot}
+\frac{1}{\phi^3\rho}\partial_{z}p=Q_{\omega}^{\phi}-\frac{1}{\phi^3}
\end{equation}
\begin{equation}
\bigl(\phi^{\alpha_{t}}\partial_{\tau}+\mathbf{v}_{\parallel}
\cdot\phi^{\alpha_{x}}\nabla_{\!\bm{\xi}}+\omega\partial_{z}\bigr)\omega
+\phi\bigl(2\bm{\Omega}\times\mathbf{v}\bigr)_{\!\bot}
+\frac{1}{\phi^3\rho}\partial_{z}p=Q_{\omega}^{\phi}-\frac{1}{\phi^3}
\quad
\end{equation}
\begin{equation}
\bigl(\phi^{\alpha_{t}}\partial_{\tau}+\mathbf{v}_{\parallel}
\cdot\phi^{\alpha_{x}}\nabla_{\!\bm{\xi}}+\omega\partial_{z}\bigr)\omega
+\phi\bigl(2\bm{\Omega}\times\mathbf{v}\bigr)_{\!\bot}
+\frac{1}{\phi^3\rho}\partial_{z}p=Q_{\omega}^{\phi}-\frac{1}{\phi^3}
\qquad
\end{equation}

\end{document}

答案2

對於初學者來說,不要用於align單一方程式。這是為了對齊

你的程式碼產生

在此輸入影像描述

(我新增了一個lipsum段落只是為了顯示頁面邊界)。

根據它的規則,TeX 能夠使方程式居中,所以它做到了,但是你可以透過添加大量水平空間(但可以縮小)來欺騙它認為方程式更寬。

需要一個初始間距命令才能使該技巧發揮作用。

\documentclass{article}
\usepackage{amsmath}

\usepackage{lipsum}

\begin{document}

\lipsum*[1][1-4]
\begin{equation}
\quad
  (\phi^{\alpha_{t}}\partial_{\tau}+\mathbf{v}_{\parallel}\cdot
    \phi^{\alpha_{x}}\nabla_{\xi}+\omega\partial_{z})\omega
  +\phi\left(2\mathbf{\Omega}\times\mathbf{v}\right)_{\bot}
  +\frac{1}{\phi^3\rho}\partial_{z}p=Q_{\omega}^{\phi}-\frac{1}{\phi^3}
\hspace{1000pt minus 1fil}
\end{equation}

\end{document}

我刪除了\left\right,除了添加不需要的空間之外,什麼也沒做。

在此輸入影像描述

如果您想要粗體\xi,請載入\usepackage{bm}並輸入\bm{\xi}

相關內容