1

I'm new to Latex and I'm enjoying the switch but I have a problem with placing figure I can't resolve.

I am using tikzpicture to create graphs and each graph is in it's own file. So my code is:

\subsection{Disconnected and Connected Graph}
\paragraph{}
**some text**
\input{disconnected_graph.tex}

\subsection{Simple Graph}
**some text**

\input{simple_graph.tex}

This displays fine. Now if I want to add a figure I use this code:

\begin{figure}
\input{disconnected_graph.tex}
\caption{**some text**}
\end{figure}

The compile displays the following result: enter image description here

Could someone point out why this is not displaying as I expected?

  • 1
    Use figure[htb] or use \captionof from capt-of package, get rid of figure environment. –  Sep 24 '15 at 11:23
  • Thank you, your pointers guided me to my answer. The voted answer did not help me but it did lead me to this which did work. http://goo.gl/cXZIUM – chris loughnane Sep 24 '15 at 12:12

0 Answers0