0

I would like to put two pictures side by side in the two-column template as follows.

expected

This is the current code:

\documentclass[journal]{IEEEtran}

\begin{document}

\begin{figure} \centering \includegraphics[width=1.5 in]{square.jpg} \caption{the square is blue} \label{fig:square} \end{figure}

\begin{figure} \centering \includegraphics[width=1.5 in]{circle.jpg} \caption{the circle is orange} \label{fig:circle} \end{figure}

\end{document}

Then, the result is as follows.

current result

Thank you.

Zarko
  • 296,517

2 Answers2

2

Another way is use of tabularx package:

\documentclass[journal]{IEEEtran}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}

\usepackage{lipsum}

\begin{document} \lipsum[1]

\begin{figure}[ht]

\begin{tabularx}{\linewidth}{@{} CC @{}} \includegraphics[width=1.5 in]{example-image-duck}%{square.jpg} \caption{the square is blue} \label{fig:square} & \includegraphics[width=1.5 in]{example-image-duck}%{circle.jpg} \caption{the circle is orange} \label{fig:circle} \end{tabularx} \end{figure} \lipsum[2-7] \end{document}

enter image description here

user94293
  • 4,254
Zarko
  • 296,517
1

Hope this will meet the requirement:

\documentclass[journal]{IEEEtran}
\usepackage{graphicx}
\usepackage{float}
\usepackage{adjustbox}

\begin{document}

\hbox{\adjustbox{valign=t}{% \begin{minipage}{0.5\textwidth} \begin{figure}[H] \includegraphics[width=0.25in]{example-image} \caption{the square is blue} \label{fig:square} \end{figure} \end{minipage}}\hspace{12pt} \adjustbox{valign=t}{% \begin{minipage}{0.5\textwidth} \begin{figure}[H] \includegraphics[width=0.25in]{example-image} \caption{the circle is orange} \label{fig:circle}
\end{figure} \end{minipage}} } \end{document}

MadyYuvi
  • 13,693