控制 Floatrow 图形和表格后的空间(启用 belowskip)

控制 Floatrow 图形和表格后的空间(启用 belowskip)

使用该包时,如何控制标题下方的空间floatrow

梅威瑟:

\documentclass[12pt,a4paper]{article}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{floatrow}
\floatsetup[figure]{captionskip=6pt}

\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\setlength{\parskip}{6pt}
\renewcommand{\baselinestretch}{1.1}

\usepackage{caption}
\usepackage[font+=footnotesize]{subcaption}
\captionsetup[figure]{%
  justification=raggedright,
  font=footnotesize,
  labelfont=footnotesize,
  }

\usepackage{setspace}

\begin{document}\raggedright

  \begin{figure}[H]
    \ffigbox[\FBwidth]
    {\caption{(a) Mutually exclusive events and (b) events that are not mutually exclusive.}\label{fig:mutually_exclusive_events_venn}}
    {\begin{subfigure}[b]{0.35\textwidth}
      \raggedright
      \includegraphics[scale=1]{figurea}
      \caption{$A \cap B =0$}
      \label{fig:mutually_exclusive}
      \end{subfigure}
    \begin{subfigure}[b]{0.35\textwidth}
      \raggedleft
      \includegraphics[scale=1]{figureb}
      \caption{$A \cap B >0$}
      \label{fig:not_mutually_exclusive}
      \end{subfigure}}
    \end{figure}

  \lipsum[1]

  \lipsum[1]

\end{document}

在此处输入图片描述

答案1

发现以下内容:

如果添加:

\DeclareFloatVCode{beforefloat}{\vspace{4pt}}
\DeclareFloatVCode{afterfloat}{\vspace{-10pt}}

\floatsetup在前言之前然后precode=beforefloat,postcode=afterfloat添加\floatsetup,问题就解决了。例如

\floatsetup[figure]{precode=beforefloat,postcode=afterfloat}

相关内容