Banner

Donate

You find LaTeX Community useful? Please donate! Learn why!

Amount:

Partner Sites

goLaTeX
TeXblog
TeXnicCenter

Who is online

In total there are 20 users online :: 2 registered, 0 hidden and 18 guests (based on users active over the past 5 minutes)
Most users ever online was 108 on Tue Jun 08, 2010 3:33 pm

Users browsing this forum: Google [Bot], Google Adsense [Bot] and 18 guests

[SOLVED] Help on figure environment.

LaTeX specific issues not fitting into one of the other forums of this category.

[SOLVED] Help on figure environment.

Postby cryptod on Fri Jun 13, 2008 1:35 am

Hi,
I have a document written as follow:
...
some text..
figure...
some text2..
figure2...

When i compile the document, i get:
some text..
some text2..
figure...
figure2...
i know that i got this because the space after my text can't hold the figure, but i dont want it to be filled with the other text, i just need it blank!
i messed up with the [htp] options, but il doesn't really help. The order in my document is really important, i want figure1 to figure directly after the text1.

How can i force LaTeX to really use the [h] option?
Last edited by cryptod on Fri Jun 13, 2008 2:05 am, edited 1 time in total.
cryptod
 
Posts: 2
Joined: Fri Jun 13, 2008 1:25 am

Re: Help on figure environment.

Postby Stefan_K on Fri Jun 13, 2008 1:55 am

Hi,

you could use the float package:
Code: Select all
\usepackage{float}
\begin{figure}[H]
...
\end{figure}

Alternatively, what I would prefer, you could remove the figure environment around the object. Then it doesn't float, and if you want a caption and an entry in the list of figures you could use \captionof from the caption package:
Code: Select all
\usepackage[labelfont=bf]{caption}
...
\begin{center}
  \includegraphics{...}% whatever ...
  \captionof{figure}{description}\label{fig:test}
\end{center}

For more options and features have a look at the caption documentation.

Similare questions were posted to this forum before, the forum search function would lead you to more examples.

Stefan
LaTeX Community Moderator
TeXblog.net
Stefan_K
Site Moderator
 
Posts: 2687
Joined: Mon Mar 10, 2008 8:44 pm
Location: Hamburg, Germany

Re: Help on figure environment.

Postby cryptod on Fri Jun 13, 2008 2:05 am

Thanks for the quick answer, i used the caption package and it worked.
cryptod
 
Posts: 2
Joined: Fri Jun 13, 2008 1:25 am


Return to General

Who is online

Users browsing this forum: Google [Bot], Google Adsense [Bot] and 18 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group