4

I want to make it like this in LaTeX IEEEtran:

Enter image description here

I got this file at this link. I also tried to apply it in IEEEtran, but it didn't work.

I've tried using \twocolumn and \onecolum, but this command makes the image on a separate page separate from the text. Then the \multicols command will make it look like four columns for \multicols{2} and no changes to \multicols{1}.

The command works for files other than IEEEtran, but I've tried it on IEEEtran and it doesn't work.

Here is my code for the figure code

\begin{figure*} [!h]
\centering
\includegraphics[width=\linewidth]{imagename.png}
\caption{image caption}
  \label{Fig:image label}
\end{figure*}
Ari
  • 67
  • 1
    Have you tried adding the option keepaspectratio? – Mico Nov 21 '21 at 08:11
  • 1
    Off-topic: Since you're setting the width of the image to \textwidth, you don't need the \centering instruction. – Mico Nov 21 '21 at 08:11
  • @Mico, thanks for reminding about '\textwidth'. But 'keepaspectratio' doesn't seem to solve this. – Ari Nov 21 '21 at 08:15

1 Answers1

7

If you intent to publish in some IEEE journal, don't do it. They don't allow to have images over two columns on the first page and allow on other pages as enable figure*.

If persisting to insert an image in your own way, then see if the package cuted works for you (and for the publisher too):

\documentclass{ieeetran}
\usepackage{graphicx}
\usepackage{capt-of}  % <---
\usepackage{cuted}    % <===

\usepackage{lipsum}

\begin{document} \lipsum[1] \begin{strip} % <--- defined in "cuted" \includegraphics[width=\linewidth]{example-image-duck} \captionof{figure}{image caption} \label{Fig:image label} \end{strip}

\lipsum[2-15] \end{document}

Enter image description here

Zarko
  • 296,517
  • thanks, it worked. And thanks for the advice. But did you know to move the image down a bit more? – Ari Nov 21 '21 at 09:11
  • I'm also having a little trouble with float \begin{figure*}[h/n/b]. It doesn't appear on the page it should be, but it does appear on the next page. Is it really like that? or is there a way to make it appear according to the page. – Ari Nov 21 '21 at 09:13
  • @Zarko: I think you mean the stfloats package. – Bernard Nov 21 '21 at 10:15
  • @Ari, image is immediately after insertion in the text. If it is not on the right place, move point of strip insertion in text. BTW, figure* doesn't consider positioning options, it is always on the top of the next page from point of its insertion to text. Exception can be done by use of the stfloats package, which enable put image on the bottom of the same page (if there is enough space) at use spacing option [b]. – Zarko Nov 21 '21 at 10:59
  • @Bernard, you are right. I rewrite my comment again. Now hopeful correctly. – Zarko Nov 21 '21 at 11:01
  • @Zarko, thanks. I'll try it – Ari Nov 21 '21 at 15:53
  • What do you mean by *"allow on other pages as enable figure*"* (seems incomprehensible)? – Peter Mortensen Nov 21 '21 at 23:31
  • @PeterMortensen, a s I said in my previous comment. On the top of the next page. – Zarko Nov 22 '21 at 00:43