I want to insert two figures side by side in one column, in a two column document, using minipage.
Here is a MWE:
\documentclass[a4paper, landscape, twocolumn]{article}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\noindent
\begin{minipage}[t]{0.4\textwidth}
\includegraphics[width=0.4\textwidth]{example-image-a}
\end{minipage}
%
\begin{minipage}[t]{0.4\textwidth}
\includegraphics[width=0.4\textwidth]{example-image-a}
\end{minipage}
\lipsum[1]
\end{document}
The result:
I can't understand why this doesn't work. Is this by design (of minipage)?
If so, what alternative do I have?
I searched relevant topics without success.
Best Answer
Use
\columnwidth
, rather than\textwidth
(which gives the width of the full page, not the column):(Note each image is slightly less than half the column width, to allow for space between, etc.) Notice also that the
\textwidth
specified in\includegraphics
is within the minipage environment, and as such returns the width of the minipage.In fact, for this example you don't need to use
minipage
at all:The result is as follows: