floatrow 和 capbesidewidth 用于侧边标题

floatrow 和 capbesidewidth 用于侧边标题

我在 floatrow 中使用 fcapside 时遇到了一些奇怪的问题,我无法让侧边标题根据我的图自动计算其宽度。相反,侧边标题宽度似乎会随着图像而扩大。我在序言中将 capbesidewidth 设置为其他值,因此我明确将其重新设置为 sidefil(或无)以用于图,但即使我从未在任何地方设置它,它也会这样做。我不明白为什么这与手册不同,手册中会自动计算标题宽度以占据剩余空间。

\documentclass[11pt,twoside]{report}

\usepackage{graphicx}
%\usepackage{caption}
\usepackage{floatrow}
\DeclareFloatVCode{largevskip} {\vskip 20pt}
%\floatsetup[figure]{a bunch of other settings here that I overwrite below}
\captionsetup[figure]{font=small}
\usepackage{subfig}

\begin{document}

\begin{figure}[htbp]
\floatsetup[subfigure]{style=plain,capbesideposition={inside,center},capbesidesep=quad,capbesidewidth=sidefil,rowpostcode=largevskip}
%\centering
\ffigbox[\textwidth]
    {\begin{subfloatrow}
        \fcapside[\FBwidth]
            {\setlength\fboxsep{4pt} \fbox
                {\includegraphics[width=0.5\textwidth]{example-image-a}}}
            {\caption{Hello I am a caption and my width seems to be approximately the same as that of the image next to me, which is 0.5 times the text width.}}
    \end{subfloatrow}
    \begin{subfloatrow}
        \fcapside[\FBwidth]
            {\setlength\fboxsep{4pt} \fbox
                {\includegraphics[width=0.65\textwidth]{example-image-a}}}
            {\caption{Hello I am a caption and my width also seems to be approximately the same as that of the image next to me, which is 0.65 times the text width.}}
    \end{subfloatrow}}
    {\caption{I am a centered caption for the full figure.}}
\end{figure}

\end{document}  

在此处输入图片描述

相关内容