数字超出边距,不遵守边距

数字超出边距,不遵守边距

图形超出了页边距,我怎样才能让它们遵守 A4 纸页边距,如果没有可用空间,则让它们移动到下一页?

梅威瑟:

\usepackage[main=english]{babel}
\usepackage[margin=3cm,left=3cm,top=2cm,bottom=4cm]{geometry}
\usepackage{subfig}
\usepackage{float}
\usepackage{graphicx}
\graphicspath{{"/Volumes/X/Dados/teste Latex/meas 2020/"}{"/Volumes/X/Dados/teste Latex/meas 2019/"}}
\begin{document}
\section{Individual graphs}
\begin{figure}[H]
\subfloat[PRT03]{\includegraphics[width=0.3\textwidth]{"22 NFA511 191219 PRT02 meas"}}\\
\hspace{0.5cm}
\subfloat[PRT04]{\includegraphics[width=0.3\textwidth]{"22 NFA511 191219 PRT02 meas"}}\\
\hspace{0.5cm}
\subfloat[PRT04]{\includegraphics[width=0.3\textwidth]{"22 NFA511 191219 PRT02 meas"}}\\
\hspace{0.5cm}
\subfloat[PRT04]{\includegraphics[width=0.3\textwidth]{"22 NFA511 191219 PRT02 meas"}}\\
\hspace{0.5cm}
\subfloat[PRT04]{\includegraphics[width=0.3\textwidth]{"22 NFA511 191219 PRT02 meas"}}\\
\subfloat[PRT04]{\includegraphics[width=0.3\textwidth]{"22 NFA511 191219 PRT02 meas"}}\\
\subfloat[PRT04]{\includegraphics[width=0.3\textwidth]{"22 NFA511 191219 PRT02 meas"}}\\
\subfloat[PRT04]{\includegraphics[width=0.3\textwidth]{"22 NFA511 191219 PRT02 meas"}}\\
\subfloat[PRT04]{\includegraphics[width=0.3\textwidth]{"22 NFA511 191219 PRT02 meas"}}\\
\subfloat[PRT05]{\includegraphics[width=0.3\textwidth]{Tiger-80}}
\hspace{0.5cm}
\end{figure}
\end{document}



答案1

两个浮点数序列中 20 张图片的集合示例figure。其中使用

  • \ContinuedFloat为保持机器人浮点数相同
  • \renewcommand{\textfraction}{0.08}用于允许浮动占据页面上 92% 的文本区域
  • 图像被重新排列成每行三幅图像的组
  • 使用Gin键(\setkeys{Gin}{width=0.3\linewidth})在一个浮点数中设置图像宽度(启用更短的代码)
  • 答案基于这个答案
\documentclass{article}
\usepackage[hmargin=3cm, top=2cm,bottom=4cm]{geometry}
\usepackage{subfig}
\usepackage{float}
\usepackage{graphicx}
\usepackage{caption}
\renewcommand{\textfraction}{0.08}  % <--- fraction of the text on page with figures
                                    % (default is 0.3, i.e. 30% text area should be text)

%\graphicspath{{"/Volumes/X/Dados/teste Latex/meas 2020/"}{"/Volumes/X/Dados/teste Latex/meas 2019/"}}
\begin{document}
\section{Individual graphs}
\begin{figure}[H]
\setkeys{Gin}{width=0.3\linewidth}
\centering
\subfloat[PRT03]{\includegraphics{example-image-duck}}
\hfil
\subfloat[PRT04]{\includegraphics{example-image-duck}}
\hfil
\subfloat[PRT04]{\includegraphics{example-image-duck}}

\subfloat[PRT04]{\includegraphics{example-image-duck}}
\hfil
\subfloat[PRT04]{\includegraphics{example-image-duck}}
\hfil
\subfloat[PRT04]{\includegraphics{example-image-duck}}

\subfloat[PRT04]{\includegraphics{example-image-duck}}
\hfil
\subfloat[PRT04]{\includegraphics{example-image-duck}}
\hfil
\subfloat[PRT04]{\includegraphics{example-image-duck}}

\subfloat[PRT04]{\includegraphics{example-image-duck}}
\hfil
\subfloat[PRT04]{\includegraphics{example-image-duck}}
\hfil
\subfloat[PRT04]{\includegraphics{example-image-duck}}

\subfloat[PRT04]{\includegraphics{example-image-duck}}
\hfil
\subfloat[PRT04]{\includegraphics{example-image-duck}}
\hfil
\subfloat[PRT04]{\includegraphics{example-image-duck}}
    \caption[Collected Graphs]{Collected Graphs (cont. on the next page)}
    \label{fig:graphs}
\end{figure}%
\begin{figure}[H]\ContinuedFloat
\setkeys{Gin}{width=0.3\linewidth}
\centering
\subfloat[PRT04]{\includegraphics{example-image-duck}}
\hfil
\subfloat[PRT04]{\includegraphics{example-image-duck}}
\hfil
\subfloat[PRT04]{\includegraphics{example-image-duck}}

\subfloat[PRT04]{\includegraphics{example-image-duck}}
\hfil
\subfloat[PRT05]{\includegraphics{example-image-duck}}
    \caption[]{Collected Graphs (cont.)}
\end{figure}
\end{document}

在此处输入图片描述

相关内容