# problem in figures with caption

when I insert simple figure every thing is O.k but, when I insert figure float I had this problem the figure appear in the top of the document

• Welcome to TeX SX! Did you use the code \begin{figure}[!h] (here, if possible)? Mar 4 '16 at 17:58
• how? please tell me Mar 4 '16 at 18:39
• i've added the tag [lyx] as mentioned in a comment to the proposed answer. this information should have been provided at the beginning, as it is necessary to be able to provide an appropriate answer. Mar 4 '16 at 18:59
• Crosspost Apr 4 '16 at 7:41

## 2 Answers

Go to the float settings by right clicking on the box that says "float: Figure" and selecting "settings", as shown here:

Then unclick "Use default placement" and select the option that you want.

Also note that floats are expected to float. It is an advantage. consider reading the LyX manuals in the Help menu to learn more.

You will have to force the figure environment to appear exactly where you want it. For this, the float package will be helpful, along with the option [H] for \begin{figure}:

\begin{figure}[H]
\includegraphics{figure.pdf}
\end{figure}

• I'm sorry but I'm new user of lyx,how to have the flat package? Mar 4 '16 at 18:09
• I have not tried lyx. The comment made here by Makhoma might help. On MiKTeX, which I use, there is a package manager where we can install the packages needed. You might also need to check out CTAN to get directly download the library you want and then place it in the right folder for LyX to access. Mar 4 '16 at 18:14