0

I am just following this figure span to one column on double column page to span figures on a two-column page but the difference instead of pasting one figure I need to put two and three figures here.

This is code for pasting a figure by spanning two columns

\documentclass[twocolumn]{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage[demo]{graphicx}% http://ctan.org/pkg/graphicx
\begin{document}
\section{First section}
\lipsum[1-2]
\section{Second section}
\lipsum[3]
\begin{figure*}
  \includegraphics[width=\textwidth]{figure}
  \caption{This is a figure caption}
\end{figure*}
\lipsum[4]
\section{Last section}
\lipsum[5-10]
\end{document}

I want to this same but instead of one figure I want to put two and three figures. I tried this but it's not working. Can any one help?

 \begin{figure*}
  \includegraphics[width=\textwidth]{1.PNG}
  \caption{This is a figure caption}
  \includegraphics[width=\textwidth]{2.PNG}
  \caption{This is a figure caption}
\end{figure*}

see figure for clear requirements. enter image description here

please try to help instead of passing comments that it's already been answered. The existing one didn't help me that's why I posted this.

1
  • 2
    Is each image supposed to get its own caption, do you want a shared caption for all three images or do you want subcaptions with a shared caption? Although about tables rather than about images, the following may be useful: tex.stackexchange.com/a/597566/134144
    – leandriis
    Aug 1, 2021 at 8:04

1 Answer 1

1

I propose this solution, based on the floatrow package:

\documentclass[twocolumn]{article}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{floatrow}
\DeclareFloatSeparators{Qquad}{\hskip4em}

\begin{document}

\section{First section}
\lipsum[1-2]

\section{Second section}
\lipsum[3]
\begin{figure*}

\floatsetup{floatrowsep=Qquad}
\begin{floatrow}
  \ffigbox[\FBwidth]{\caption{Ralph Steadman. Illustrations for \emph{Alice in Wonderland}}\label{Alice-Ralph}}{\includegraphics[scale=0.4]{AliceSteadman}}
\ffigbox[\FBwidth]{\caption{Yuri Norstein. \emph{Hedgehog in the fog}}\label{Hedgehog}}{\includegraphics[scale=0.5]{Hedgehog-in-the-fog}}\hskip4em
\ffigbox[\FBwidth]{\caption{Max Ernst. \emph{Euclid}}\label{Ernst}}{\includegraphics{Euclid}}
\end{floatrow}
\end{figure*}
\lipsum[4]

\section{Last section}
\lipsum[5-10]

\end{document} 

enter image description here

7
  • Since both IEEE and floatrow use custom captions, this may not be a good idea. Don't mess with IEEE captions. Aug 1, 2021 at 15:45
  • @JohnKormylo: As far as I know, the only thing that floatrow does is to fix the caption width
    – Bernard
    Aug 1, 2021 at 15:50
  • It can also move them to entirely different locations. See tex.stackexchange.com/questions/403661/… (OTOH, I believe the floatbox was created specifically to overcome this problem.) Aug 1, 2021 at 15:54
  • 1
    @Alex - What works for two tables will work for as many as will fit the page. Aug 2, 2021 at 3:07
  • 1
    @Alex: I had not seen your last comment, sorry. If your question is bout the floatrow environment, you can specify the number of figures in a row as an optional argument, like this: \begin{floatrow}[4] … \end{floatrow}. Of course, the sum of the widths of these figure must not exceed \textwidth.
    – Bernard
    Aug 31, 2021 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.