1

I want to have two images side-by-side in a two-column article. I tried to use the second part of Gonzalo Medina's answer to this question but, my text flows over the second .eps image. I thought the problem had to do with my image being in .eps format, but the problem still happens with the todonotes dummy-image package. How could I prevent this? Here's a minimal example.

\documentclass[twocolumn]{article}
\usepackage{graphicx}
\usepackage{epstopdf}
%\usepackage{caption}
\usepackage{subcaption} %For sticking two images side-by-side
\usepackage{todonotes}
\begin{document}
Lorem ipsum dolor sit amet, his cu aliquip oporteat. Case admodum cu usu, qui ea honestatis contentiones necessitatibus. Eam ad ponderum cotidieque, quo ne sonet democritum dissentiet. Velit nostrud tacimates pri id, an augue eloquentiam sit. An mea quem adolescens concludaturque.

 Est eros voluptaria in. At quo eloquentiam neglegentur, eos te insolens sadipscing. Persius denique theophrastus eam cu, et melius principes consectetuer ius. Agam populo neglegentur no eum, vel putant splendide ne, senserit periculis ad est.

 Te mei veri quidam eripuit. Ei nominavi antiopam appellantur est, mei eu docendi detracto voluptaria. Oblique luptatum quaerendum usu ei, no usu graeco delicata. Has ad aliquid qualisque.

 Quo an veritus vituperata, autem modus ut pro, mel ullum semper salutatus et. Cu mea mundi voluptua disputando, at vel quis posse recteque. Sed an atqui option, natum doctus facilis mei te. Et eum phaedrum menandri praesent, sit in magna disputando. Cu fugit malorum maiestatis mea, vis cu illum vulputate inciderint.

\begin{figure}[t!]
\centering
\begin{minipage}{.5\textwidth}
  \centering
\missingfigure[figwidth=6cm]{Testing a long text string}
  \captionof{figure}{A figure}
  \label{fig:test1}
\end{minipage}%
\begin{minipage}{.5\textwidth}
  \centering
\missingfigure[figwidth=6cm]{Testing a long text string}
  \captionof{figure}{Quo an veritus vituperata, autem modus ut pro, mel ullum seper salutatus et. Cu mea mundi voluptua disputando, at vel quis posse recteque.}
  \label{fig:test2}
\end{minipage}
\end{figure}

 Amet dolores in vim, nam at maiestatis incorrupte, per facer accumsan temporibus an. Dictas legimus ea usu. Nam ne phaedrum quaestio quaerendum. Meis sanctus vim et, per augue recusabo ea. Has an sale aeque tollit, eam an solum vivendum. Nobis integre adipisci ad mei, in ridens feugait vix. Impetus eleifend vim ex, decore qualisque constituam vix eu.

 Te has stet invidunt. Mel ea soleat laoreet minimum. Duo dictas interpretaris ut, debitis lucilius in his, alterum pertinacia deterruisset eu mel. Vel id amet affert pertinacia, noluisse recteque ius ea. Exerci aperiri dolorem te his, libris lucilius inciderint ei vel, nihil scribentur ut vel.

 Sea reprimique complectitur ne. Te sale quaeque corpora ius, no dicunt integre qui, vis paulo offendit ex. Praesent incorrupte ex ius, enim primis ceteros eos te. Ne omnes commune patrioque sed.

 Paulo blandit invidunt at per, mazim congue persecuti qui ut. Quo ea esse prima, ea brute denique molestiae vis. Laoreet alienum conceptam no pro. Libris salutatus complectitur et mel, usu percipit invidunt te. No graeci habemus corrumpit quo. Ne mel agam veri qualisque, an hinc vocibus suavitate mea.

 Duo facete veritus postulant ex, ne sea tollit voluptua salutatus, no sed etiam affert. Vix at sapientem tincidunt, ad tritani delectus volutpat mea. Ceteros periculis similique duo ea, per ut ullum errem complectitur. Eu falli mundi vidisse cum, et illum eirmod abhorreant per, ut zril delicata ocurreret mei. Impedit probatus omittantur eu vim, everti impetus salutatus cu sit.


\end{document}

This is what I want (in here, the images are not bound together yet, they are side-by-side by chance) What I want

This is what I get when changing \textwidth for \columnwidth and adding \linewidth in the imagegraphics. What I get

3

You have to use figure* here. Also reduce the width of minipages to \begin{minipage}{.0.48\textwidth}. And in \includegraphics the width can be \linewidth. Further, you may need the [t] alignment specifier for minipages and a \hfill in between the minipages. There is no need of using \captionof, use \caption straight away..

\documentclass[twocolumn]{article}
\usepackage{graphicx}
\usepackage{epstopdf}
%\usepackage{caption}
\usepackage{subcaption} %For sticking two images side-by-side
\usepackage{todonotes}
\begin{document}
Lorem ipsum dolor sit amet, his cu aliquip oporteat. Case admodum cu usu, qui ea honestatis contentiones necessitatibus. Eam ad ponderum cotidieque, quo ne sonet democritum dissentiet. Velit nostrud tacimates pri id, an augue eloquentiam sit. An mea quem adolescens concludaturque.

 Est eros voluptaria in. At quo eloquentiam neglegentur, eos te insolens sadipscing. Persius denique theophrastus eam cu, et melius principes consectetuer ius. Agam populo neglegentur no eum, vel putant splendide ne, senserit periculis ad est.

 Te mei veri quidam eripuit. Ei nominavi antiopam appellantur est, mei eu docendi detracto voluptaria. Oblique luptatum quaerendum usu ei, no usu graeco delicata. Has ad aliquid qualisque.

 Quo an veritus vituperata, autem modus ut pro, mel ullum semper salutatus et. Cu mea mundi voluptua disputando, at vel quis posse recteque. Sed an atqui option, natum doctus facilis mei te. Et eum phaedrum menandri praesent, sit in magna disputando. Cu fugit malorum maiestatis mea, vis cu illum vulputate inciderint.

\begin{figure*}
\centering
\begin{minipage}[t]{0.48\textwidth}
  \centering
   \includegraphics[width=0.9\linewidth]{example-image-a}
  \caption{Quo an veritus vituperata, autem modus ut pro, mel ullum seper salutatus et. Cu mea mundi voluptua disputando, at vel quis posse recteque}
  \label{fig:test1}
\end{minipage}
\hfill   %% <---- here
\begin{minipage}[t]{0.48\textwidth}
  \centering
    \includegraphics[width=0.9\linewidth]{example-image-b}
  \caption{Quo an veritus vituperata, autem modus ut pro, mel ullum seper salutatus et. Cu mea mundi voluptua disputando, at vel quis posse recteque.}
  \label{fig:test2}
\end{minipage}
\end{figure*}

 Amet dolores in vim, nam at maiestatis incorrupte, per facer accumsan temporibus an. Dictas legimus ea usu. Nam ne phaedrum quaestio quaerendum. Meis sanctus vim et, per augue recusabo ea. Has an sale aeque tollit, eam an solum vivendum. Nobis integre adipisci ad mei, in ridens feugait vix. Impetus eleifend vim ex, decore qualisque constituam vix eu.

 Te has stet invidunt. Mel ea soleat laoreet minimum. Duo dictas interpretaris ut, debitis lucilius in his, alterum pertinacia deterruisset eu mel. Vel id amet affert pertinacia, noluisse recteque ius ea. Exerci aperiri dolorem te his, libris lucilius inciderint ei vel, nihil scribentur ut vel.

 Sea reprimique complectitur ne. Te sale quaeque corpora ius, no dicunt integre qui, vis paulo offendit ex. Praesent incorrupte ex ius, enim primis ceteros eos te. Ne omnes commune patrioque sed.

 Paulo blandit invidunt at per, mazim congue persecuti qui ut. Quo ea esse prima, ea brute denique molestiae vis. Laoreet alienum conceptam no pro. Libris salutatus complectitur et mel, usu percipit invidunt te. No graeci habemus corrumpit quo. Ne mel agam veri qualisque, an hinc vocibus suavitate mea.

 Duo facete veritus postulant ex, ne sea tollit voluptua salutatus, no sed etiam affert. Vix at sapientem tincidunt, ad tritani delectus volutpat mea. Ceteros periculis similique duo ea, per ut ullum errem complectitur. Eu falli mundi vidisse cum, et illum eirmod abhorreant per, ut zril delicata ocurreret mei. Impedit probatus omittantur eu vim, everti impetus salutatus cu sit.


\end{document}
  • I'm sorry if I wasn't clear. What I would like is to have one image at the top of each column. I added images in my question. Thanks! – Pertinax Jan 23 '15 at 9:14
  • 1
    @TheThunderChimp Well in that case you should be using figure* but it won't put figures in the first page. – user11232 Jan 23 '15 at 9:52
  • It works! The figure captions are very very close to one another though (like in the second image of my post). Is there a way of putting a bit of white space between them like in the first image of my post? Also, what do you mean in that it won't put figures in the first page? – Pertinax Jan 23 '15 at 10:05
  • 1
    @TheThunderChimp I will edit. You have to reduce the width of minipages like \begin{minipage}[t]{.48\textwidth} and put a \hfill in between minipages. – user11232 Jan 23 '15 at 10:15

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.