減少圖形與圖形註解之間的垂直間距

減少圖形與圖形註解之間的垂直間距

我使用該caption包將圖標題放在上面,將註釋放在圖下面。我跟隨這個建議定義一個新命令,該caption*命令調用具有適當設定的命令。然而,圖和註釋(另一個標題)之間的空間太大。我怎麼才能讓它變小?此skip設定僅更改空間筆記。我試圖abovecaptionskip直接指定,但這是「家庭『標題』中未定義的」。

以下是我使用的相關程式碼區塊,下面是生成的螢幕截圖,其中我突出顯示了我想要減少的空間。

# preamble
\usepackage[bf, justification=centering]{caption}
\newcommand\fnote[1]{\captionsetup{font=small,justification=justified}\caption*{#1}}

# figure
\begin{figure}[htb]
  \caption{Comparison of the retirement effect estimate by gender}
  \begin{center}
    \includegraphics[width=\textwidth]{figure}
  \end{center}
  \fnote{{\it Notes:} The dots ...}
\end{figure}

在此輸入影像描述

答案1

不要使用center環境,不要\caption*用於圖形下方的圖例,並提供\captionsetup{skip=0.333\baselineskip}減少標題和圖形之間距離的說明。

在此輸入影像描述

\documentclass{article}
\usepackage[demo]{graphicx} % omit 'demo' option in real document
\usepackage[justification=centering,
            labelfont=bf,
            skip=0.333\baselineskip]{caption}

\begin{document}
\begin{figure}[htb]
\caption{Comparison of the retirement effect estimate by gender}
\includegraphics[width=\textwidth]{figfile}

\smallskip\small
\textit{Notes}: The dots represent $\hat{\beta}$, the lines \dots
\end{figure}
\end{document}

相關內容