33

I am writing an IEEEtran article. I use graphicx for inserting .pdf images. Normally, LaTeX selects a position like A. I want LaTeX automatically find and insert the image to a position like B. How can I do that? This is my code:

\usepackage{graphicx}
\begin{document}
\begin{figure}
  \centering
  % Requires \usepackage{graphicx}
  \includegraphics{Figures/Fig1.pdf}\\
  \caption{hi}\label{hi}
\end{figure}
\end{document}

enter image description here

6
  • <<There is no bottom area for page-wide floats in two-column mode>> from tex.stackexchange.com/questions/39017/…
    – touhami
    Mar 28, 2015 at 20:09
  • @touhami So we can't do this in LaTeX? Mar 28, 2015 at 20:14
  • @user2991243 - What \documentclass are you using?
    – AboAmmar
    Mar 28, 2015 at 20:55
  • @AboAmmar \documentclass[conference,hidelinks]{IEEEtran} Mar 28, 2015 at 21:46
  • @user2991243 - Please see my answer.
    – AboAmmar
    Mar 28, 2015 at 23:39

2 Answers 2

49

You need to use the starred version of the {figure*} environment to enable the figure occupy the two columns. Besides, you also need to load the dblfloatfix package (download from here), which is necessary for placing the figure in the bottom of the page. It allows you the use either of the options [tbp]. Here is a MWE:

\documentclass[conference,hidelinks]{IEEEtran}
\usepackage{dblfloatfix}    % To enable figures at the bottom of page
\usepackage[demo]{graphicx} % [demo] option for empty figure
\usepackage{kantlipsum}     % for random text

\begin{document}
\section{Introduction}
\kant[1-5]
\begin{figure*}[!b]
    \centering
    \includegraphics{MyFigure}
    \caption{My Figure in Two Columns}
\end{figure*}
\kant[6-11]
\end{document}

Which outputs the following:

enter image description here

3
  • 3
    Be aware that as explained in tex.stackexchange.com/questions/153850/…, you may need to declare your figure prior to where you want it to be placed.
    – Thomas
    Jun 30, 2015 at 9:45
  • 2
    What is the difference between figure and figure*?
    – pitosalas
    Apr 30, 2018 at 21:20
  • 1
    @pitosalas it lets the figure span both columns Nov 6, 2022 at 20:03
0

Here is a solution

\documentclass{article}
\usepackage[pdftex]{graphicx}
\usepackage{multicol}
\begin{document}
\begin{multicols}{2}
test
\end{multicols}
\begin{figure}[htp]
  \centering
  \includegraphics{Figures/Fig1.pdf}\\
  \caption{hi}\label{hi}
\end{figure}
\end{document}
2
  • Hi you, dear downvoter, please before downvote can you be more helpfull and leave a comment? I don't remember that my answer was so bad in 2000(15).
    – touhami
    Sep 9, 2021 at 13:01
  • I did not downvote, but in general on stackExchange pages, you should explain in words what your code does and why it does do what it does. For example, what does [htp] mean in your snippet, where is it defined, etc.? Also: How can I use width and bottom placement in one command (you provided neither of them in your snippet)? Apr 22, 2022 at 15:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .