Graphics, Figures & TablesFigures in Middle of the Text

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Drako
Posts: 6
Joined: Fri Oct 15, 2010 8:55 pm

Figures in Middle of the Text

Post by Drako »

When i try to add figures in middle of text (icons for example) if i use like this

Code: Select all

text text text text \begin{figure}
\includegraphics[scale = 0.2]{images/icon.png}
\end{figure} text text text
it doesnt work at all..

i looked for packages that could do this and tried wrapfig but i forgot to add the package, i got many errors, but it worked.. when i added the package i got fewer errors but the pdf wasnt even built.

it worked like this

Code: Select all

text text text text \begin{wrapfigure}
\includegraphics[scale = 0.2]{images/icon.png}
\end{wrapfigure} text text text

how can i do this without errors? thanks!!!
Last edited by Stefan Kottwitz on Thu Jun 30, 2011 6:29 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

Re: Figures in Middle of the Text

Post by Stefan Kottwitz »

Hi Drako,

you could directly use \includegraphics without a figure environment. The figure environment is for floating pictures with support for caption, you don't need that. Perhaps you don't need to wrap text either, for icons.

Stefan
LaTeX.org admin
Drako
Posts: 6
Joined: Fri Oct 15, 2010 8:55 pm

Re: Figures in Middle of the Text

Post by Drako »

thanks a lot!!

i did not know i could use includegraphics without figure..

thanks!!
Post Reply