与 floatrow 斗争(并排图片/标题)

与 floatrow 斗争(并排图片/标题)

两个问题:

顶部的 50% 数字略微太宽。如何正确指示标题变小?

2/3 图形应该是 2/3 图像和 1/3(略小)标题。在我的示例中,标题的大小差不多,但我不知道如何拉伸图像。我该如何拉伸图像?

这是我的 TeX 输入:

\documentclass{article}
\usepackage{graphicx,floatrow}
\usepackage[showframe]{geometry}
\begin{document}
\parindent 0pt

Image plus caption should be full width, but no more.

\begin{figure}
  \floatbox[{\capbeside\thisfloatsetup{capbesideposition={right,top},capbesidewidth=.5\linewidth}}]{figure}[\FBwidth]
  {\caption{50 percent - looks almost good. A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart.}\label{animage}}
  {\includegraphics[width=\linewidth]{example-image-4x3.pdf}}
\end{figure}



\begin{figure}
  \floatbox[{\capbeside\thisfloatsetup{capbesideposition={right,top},capbesidewidth=.3\linewidth}}]{figure}
  {\caption{33 percent caption? The image should be about 66\% A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart.}\label{animage}}
  {\includegraphics[width=\linewidth]{example-image-4x3.pdf}}
\end{figure}


\end{document}

结果如下:

在此处输入图片描述

答案1

floatwidth=sidefil不需要[\FBwidth]

\documentclass{article}
\usepackage{graphicx,floatrow}
\usepackage[showframe]{geometry}
\begin{document}
\parindent 0pt

Image plus caption should be full width, but no more.

\begin{figure}[!h] %only to get both on one page
  \floatbox[{\capbeside\thisfloatsetup{floatwidth=sidefil,capbesideposition={right,top},capbesidewidth=.5\linewidth}}]{figure}
  {\caption{50 percent - looks almost good. A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart.}\label{animage}}
  {\includegraphics[width=\linewidth]{example-image-4x3.pdf}}
\end{figure}



\begin{figure}[!h]
  \floatbox[{\capbeside\thisfloatsetup{floatwidth=sidefil,capbesideposition={right,top},capbesidewidth=.3\linewidth}}]{figure}
  {\caption{33 percent caption? The image should be about 66\% A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart.}\label{animage}}
  {\includegraphics[width=\linewidth]{example-image-4x3.pdf}}
\end{figure}


\end{document}

在此处输入图片描述

相关内容