出現這個錯誤的原因在於連續放置了18個以上的圖和表,而中間沒有任何文字。
網上有這些解決方案:
1.使用宏包 \usepackage[section]{placeins}
2.在每一頁開始使用 \clearpage
但筆者使用上述方法之後,雖然不報錯了,但是圖片的排版還是有點亂。
其實,出現這個錯誤的原因在於連續放置了過多的浮動圖形。
筆者去查看了LaTex相關書籍(http://www.ctex.org/documents/latex/graphics/node2.html),根據書中20.不浮動圖形,去掉了figure環境(即添加圖片爲非浮動圖形),問題也就解決了。
筆者使用的代碼:
\centerline{\includegraphics[width=12cm]{fig1}}
\caption{fig1}\label{fig1}
%\vspace{5mm}
\centerline{\includegraphics[width=12cm]{fig2}}
\caption{fig2}\label{fig2}
%\vspace{5mm}
\centerline{\includegraphics[width=12cm]{fig3}}
\caption{fig3}\label{fig3}
.
.
.
%\vspace{5mm}
\centerline{\includegraphics[width=12cm]{fig20}}
\caption{fig20}\label{fig20}
其中vspace{5mm}可以調整圖片間距。