如何防止 floatrow 移动标题?

如何防止 floatrow 移动标题?

这个问题建议的解决方案(重复)实际上不起作用。

\documentclass[aps,prc,reprint,superscriptaddress,floatfix,showpacs]{revtex4-1}
\usepackage[utf8x]{inputenc}
\usepackage{showframe}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{hyperref}
\usepackage{color,soul}
\usepackage{url}
%\usepackage[demo]{graphicx}
\usepackage{subfig}
\usepackage{floatrow}
%\usepackage{subcaption}
\usepackage{textcomp}
\usepackage{array}
\usepackage{dcolumn}
\usepackage[pdftex, demo]{graphicx}
%\usepackage{biblatex}
\usepackage{xcolor}
\hypersetup{
    colorlinks,
    linkcolor={red!80!black},
    citecolor={blue!80!black},
    urlcolor={blue!80!black}
}

\begin{document}

\begin{figure*}[]
    \centering
    %\begin{subfigure}{\columnwidth}
        %\centering
        \subfloat[]{\includegraphics[width=0.4555\textwidth]{CS_2n.png}
        %\caption{}
        \label{fig:CS_2n}
        }\hfil
    %\end{subfigure}
    %\begin{subfigure}{\columnwidth}
        %\centering
        \subfloat[]{\includegraphics[width=0.4555\textwidth]{CS_2n_m2.png}
        %\caption{}
        \label{fig:CS_2n_m2}
        }\\
    %\end{subfigure}
    %\begin{subfigure}{\columnwidth}
        %\centering
        \subfloat[]{\includegraphics[width=0.4555\textwidth]{CS_3n.png}
        %\caption{}
        \label{fig:CS_3n}
        }\hfil
    %\end{subfigure}
    %\begin{subfigure}{\columnwidth}
        %\centering
        \subfloat[]{\includegraphics[width=0.4555\textwidth]{CS_p.png}
        %\caption{}
        \label{fig:CS_p}
        }\\
    %\end{subfigure}
    %\begin{subfigure}{\columnwidth}
        %\centering
        \subfloat[]{\includegraphics[width=0.4555\textwidth]{CS_alpha.png}
        %\caption{}
        \label{fig:CS_alpha}
        }\hfil
    %\end{subfigure}
    %\begin{subfigure}{\columnwidth}
        %\centering
        \subfloat[]{\includegraphics[width=0.4555\textwidth]{CS_el.png}
        %\caption{}
        \label{fig:CS_el}
        }\\
    %\end{subfigure}
    %\begin{subfigure}{\columnwidth}
        %\centering
        \subfloat[]{\includegraphics[width=0.4555\textwidth]{CS_tot.png}
        %\caption{}
        \label{fig:CS_tot}
        }\hfil
    %\end{subfigure}
    \begin{minipage}[b]{0.4555\textwidth}
      \caption{Blah blah blah}
    \end{minipage}
\end{figure*}

\end{document}

使用\fbox一个甚至可以显示生成的小页面是完全空的。

答案1

问题在于 floatrow 会进行修改\@makecaption,将标题转换为全局宏或保存框,然后将其放置在其他位置。

\documentclass[aps,prc,reprint,superscriptaddress,floatfix,showpacs]{revtex4-1}
\usepackage[utf8x]{inputenc}
\usepackage{showframe}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{hyperref}
\usepackage{color,soul}
\usepackage{url}
%\usepackage[demo]{graphicx}
\usepackage{subfig}
\makeatletter
\let\old@makecaption=\@makecaption% still gets intercepted
\makeatother
\usepackage{floatrow}
%\usepackage{subcaption}
\usepackage{textcomp}
\usepackage{array}
\usepackage{dcolumn}
\usepackage[pdftex, demo]{graphicx}
%\usepackage{biblatex}
\usepackage{xcolor}
\hypersetup{
    colorlinks,
    linkcolor={red!80!black},
    citecolor={blue!80!black},
    urlcolor={blue!80!black}
}

\begin{document}

\begin{figure*}[]
    \centering
    %\begin{subfigure}{\columnwidth}
        %\centering
        \subfloat[]{\includegraphics[width=0.4555\textwidth]{CS_2n.png}
        %\caption{}
        \label{fig:CS_2n}
        }\hfil
    %\end{subfigure}
    %\begin{subfigure}{\columnwidth}
        %\centering
        \subfloat[]{\includegraphics[width=0.4555\textwidth]{CS_2n_m2.png}
        %\caption{}
        \label{fig:CS_2n_m2}
        }\\
    %\end{subfigure}
    %\begin{subfigure}{\columnwidth}
        %\centering
        \subfloat[]{\includegraphics[width=0.4555\textwidth]{CS_3n.png}
        %\caption{}
        \label{fig:CS_3n}
        }\hfil
    %\end{subfigure}
    %\begin{subfigure}{\columnwidth}
        %\centering
        \subfloat[]{\includegraphics[width=0.4555\textwidth]{CS_p.png}
        %\caption{}
        \label{fig:CS_p}
        }\\
    %\end{subfigure}
    %\begin{subfigure}{\columnwidth}
        %\centering
        \subfloat[]{\includegraphics[width=0.4555\textwidth]{CS_alpha.png}
        %\caption{}
        \label{fig:CS_alpha}
        }\hfil
    %\end{subfigure}
    %\begin{subfigure}{\columnwidth}
        %\centering
        \subfloat[]{\includegraphics[width=0.4555\textwidth]{CS_el.png}
        %\caption{}
        \label{fig:CS_el}
        }\\
    %\end{subfigure}
    %\begin{subfigure}{\columnwidth}
        %\centering
        \subfloat[]{\includegraphics[width=0.4555\textwidth]{CS_tot.png}
        %\caption{}
        \label{fig:CS_tot}
        }\hfil
    %\end{subfigure}
    \begin{minipage}[b]{0.4555\textwidth}
      \makeatletter
      \let\@makecaption=\old@makecaption
      \makeatother
      \caption{Blah blah blah}
    \end{minipage}
\end{figure*}

\end{document}

相关内容