Graphics, Figures & TablesPlacing figures

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
rophys
Posts: 2
Joined: Fri Nov 09, 2012 9:58 pm

Placing figures

Post by rophys »

Hello all,

I'm trying to put some figures in the right places in text but is not working.

I'm using the following packages:

Code: Select all

\usepackage{graphicx}
\usepackage{natbib}
\usepackage{float}
\usepackage{varioref}
\usepackage{wrapfig}
\usepackage{dcolumn}
\usepackage{subfigure}
\usepackage{subfigmat}
\usepackage{fancyvrb}
\usepackage{floatrow}
When I compiled the text, the figure is not going to the right position and also is appearing the symbol [t!] close to the figure. I've tried everything =/

This is the code I'm using to place the figure :

Code: Select all

\begin{figure}[t!]
\begin{center}
\includegraphics[keepaspectratio,width=13cm]{./figures/introduction/fig.eps}
\end{center}
\caption{}
\label{fig}
\end{figure} 
Many thanks
Last edited by Stefan Kottwitz on Fri Nov 09, 2012 10:42 pm, edited 1 time in total.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Placing figures

Post by Stefan Kottwitz »

rophys wrote:I'm trying to put some figures in the right places in text but is not working.
Right places are optimal places for the text flow regarding page breaks. LaTeX does it automatically for you, if you use a figure environment. By specifying options, you can tell LaTeX where to place.
rophys wrote:I've tried everything
And what is this, that you tried? Before we continue and recommend what you already did.
rophys wrote:This is the code I'm using to place the figure :

Code: Select all

\begin{figure}[t!]
\begin{center}
\includegraphics[keepaspectratio,width=13cm]{./figures/introduction/fig.eps}
\end{center}
\caption{}
\label{fig}
\end{figure}
Sometimes more options are considered better because of easier placement, such as

Code: Select all

\begin{figure}[htbp!]
Btw. I would change \begin{center} ... \end{center} and use \centering instead, see center vs. \centering for an explanation.

Stefan
LaTeX.org admin
Post Reply