我有一页图片太多,所以我更改了边距设置
\newgeometry{left=3.5cm,right=3.5cm,bottom=0.1cm, top=0.1cm}
% insert image here
\resetgeometry
问题是,当我这样做时,文本会被拆分到不同的页面。就像下面的示例(模糊)中一样,页面上剩余大量空白。Latex 会自动在那里放置更多文本来填充它,但由于我使用了几何函数,它不再起作用。我该如何解决这个问题?
基本上,如何使用边距设置在 1 页内显示一张大图像,并且仍能让乳胶正常运行?
\begin{figure}
\captionsetup[subfigure]{labelformat=empty}
\setlength\tabcolsep{0pt}
\begin{tabularx}{\linewidth}{*{20}{>{\centering\arraybackslash\footnotesize $}X<{$}}}
x_1 & x_2 & x_3 & x_4 & x_5 & x_6 & x_7 & x_8 & x_9 & x_{10} & x_{11} & x_{12} & x_{13} & x_{14} & x_{15} & x_{16} & x_{17} & x_{18} & x_{19} & x_{20} \\ \\[-7ex]
\multicolumn{20}{c}{\subfloat[Ground Truth]{{\includegraphics[width=\textwidth]{results/ms.png}}}} \\
\hat{x_2} & \hat{x_3} & \hat{x_4} & \hat{x_5} & \hat{x_6} & \hat{x_7} & \hat{x_8} & \hat{x_9} & \hat{x_{10}} & \hat{x_{11}} & \hat{x_{12}} & \hat{x_{13}} & \hat{x_{14}} & \hat{x_{15}} & \hat{x_{16}} & \hat{x_{17}} & \hat{x_{18}} & \hat{x_{19}} & \hat{x_{20}} & \hat{x_{21}} \\ \\[-7ex]
\multicolumn{20}{c}{\subfloat[Recurrent Neural Network]{{\includegraphics[width=\textwidth]{results/ms-rnn.png}}}} \\
\hat{x_2} & \hat{x_3} & \hat{x_4} & \hat{x_5} & \hat{x_6} & \hat{x_7} & \hat{x_8} & \hat{x_9} & \hat{x_{10}} & \hat{x_{11}} & \hat{x_{12}} & \hat{x_{13}} & \hat{x_{14}} & \hat{x_{15}} & \hat{x_{16}} & \hat{x_{17}} & \hat{x_{18}} & \hat{x_{19}} & \hat{x_{20}} & \hat{x_{21}} \\ \\[-7ex]
\multicolumn{20}{c}{\subfloat[Variational Recurrent Neural Network]{{\includegraphics[width=\textwidth]{results/ms-vrnn.png}}}} \\ \\[-7ex]
\noindent\rule{15cm}{0.4pt} \\
x_1 & x_2 & x_3 & x_4 & x_5 & x_6 & x_7 & x_8 & x_9 & x_{10} & x_{11} & x_{12} & x_{13} & x_{14} & x_{15} & x_{16} & x_{17} & x_{18} & x_{19} & x_{20} \\ \\[-7ex]
\multicolumn{20}{c}{\subfloat[Ground Truth]{{\includegraphics[width=\textwidth]{results/mm.png}}}} \\
\hat{x_2} & \hat{x_3} & \hat{x_4} & \hat{x_5} & \hat{x_6} & \hat{x_7} & \hat{x_8} & \hat{x_9} & \hat{x_{10}} & \hat{x_{11}} & \hat{x_{12}} & \hat{x_{13}} & \hat{x_{14}} & \hat{x_{15}} & \hat{x_{16}} & \hat{x_{17}} & \hat{x_{18}} & \hat{x_{19}} & \hat{x_{20}} & \hat{x_{21}} \\ \\[-7ex]
\multicolumn{20}{c}{\subfloat[Recurrent Neural Network]{{\includegraphics[width=\textwidth]{results/mm-rnn.png}}}} \\
\hat{x_2} & \hat{x_3} & \hat{x_4} & \hat{x_5} & \hat{x_6} & \hat{x_7} & \hat{x_8} & \hat{x_9} & \hat{x_{10}} & \hat{x_{11}} & \hat{x_{12}} & \hat{x_{13}} & \hat{x_{14}} & \hat{x_{15}} & \hat{x_{16}} & \hat{x_{17}} & \hat{x_{18}} & \hat{x_{19}} & \hat{x_{20}} & \hat{x_{21}} \\ \\[-7ex]
\multicolumn{20}{c}{\subfloat[Variational Recurrent Neural Network]{{\includegraphics[width=\textwidth]{results/mm-vrnn.png}}}} \\ \\[-7ex]
\noindent\rule{15cm}{0.4pt} \\
\end{tabularx}
\caption{}
\label{fig:ood-ms}
\end{figure}
答案1
这是使用 的简单方法的示例\smash
。我使用\vbox to \textheight
来告诉 LaTeX,此图形将占据一整页,因此它不会在此浮动页面上放置任何其他图形。在这种方法中,您很可能必须调整一些长度以使其适合您的需求。
\documentclass[]{article}
\usepackage{blindtext,graphicx}
\usepackage{geometry}
\usepackage{floatpag}
\begin{document}
%your approach:
\blindtext
\newgeometry{left=3.5cm,right=3.5cm,bottom=0.1cm, top=0.1cm}
\begin{figure}
\includegraphics[width=\textwidth,height=\textheight]{example-image}
\end{figure}
\restoregeometry
\blindtext
\clearpage
%different approach:
\blindtext
\begin{figure}[p]
\thisfloatpagestyle{empty}%
\centering
\vbox to \textheight{%
\vspace*{1.12\textheight}%
\smash{\makebox[\textwidth]{%
\includegraphics[width=1.1\textwidth,height=0.85\paperheight]{example-image}
}}%
\caption{foo bar}
}%
\end{figure}
\blindtext
\end{document}