1

I am using multicol with includegraphics in latex article. Below is the sample code:

\documentclass[10pt,a4paper]{article}
\usepackage[margin=0.8in]{geometry}
\usepackage{graphicx}
\usepackage{multicol}

\begin{document}
\begin{figure}
    \begin{multicols}{2}
        \centering
        \fbox{\includegraphics[width=1.5\linewidth]{square}}
        \caption{Square Image}
        \columnbreak
        \fbox{\includegraphics[width=11.4em]{tall}}
        \caption{Tall Image}
    \end{multicols}
\end{figure}
\end{document}

Below is the generated PDF: enter image description here

Notice that the images are not placed properly. Also, the right margin is much more than left margin.

  • Does width=\columnwidth help? – Bobyandbob Aug 1 '17 at 9:29
  • It is much better than earlier. However the right hand margin is still much more than left hand side. Any clue? – Ravi Joshi Aug 1 '17 at 9:34
  • That is normal: the inner margin has to be roughly half the outer margin, because when you open a book, you see two inner margins side to side. – Bernard Aug 1 '17 at 10:01
3

interesting approach with multicol, however, see if tabularx is more handy in your case:

enter image description here

\documentclass[10pt,a4paper]{article}
\usepackage[margin=0.8in]{geometry}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage[export]{adjustbox}

\usepackage{showframe}

\begin{document}
\begin{figure}[!ht]
\begin{tabularx}{\linewidth}{>{\hsize=0.75\hsize}X
                             >{\hsize=0.25\hsize}X}
        \includegraphics[width=\hsize,valign=t]{example-image-a}
        \caption{Square Image}
&       \hfil
        \includegraphics[width=11.4em,valign=t]{example-image-b}
        \caption{Tall Image}
\end{tabularx}
\end{figure}
or
\begin{figure}[!ht]
\begin{tabularx}{\linewidth}{>{\hsize=0.75\hsize}X
                             >{\hsize=0.25\hsize}X}
        \includegraphics[width=\hsize]{example-image-a}
        \caption{Square Image}
&       \hfil
        \includegraphics[width=11.4em]{example-image-b}
        \caption{Tall Image}
\end{tabularx}
\end{figure}
\end{document}
|improve this answer|||||

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.