0

I tried the solution offered in Two figures side by side and on overleaf.com: Positioning images and tables) see at 'Multiple images in one figure'. But both show the image one below the other. Is there a way to show them on them side by side in the twocolumn class? this is heade of my code:

 \documentclass[twocolumn,prl,nobalancelastpage,aps,10pt]{revtex4-1}
 %\documentclass[rmp,preprint]{revtex4-1}
 \usepackage[latin9]{inputenc}
  \usepackage[english]{babel}
 \usepackage{graphicx,bm,times}
 \graphicspath{ {C:/Varie/UNI/MANO/I-semestre-2018/fraboni/esperimenti/RT/pictures/}{C:/Varie/UNI/MANO/I-semestre-2018/fraboni/esperimenti/RT/pictures/experimental-apparatus-RT} }
\usepackage{subcaption}
 \usepackage{lipsum}
 \usepackage{mwe}
 \begin{document}
  • 5
    you should show us a code by which you try to include your images in your document. the best in the forma of small but complete document, which we can test. probably your images are to wide or maybe you have blank line between them. – Zarko Dec 05 '18 at 23:29
  • thank you that you added your document preamble, however (short) body of document with your images is still missing. meanwhile you receive answer, how to place two images side by side in one column: does it not solve your problem? – Zarko Dec 12 '18 at 21:17

2 Answers2

1

You probably have an empty line between the two images; that necessarily inserts a paragraph break between them, effectively putting one below the other.

enter image description here

\documentclass[twocolumn]{article}

\usepackage{lipsum,graphicx}

\begin{document}

\sloppy% Just for this example
\lipsum[1]

\begin{figure}[h]
  \includegraphics[width=.45\columnwidth]
    {example-image-a}\hfill
  \includegraphics[width=.45\columnwidth]
    {example-image-b}

  \caption{A figure caption}
\end{figure}

\lipsum[2-10]

\end{document}
Werner
  • 603,163
0
  \usepackage{subfig}
  \begin{document}
  \begin{figure}%
\centering
\subfloat[label 1]{{\includegraphics[width=1cm]{img1} }}%
\qquad
\subfloat[label 2]{{\includegraphics[width=1cm]{img2} }}%
\caption{2 Figures side by side}%
\label{fig:example}%
 \end{figure}

IT WORKED. P.S. just riduce the width if the images are too large to stay in the same column