Graphics, Figures & TablesFigure and text alignment

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
kaye
Posts: 1
Joined: Sat Oct 09, 2010 5:04 am

Figure and text alignment

Post by kaye »

Hi I'm a little new here so go easy :)

I've got two figure environments, and within them a table of figures. between the two figure environments I have text, but the text shows up with the text BEFORE the 1st figure. Why? How can I fix this, here is a snippet of code:

SOME TEXT HERE1

\begin{figure}[htb]
\centering
\begin{tabular}{ll}
\includegraphics[height=9cm]{1graph.pdf} & \includegraphics[height=9cm]{1Zoom.pdf} \\
\includegraphics[height=9cm]{1answer.pdf}
\end{tabular}
\end{figure}

SOME TEXT HERE2

\begin{figure}[htb]
\centering
\begin{tabular}{ll}
\includegraphics[height=9cm]{2graph.pdf} & \includegraphics[height=9cm]{2Zoom.pdf} \\
\includegraphics[height=9cm]{2answer.pdf}
\end{tabular}
\end{figure}

So my problem is that SOME TEXT HERE2 gets put right after SOME TEXT HERE, before the figures. How can I resolve this? Actually is using tabular to get figures to display side by side the proper way to go about this?

Many thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

smittyg1
Posts: 4
Joined: Tue Sep 21, 2010 8:23 am

Re: Figure and text alignment

Post by smittyg1 »

In the \begin{figure} environment, where you have placed [htb] try any of these combinations [H], [h!] or just [!]. The H command means absolutely here and the ! command is an overide, h in the placement tab is just a suggestion and looks for the next best place to put the figure as close to "here" as possible. You will want to do this with both figures to ensure the text goes between.

Hope this helps,
SmittyG1
Post Reply