Latex 单个图形内有多张图片

Latex 单个图形内有多张图片

有几段虚拟文本。之后我想将图形强制置于文本下方。该图包含多张includegraphics图片,无法容纳在一页中,因此该图应在某个点处切成两半(当页面已满时,latex 应决定在哪里)。

目前我拥有的:

第 1 页

在此处输入图片描述

第2页

在此处输入图片描述

\documentclass[12pt,a4paper]{report}

\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{enumerate}
\usepackage[thmmarks,amsmath]{ntheorem}
\usepackage{graphicx}
\usepackage{epsfig}
\usepackage{listingsutf8}
\usepackage{color}
\usepackage{lastpage}
\usepackage{anysize}
\usepackage[magyar]{babel}
\selectlanguage{magyar}
\usepackage{sectsty}
\usepackage{setspace}
\usepackage[hang]{caption}
\usepackage{hyperref}
\usepackage{float}
\usepackage[euler]{textgreek}
\usepackage{booktabs}
\usepackage{lipsum}  


\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\marginsize{2.5cm}{2.5cm}{1.0cm}{1.0cm}

\hypersetup{
    bookmarks=true,        
    unicode=false,           
    pdftitle={...},       
    pdfauthor={...},   
    pdfsubject={...}, 
    pdfcreator={...},   
    pdfproducer={Producer},   
    pdfkeywords={keywords},  
    pdfnewwindow=true,     
    colorlinks=true,          
    linkcolor=black,          
    citecolor=black,
    filecolor=black,
    urlcolor=black
}


\begin{document}

\lipsum[2-4]

\begin{figure}[H]
  \centering
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}


  \caption{\normalfont {figure}}
  \label{fig:large-fig}
\end{figure}
    
\end{document}

我想要的是:

第 1 页

在此处输入图片描述

第2页

在此处输入图片描述

答案1

你不需要浮动,所以只需删除figure

在此处输入图片描述

\documentclass[12pt,a4paper]{report}

%%no \usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{enumerate}
\usepackage[thmmarks,amsmath]{ntheorem}
\usepackage{graphicx}
% no!! \usepackage{epsfig}
\usepackage{listingsutf8}
\usepackage{color}
\usepackage{lastpage}
\usepackage{anysize}
\usepackage[magyar]{babel}
\selectlanguage{magyar}
\usepackage{sectsty}
\usepackage{setspace}
\usepackage[hang]{caption}
\usepackage{hyperref}
\usepackage{float}
\usepackage[euler]{textgreek}
\usepackage{booktabs}
\usepackage{lipsum}  


\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\marginsize{2.5cm}{2.5cm}{1.0cm}{1.0cm}

\hypersetup{
    bookmarks=true,        
    unicode=false,           
    pdftitle={...},       
    pdfauthor={...},   
    pdfsubject={...}, 
    pdfcreator={...},   
    pdfproducer={Producer},   
    pdfkeywords={keywords},  
    pdfnewwindow=true,     
    colorlinks=true,          
    linkcolor=black,          
    citecolor=black,
    filecolor=black,
    urlcolor=black
}


\begin{document}

\lipsum[2-4]

\begin{center}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}


  \captionof{figure}{\normalfont {figure}}
  \label{fig:large-fig}
\end{center}
    
\end{document}

答案2

这会将每行放入单独的图形中。第一行使用 [b],其余使用 [bt!] 来绕过\@botnum\@topnum限制。这会强制浮动位于页面的顶部或底部,使它们连续。

我注释掉了所有不相关或未使用的包。

\documentclass[12pt,a4paper]{report}

%\usepackage[utf8x]{inputenc}
%\usepackage{amsmath}
%\usepackage{amssymb}
%\usepackage{enumerate}
%\usepackage[thmmarks,amsmath]{ntheorem}
\usepackage{graphicx}
%\usepackage{epsfig}
%\usepackage{listingsutf8}
%\usepackage{color}
%\usepackage{lastpage}
%\usepackage{anysize}
%\usepackage[magyar]{babel}% you want me to load ANOTHER language
%\selectlanguage{magyar}
%\usepackage{sectsty}
%\usepackage{setspace}
\usepackage[hang]{caption}
\usepackage{hyperref}
%\usepackage{float}
%\usepackage[euler]{textgreek}
%\usepackage{booktabs}
\usepackage{lipsum}  


\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
%\marginsize{2.5cm}{2.5cm}{1.0cm}{1.0cm}% I don't know what package this is from
\usepackage[left=2.5cm, right=2.5cm, top=1cm, bottom=1cm, noheadfoot]{geometry}

\hypersetup{
    bookmarks=true,        
    unicode=false,           
    pdftitle={...},       
    pdfauthor={...},   
    pdfsubject={...}, 
    pdfcreator={...},   
    pdfproducer={Producer},   
    pdfkeywords={keywords},  
    pdfnewwindow=true,     
    colorlinks=true,          
    linkcolor=black,          
    citecolor=black,
    filecolor=black,
    urlcolor=black
}

\begin{document}

\lipsum[2-4]

\begin{figure}[b]
  \centering
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
\end{figure}
\begin{figure}[bt!]
  \centering
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
\end{figure}
\begin{figure}[bt!]
  \centering
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
\end{figure}
\begin{figure}[bt!]
  \centering
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
\end{figure}
\begin{figure}[bt!]
  \centering
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
\end{figure}
\begin{figure}[bt!]
  \centering
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
\end{figure}
\begin{figure}[bt!]
  \centering
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
\end{figure}
\begin{figure}[bt!]
  \centering
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
\end{figure}
\begin{figure}[bt!]
  \centering
  \includegraphics[scale=0.4]{example-image}
  \includegraphics[scale=0.4]{example-image}
  \caption{\normalfont {figure}}
  \label{fig:large-fig}
\end{figure}

\newpage% prevent following text from printing on first page
\lipsum[4-5]
    
\end{document}

\@botlist前四个浮动元素会立即放入,并\pagegoal相应减少。其余元素会一直放入,\@deferlist直到 shipout( \newpage) 时才移至\@toplist新页面。

相关内容