# image wrong place

Latex shows the following code in this order:

Fig1

Conclusion

Fig2

\begin{figure}[h!]
\centering
\includegraphics[width=140mm]{fig1.png}
\caption{fig 1}
\label{fig:f1}
\end{figure}

\begin{figure}[h!]
\centering
\includegraphics[width=140mm]{fig2.png}
\caption{fig 2}
\label{fig:f2}
\end{figure}

\section{Conclusions}\label{conclusions}
conclusion goes here


Even changing h to H is not much better:

Conclusion

Fig1

Fig2

• You can try ht!. If you want to use H then you need \usepackage{float} – summer Mar 17 '15 at 3:20
• See the first answer in tex.stackexchange.com/questions/163644/… – R. Schumacher Mar 17 '15 at 3:20
• @R.Schumacher What is the conclusion? Even H does not work. – ar2015 Mar 17 '15 at 3:23
• Don't tell LaTeX to move the image if you don't want LaTeX to move the image. It is the essence of floats to float. – cfr Mar 17 '15 at 3:35
• using h prevents the float going at top or bottom of pages and prevents it going on a page with just floats so makes it almost impossible to place – David Carlisle Mar 17 '15 at 8:35

I finally found the answer. The problem is that the images could not be fit into one page. by resizing them, they became fine:

\includegraphics[width=140mm]{fig2.png}


to

\includegraphics[width=100mm]{fig2.png}


Try using the float package. I put a minimum example below. I have now used the H option along with specifying a height for the pictures which is too large for two pics and conclusion to fit on one page. The figures now come first and the conclusion follows.

\documentclass[10pt,letterpaper]{article}
\usepackage{float}
\usepackage[demo]{graphicx}
\begin{document}
\begin{figure}[H]
\centering
\includegraphics[height= 80mm,width=140mm]{fig1.png}
\caption{fig 1}
\label{fig:f1}
\end{figure}

\begin{figure}[H]
\centering
\includegraphics[height= 80mm,width=140mm]{fig2.png}
\caption{fig 2}
\label{fig:f2}
\end{figure}

\section{Conclusions}\label{conclusions}
conclusion goes here
\end{document}


Note: I used the demo option of the graphicx package as I did not have your images and I guessed a picture height.

• Then it put both images after conclusion. The problem is that size of images are big for one page. Any way to force latex starting conclusion only when both figs are shown before it? – ar2015 Mar 17 '15 at 3:57
• @ar2015 Edited the code to force the order. – R. Schumacher Mar 17 '15 at 16:52