我想在图片标题中插入一个方程式(独占一行)。
标题中等式前后的默认间距对我来说看起来太大了。如何调整图中公式前后的间距 变得更小?
我尝试将方程式包装在小页面中,但是这完全消除了垂直间距,并且当方程式包装在小页面中时,我不清楚如何在方程式前后独立添加相等的垂直间距。
以下是我的设置的小示例:
\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}