Graphics, Figures & TablesProblem with Figure Environment

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
gtechdave6
Posts: 3
Joined: Fri Sep 18, 2009 7:30 pm

Problem with Figure Environment

Post by gtechdave6 »

Hi all,

(I am using MikTeX with TeXnicCenter)

With \usepackage{graphicx} in the preamble, I am able to insert an image using \includegraphics{Whatever.png}. However, I have no control over placement of the image (top, bottom, here, etc.); it usually is inserted in the text wherever the command is issued.

But, When I use:

\begin{figure}[tp]
\centering
\includegraphics{Whatever.png}
\caption{blah blah}
\label{fig:WhateverImage}
\end{figure}

No image shows up in my PDF document at all, not even a space for the image.

Very confused.

Thank you for any help,

Dave

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Problem with Figure Environment

Post by localghost »

gtechdave6 wrote:[...] No image shows up in my PDF document at all, not even a space for the image. [...]
Check the log file for warnings and error messages.


Thorsten
gtechdave6
Posts: 3
Joined: Fri Sep 18, 2009 7:30 pm

Problem with Figure Environment

Post by gtechdave6 »

Thank you for your reply, Thorsten.

Ok, so the warning issued for that error is as follows:
Package multicol Warning: Floats and margins not allowed inside 'multicols' environment!
!

I wasn't aware that I couldn't use the figure environment within the multicols environment. Is there another way to position an image using

Code: Select all

\includegraphics{}
within the multicols environment?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: Problem with Figure Environment

Post by Stefan Kottwitz »

\includegraphics would work, but single column floats are not possible with multicolumn. Floats spanning all columns may work, using a a starred float environment.

Stefan
LaTeX.org admin
Post Reply