如何在 floatrow 环境中单独设置图形 - 标题间距?

如何在 floatrow 环境中单独设置图形 - 标题间距?

在序言中我使用:

\usepackage[labelformat=empty]{caption}
\usepackage[heightadjust=all,floatrowsep=none,captionskip=3pt]{floatrow}

使用此包,我可以将两个图形水平和垂直对齐,并单独引用它们。它还将标题放在图形底部下方所需的距离(3pt)。但是,这适用于文档中的所有此类设置。

不幸的是,事情变得混乱,图形和标题之间的垂直间距似乎随机变化。

对于某些带有错误标题间距的图形,我该如何单独修复它?

例子 :

\documentclass[pdftex,12pt,a4paper,english,dutch,leqno]{article}
\usepackage[top=1cm,right=1cm,bottom=1cm,left=1.5cm,noheadfoot]{geometry}
\usepackage{babel}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.markings,patterns,calc}

\usepackage[labelformat=empty]{caption}
\usepackage[heightadjust=all,floatrowsep=none,captionskip=3pt]{floatrow}

\begin{document}

\begin{figure}[h!]
\begin{floatrow}
\ffigbox[\FBwidth]
{\begin{tikzpicture}[>=stealth']
\draw[line width=1mm] (0,0) circle (3);
\end{tikzpicture}}
{\caption{\footnotesize\bf Figure 1.}\label{fig:1}}
\hspace{1cm}
\ffigbox[\FBwidth]
{\begin{tikzpicture}[>=stealth']
\draw[line width=1mm,rotate=45] (0,0) rectangle (2,2);
\end{tikzpicture}}
{\caption{\footnotesize\bf Figure 2.}\label{fig:2}}
\end{floatrow}
\end{figure}

\end{document}

包装floatrow手册对我来说大部分都是胡言乱语,并且缺少示例。

答案1

虽然问题中包含示例代码,但没有提及所需的字幕位置。以下示例代码包含原始布局和使用获得的布局\CenterFloatBoxes

\documentclass[pdftex,12pt,a4paper,english,dutch,leqno]{article}
\usepackage[top=1cm,right=1cm,bottom=1cm,left=1.5cm,noheadfoot]{geometry}
\usepackage{babel}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.markings,patterns,calc}

\usepackage[labelformat=empty]{caption}
\usepackage[heightadjust=all,floatrowsep=none,captionskip=3pt]{floatrow}

\begin{document}

\begin{figure}[h!]
\begin{floatrow}
\ffigbox[\FBwidth]
{\begin{tikzpicture}[>=stealth']
\draw[line width=1mm] (0,0) circle (3);
\end{tikzpicture}}
{\caption{\footnotesize\bf Figure 1.}\label{fig:1}}%
\hspace{1cm}%
\ffigbox[\FBwidth]
{\begin{tikzpicture}[>=stealth']
\draw[line width=1mm,rotate=45] (0,0) rectangle (2,2);
\end{tikzpicture}}
{\caption{\footnotesize\bf Figure 2.}\label{fig:2}}
\end{floatrow}
\end{figure}

\begin{figure}[h!]
\begin{floatrow}
\CenterFloatBoxes
\ffigbox[\FBwidth]
{\begin{tikzpicture}[>=stealth']
\draw[line width=1mm] (0,0) circle (3);
\end{tikzpicture}}
{\caption{\footnotesize\bf Figure 1.}\label{fig:1}}%
\hspace{1cm}%
\ffigbox[\FBwidth]
{\begin{tikzpicture}[>=stealth']
\draw[line width=1mm,rotate=45] (0,0) rectangle (2,2);
\end{tikzpicture}}
{\caption{\footnotesize\bf Figure 2.}\label{fig:2}}
\end{floatrow}
\end{figure}

\end{document}

在此处输入图片描述

顺便说一句,不清楚为什么要手动更改\caption命令内的标题布局(这不是一个好主意)而不是使用\captionsetup

相关内容