在大型文档(回忆录类)中,我希望在外边缘添加侧面标题,以节省由多个属于一起的子图组成的图形的空间。
在尝试使用 sidecap 和 subfig 之后(由于布局结果奇怪,无法真正协同工作),我了解到 floatrow 包是推荐用于执行此类操作的包。
现在我担心 floatrow 不能很好地与 memoir 协同工作 - 或者我误解了手册。我尝试将 subfloatrow 环境与旁边的标题示例(手册中的第 36 页)混合使用,但没有成功。我根本无法将主标题放入外边距,而且在偶数页码上,数字会粘在外边距中。
任何帮助或提示都将不胜感激!
这是我正在努力的最小工作示例(结果如下):
\documentclass[11pt,a4paper,book,oldfontscommands,twoside,openright,final]{memoir}
\usepackage{blindtext}
\usepackage{graphicx}
\usepackage{subcaption}
%\usepackage[wide]{sidecap}
\let\newfloat\undefined
\usepackage{floatrow}
\floatsetup[figure]{%
margins=hangoutside, % makes the second figure stick into the outer margin
capposition=beside,
capbesideposition={bottom,outside},
floatwidth=\textwidth
}
\floatsetup[subfigure]{style=plain}
\begin{document}
\blindtext
%\begin{SCfigure} % Using SCfigure environment results in strange subfigure numbering in the main caption
\begin{figure}[h]
\RawFloats % without \RawFloats, main caption disappears
\ffigbox[\textwidth]{%
\begin{subfloatrow}
\ffigbox{
\includegraphics[width=.5\textwidth, height=3cm, draft]{foo1.png}
}{\subcaption{Foo bar 1 \dots}}
\ffigbox{
\includegraphics[width=.5\textwidth, height=3cm, draft]{foo2.png}
}{\subcaption{Foo bar 2 \dots}}
\end{subfloatrow}
\begin{subfloatrow}
\ffigbox{
\includegraphics[width=.5\textwidth, height=3cm, draft]{foo3.png}
}{\subcaption{Foo bar 3 \dots}}
\ffigbox{
\includegraphics[width=.5\textwidth, height=3cm, draft]{foo4.png}
}{\subcaption{Foo bar 4 \dots}}
\end{subfloatrow}
}
\caption{Main caption foo bar \dots}
\end{figure}
%\end{SCfigure}
\blindtext[2]
\begin{figure}[h]
\RawFloats % without \RawFloats, main caption disappears
\ffigbox[\textwidth]{%
\begin{subfloatrow}
\ffigbox{
\includegraphics[width=.5\textwidth, height=3cm, draft]{foo1.png}
}{\subcaption{Foo bar 1 \dots}}
\ffigbox{
\includegraphics[width=.5\textwidth, height=3cm, draft]{foo2.png}
}{\subcaption{Foo bar 2 \dots}}
\end{subfloatrow}
\begin{subfloatrow}
\ffigbox{
\includegraphics[width=.5\textwidth, height=3cm, draft]{foo3.png}
}{\subcaption{Foo bar 3 \dots}}
\ffigbox{
\includegraphics[width=.5\textwidth, height=3cm, draft]{foo4.png}
}{\subcaption{Foo bar 4 \dots}}
\end{subfloatrow}
}
\caption{Main caption foo bar \dots}
\end{figure}
\blindtext
\end{document}
答案1
你在寻找类似这样的东西吗?
对于上图,我使用了包subfig
和回忆录sidecaption
:
documentclass[11pt,a4paper,twoside]{memoir}
\usepackage{blindtext}
\usepackage{graphicx}
\usepackage{subfig}
\sidecapmargin{outer}
\begin{document}
\blindtext
\begin{figure}[h]
\begin{sidecaption}{Main caption on outer side of figure}[fig:mayfig-1]\centering
\subfloat[sub figure A]{\includegraphics[width=0.48\hsize]{example-image-a}}
\hfill
\subfloat[sub figure B]{\includegraphics[width=0.48\hsize]{example-image-b}}
\end{sidecaption}
\end{figure}
\blindtext
\end{document}
我将您的代码缩短为 MWE ...