I have the following latex file for the figures. The figures are read successfully but it does not align itself in the desired space between horizontal text lines, instead it jumps to the next page. For instance:
[first some sentences...........................................................................................................] [I want my figures to be in this line....................................................................................................]
[Next some sentences.............................].
Please find my latex file below: Let us consider the following graphs:
\begin{figure}{}
\centering
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[height=5.8em]{C:/Users/abc/Documents/formula1}
\caption{Fig: $G_1~~~~~~~~~$}
\label{fig:sub1}
\end{subfigure}%
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[height=5.8em]{C:/Users/abc/Documents/formula2}
\caption{Fig: $G_2~~~~~~~$}
\label{fig:sub2}
\end{subfigure}
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[height=7.8em]{C:/Users/abc/Documents/formula3}
\caption{$G_1\triangledown G_2$}
\label{fig:sub2}
\end{subfigure}
\label{fig:test}
\end{figure}
In the graph $G_1$, the pair of non adjacent vertices whose end vertices are not $G_2$ are (5, 4) and (5, 6).
Note. I want my figures to be aligned in the space between 'first some sentences' and 'next some sentences' as mentioned above, but here it jumps to the next page
example-imageas the image as it is available for this sort of test) – David Carlisle May 19 '19 at 10:47\begin{figure}is to specify the content is not part of the main document flow and is a float that may be moved to help with page breaking. So if you just mean that the figure moved that is by design and expected. – David Carlisle May 19 '19 at 10:49See Figure \ref{fig:test}rather than refiring to "above" or "below" then the sentence makes sense wherever the figure is inserted. – David Carlisle May 19 '19 at 10:53figurethere is to allow the figure to move, so there is not really any issue to solve, it is working as expected. – David Carlisle May 19 '19 at 11:58[H]in very rare circumstances. (I implemented[H]but it is mis-used so often that I often regret it). – David Carlisle May 19 '19 at 13:42