0

this is my first time posting here so please let me know if I am doing anything wrong in my post.

I am trying to get three figures side by side in a two column environment (spanning over the two columns), and have been able to successfully do so, but the figures compile as separate (i.e. the numbering goes Fig 1, Fig 2, Fig 3 instead of 1.1, 1.2, 1.3). I would like there to be sub-numbering instead of different numbers. The template is from a Springer journal, so I have a hard time modifying the template. Things like \usepackage{subcaption} do not seem compatible with the template.

\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{times,mathptmx}
\usepackage{multicol}
\usepackage[version=3]{mhchem}
\begin{document}

\begin{figure*}[t]
\begin{multicols}{3}
    \includegraphics[width=\linewidth]{a}\par\caption{caption}
    \includegraphics[width=\linewidth]{b}\par\caption{caption}
    \includegraphics[width=\linewidth]{c}\par\caption{caption}
\end{multicols}
\end{figure*}

When I do it this way, I get three Figures side by side that look nice, but I want them to be subfigures, i.e. overall all three would be one figure with one caption, and then there would be three sub-labels/captions. Can anyone help me figure this out? Seems like a quick fix but the template I'm forced to use is a nightmare and all the simple fixes I've found online cause the program to freak out.

Thank you!

2
  • 1
    Welcome to TeX.SX! Could you please add the documentclass in order to make your example code compilable? (See: minimal working example (MWE))
    – leandriis
    Aug 14 '19 at 21:05
  • Welcome to TeX.SE! Use subfigure or subfloat environments from subcaptionn or subfig package respectively.
    – Zarko
    Aug 14 '19 at 21:07
1

See if the following solution gives what you after for:

\documentclass[twocolumn]{article}
\usepackage[demo]{graphicx} % in real document delete option "demo"
\usepackage{subcaption}% <--- new

\begin{document}
\begin{figure*}
\begin{subfigure}{.3\linewidth}
    \includegraphics[width=\linewidth]{a}
\caption{sub caption 1}
\label{fig:figure-a}
\end{subfigure}
\hfill
\begin{subfigure}{.3\linewidth}
    \includegraphics[width=\linewidth]{b}
\caption{sub caption 2}
\label{fig:figure-b}
\end{subfigure}
\hfill
\begin{subfigure}{.3\linewidth}
    \includegraphics[width=\linewidth]{c}
    \caption{sub caption 3}
\label{fig:figure-c}
\end{subfigure}
\caption{Figure caption}
\label{fig:figure}
    \end{figure*}
\end{document}

enter image description here

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.