以下示例总共生成两个图形,一个在正面,一个在背面。
%
\documentclass{book}
%
\usepackage{caption}
\DeclareCaptionStyle{widefigure}{font=footnotesize}
\RequirePackage[strict]{changepage}
%
\usepackage[showframe,paperwidth=170mm, paperheight=100mm, left=42pt, top=40pt, textwidth=280pt, marginparsep=20pt, marginparwidth=100pt, textheight=240pt, footskip=40pt]{geometry}
%
\usepackage{mwe}
%
\begin{document}
%
\begin{figure}
\begin{adjustwidth*}{}{-120pt}
\captionsetup{style=widefigure}
\includegraphics[height=80pt,width=400pt]{example-image-b}%
\caption{A larger rectangle in the main area of the text. A larger rectangle in the main area of the text. A larger rectangle in the main area of the text.}%
\end{adjustwidth*}
\end{figure}%
%
\clearpage
\begin{figure}
\begin{adjustwidth*}{}{-120pt}
\captionsetup{style=widefigure}
\includegraphics[height=80pt,width=400pt]{example-image-b}%
\caption{A larger rectangle in the main area of the text. A larger rectangle in the main area of the text. A larger rectangle in the main area of the text.}%
\end{adjustwidth*}
\end{figure}%
\end{document}
但是,生成的 PDF 无法正确扩展和/或对齐图形标题。添加width=400
、calcwidth=400
或带星号的版本均无济于事。我确信changepage
和caption
包在某些时候使用相同的 LaTeX 代码时效果很好。将我的 TeXLive 更新到最新版本(即冻结)后,TeXLive 2019 很可能会导致更改。我遗漏了什么(选项)?
答案1
根据要求,提供 minipage 解决方案。我也附上了\hsize
解决方案。
顺便说一句,需要两次运行才能完成的原因是 adjustpage 使用 AUX 文件来确定当前(偶数/奇数)页面布局。
\documentclass{book}
%
\usepackage{caption}
\DeclareCaptionStyle{widefigure}{font=footnotesize}
\usepackage{changepage}
%
\usepackage[showframe,paperwidth=170mm, paperheight=100mm, left=42pt, top=40pt, textwidth=280pt, marginparsep=20pt, marginparwidth=100pt, textheight=240pt, footskip=40pt]{geometry}
%
\usepackage{mwe}
%
\begin{document}
%
\begin{figure}
\begin{adjustwidth*}{}{-120pt}
\begin{minipage}{\linewidth}
\captionsetup{style=widefigure}
\includegraphics[height=80pt,width=400pt]{example-image-b}%
\caption{A larger rectangle in the main area of the text. A larger rectangle in the main area of the text. A larger rectangle in the main area of the text.}%
\end{minipage}
\end{adjustwidth*}
\end{figure}%
%
\clearpage
\begin{figure}
\begin{adjustwidth*}{}{-120pt}\hsize=\linewidth
\captionsetup{style=widefigure}
\includegraphics[height=80pt,width=400pt]{example-image-b}%
\caption{A larger rectangle in the main area of the text. A larger rectangle in the main area of the text. A larger rectangle in the main area of the text.}%
\end{adjustwidth*}
\end{figure}%
\end{document}