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 5 '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
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}
  • I tried the solution offered by @Werner but the high of the two images is different. I just set the height equal for the two and it is done! Thank you. – Andrea Angeletti Dec 14 '18 at 20:37
  • In this way the two images are NOT labeled as (a) and (b) as I wanted. There is a way to do it? – Andrea Angeletti Dec 14 '18 at 21:13
  • @AndreaAngeletti: Yes, you can use subcaption. Check out this code that produces this output. – Werner Dec 15 '18 at 2:16
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

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.