![图像位置问题](https://linux22.com/image/295000/%E5%9B%BE%E5%83%8F%E4%BD%8D%E7%BD%AE%E9%97%AE%E9%A2%98.png)
我在图像定位方面遇到了问题。我不知道为什么,但 latex 会将最后一个图像放在新页面上。我希望它们都在同一页上。但我找不到问题所在。
这是我的代码:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[czech]{babel}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{epsfig}
\usepackage{subfig}
\usepackage[lighttt]{lmodern}
\usepackage[left=2.5cm,right=2.5cm,top=2cm,bottom=2cm]{geometry}
\usepackage{fancyhdr}
\newcounter{priklad}
\newenvironment{priklad}
{\refstepcounter{priklad}
\medskip
\textbf{Příklad \thepriklad .\ }}
\lhead{TEXT}
\pagestyle{fancy}
\begin{document}
\begin{priklad}
text-n-1
\end{priklad}
\begin{figure}[hbtp]
\subfloat[]{\includegraphics[height=3cm]{11.eps}}
\hspace{10pt}
\subfloat[]{\includegraphics[height=3cm]{16.eps}}
\hspace{10pt}
\subfloat[]{\includegraphics[height=3cm]{23.eps}}
\hspace{10pt}
\subfloat[]{\includegraphics[height=3cm]{14.eps}}
\hspace{10pt}
\subfloat[]{\includegraphics[height=3cm]{15.eps}}
\hspace{10pt}
\subfloat[]{\includegraphics[height=3cm]{12.eps}}
\end{figure}
\begin{priklad}
text-n-2
\end{priklad}
\begin{figure}[hbtp]
\includegraphics[height=1.8cm]{E.eps}
\hspace{20pt}
\subfloat[]{\includegraphics[height=1.5cm]{Eb.eps}}
\hspace{8pt}
\subfloat[]{\includegraphics[height=1.5cm]{Eano.eps}}
\hspace{8pt}
\subfloat[]{\includegraphics[height=1.5cm]{Ec.eps}}
\hspace{8pt}
\subfloat[]{\includegraphics[height=1.5cm]{Ed.eps}}
\hspace{8pt}
\subfloat[]{\includegraphics[height=1.5cm]{Ee.eps}}
\end{figure}
\begin{priklad}
text-n-3
\end{priklad}
\begin{figure}[hbtp]
\includegraphics[height=2.7cm]{7.eps}
\hspace{8pt}
\subfloat[]{\includegraphics[height=2.5cm]{7b.eps}}
\hspace{0pt}
\subfloat[]{\includegraphics[height=2.5cm]{7d.eps}}
\hspace{2pt}
\subfloat[]{\includegraphics[height=2.5cm]{7ano.eps}}
\hspace{4pt}
\subfloat[]{\includegraphics[height=2.5cm]{7c.eps}}
\end{figure}
\begin{priklad}
text-n-4
\end{priklad}
\begin{figure}[hbtp]
\includegraphics[height=4.2cm]{2u.eps}
\subfloat[]{\includegraphics[height=1.9cm]{2a.eps}}
\hspace{3pt}
\subfloat[]{\includegraphics[height=1.9cm]{2b.eps}}
\hspace{3pt}
\subfloat[]{\includegraphics[height=1.9cm]{2c.eps}}
\hspace{3pt}
\subfloat[]{\includegraphics[height=1.9cm]{2d.eps}}
\hspace{3pt}
\subfloat[]{\includegraphics[height=1.9cm]{2e.eps}}
\end{figure}
\end{document}
有人知道是什么原因导致了我的问题吗?
答案1
文章类别有
\setcounter{totalnumber}{3}
因此默认情况下每个文本页面只允许三个浮点数,但您可以重置它,但是更容易的是,您可以[!htbp]
在那里使用!
表示要忽略数字约束的位置。