Graphics, Figures & TablesPosition a figure in Latex

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
DaneDane
Posts: 2
Joined: Sat May 09, 2009 8:29 pm

Position a figure in Latex

Post by DaneDane »

Hello.

I've got a problem when compiling my latex file. I use the figure environment to include an .eps in my document. However, every time I compile, the picture is shown at the end of the document and not at the position where I put it in the code.

Anybody knows, how to make it right?

Code: Select all

\begin{figure}[h]
\centering
\includegraphics[width=\textwidth]{Figure}
\end{figure}

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: Position a figure in Latex

Post by josephwright »

Always give LaTeX an option along with "h" in case things don't fit: usually "ht". If that fails, load the float package and try "H".
Joseph Wright
User avatar
Stefan Kottwitz
Site Admin
Posts: 10358
Joined: Mon Mar 10, 2008 9:44 pm

Position a figure in Latex

Post by Stefan Kottwitz »

Hi Dane,

welcome to the board!
You could try the ! option and more, perhaps test:

Code: Select all

\begin{figure}[!htbp]
See figure syntax and options.

Stefan
LaTeX.org admin
DaneDane
Posts: 2
Joined: Sat May 09, 2009 8:29 pm

Re: Position a figure in Latex

Post by DaneDane »

Thanks a lot for the fast replies! It works with the float package and the option "H".
Post Reply