如何控制圖形標題中方程式(在其自己的行上)前後的垂直空間?

如何控制圖形標題中方程式(在其自己的行上)前後的垂直空間?

我想在圖形標題中插入一個方程式(在其自己的行上)。

標題中方程式前後的預設間距對我來說看起來太大了。如何調整圖中方程式前後的間距 變小?

我嘗試將方程式包裝在迷你頁中,但這完全消除了垂直間距,而且我不清楚當方程式包裝在迷你頁中時如何在方程式前後獨立添加相等的垂直間距。

這是我的設定的小範例:

\documentclass{article}

\usepackage{amsmath}
\usepackage{lipsum}

\usepackage[dvipsnames]{xcolor}
\usepackage{float}
\usepackage[font=small,labelfont=bf]{caption}
\DeclareCaptionLabelFormat{boxed}{%
  \kern0.05em{\color[rgb]{0.99,0.78,0.07}\rule{0.63em}{0.63em}}%
  \hspace*{0.62em}\bothIfFirst{#1}{~}#2}
\captionsetup{labelformat=boxed}
\captionsetup{singlelinecheck=off}

\usepackage{amsthm}

\begin{document}

\begin{figure}[t!]
\caption[]{
I write for a bit \dots \lipsum[1] and then have an equation
% I want to insert some command here to control the vertical space BEFORE the equation
% \begin{minipage}{\linewidth}
        \[\xi(\mathcal{P}) = (x_1y_1 + x_2y_2)(y_1z_1 + y_2z_2)\]
        % \end{minipage} 
% I want to insert some command here to control the vertical space AFTER the equation
on its own line. 
Is the equation spacing alright? 
}
\label{fig:some-label}
\end{figure}


\end{document}

相關內容