# How to add subfigures in a poster?

I am making a scientific poster in Latex. The code is working fine if I am working with single figures but as soon as I am adding subfigures (figures side by side), I am getting several errors at once. The code to include subfigures is correct since I verified it by taking it in an a4 sheet only. The Latex code I am using is as follows

\documentclass[portrait,a0]{sciposter}
\usepackage{amsmath}
%\usepackage{subfig}
\usepackage{array}
\usepackage{braket}
\usepackage[pdftex]{graphicx}
\usepackage{epstopdf}
\usepackage{caption}
\usepackage{subcaption}
\captionsetup{compatibility=false}
%\usepackage{subfloat}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{sectionbox}

\renewcommand{\titlesize}{\Huge}
\renewcommand{\authorsize}{\Large}
\renewcommand{\instsize}{\large}

\title{title}
\author{name}
\institute{nameinst}
\email{jvlfvj}

\leftlogo[1]{logo.jpg}
\conference{Open Poster Presentation}

\begin{document}

\maketitle

\renewcommand{\fontpointsize}{15pt}

\begin{multicols}{3}

\begin{figure}
\centering
\includegraphics[width=\textwidth]{ers.png}
\caption{diagram}
\end{figure}

\begin{figure}
\centering
\begin{subfigure}{0.3\textwidth}
\centering
\includegraphics[width=0.9\textwidth]{uvw.eps}
\caption{a}
\end{subfigure}%
\begin{subfigure}{0.3\textwidth}
\centering
\includegraphics[width=0.9\textwidth]{xyz.eps}
\caption{b}
\end{subfigure}%
\begin{subfigure}{0.3\textwidth}
\centering
\includegraphics[width=0.9\textwidth]{abc.eps}
\caption{c}
\end{subfigure}
\caption{fig}
\end{figure}

\end{multicols}

\end{document}


I have tried various combinations of the packages given in preamble. I don't know where I am going wrong. Please help.

• No floats inside multicols. There are lots of ways to arrange images on a poster that do not involve figures, subfigures or columns. – John Kormylo Mar 26 '15 at 21:06
• @JohnKormylo I got errors only after adding subfigures. I didn't get any when I compiled with ers.png (see code). – TLaw Mar 26 '15 at 21:12
• You should have gotten a warning. And the figures should have been delayed until after \end{multicols}. – John Kormylo Mar 26 '15 at 21:15
• @JohnKormylo Sorry, but I didn't understand what you meant by "the figures should have been delayed until after \end{multicols}". I got a few warnings but the output was perfect. Also, I have just shown a part of the code. There are equations and text also in between the figures. The poster has three columns and I would like to add figures and subfigures in the poster. It would be of great help if you can elaborate your answer. – TLaw Mar 26 '15 at 21:23
• As an alternative, if something in sciposter just won't work, there's also beamerposter (external homepage). It can do subfigures with the subcaption package, as shown in beamerposter subfigure. – Mike Renfro Mar 26 '15 at 21:30

"When all else fails, read the manual." Sciposter redefines the figure environment, \caption and \subfigure. However, \subfigure is implemented as a tabular, not a minipage. Also, it uses subfig instead of subfigure as a counter, but \captionof doesn't know what to do with subfig.

So to get the captions to work right, I went back to figure and caption, but used minipage and created \subcaption for subfigures.

Just for fun, I also created a subfigure environment. When not creating a list of figures, it's probably the most trivial environment in existence.

\documentclass[portrait,a0]{sciposter}
\usepackage[pdftex]{graphicx}
\usepackage{epstopdf}
\usepackage{multicol}
\usepackage{mwe}% for example images

\newcommand{\subcaption}[1]% %1 = text
{\refstepcounter{subfig}%
\par\vskip\abovecaptionskip
\centerline{\textbf{(\alph{subfig})} #1}%
\vskip\belowcaptionskip\par}

% create subfigure environment
\def\subfigure{\let\oldcaption=\caption
\let\caption=\subcaption
\minipage}
\def\endsubfigure{\endminipage
\let\caption=\oldcaption}

\renewcommand{\titlesize}{\Huge}
\renewcommand{\authorsize}{\Large}
\renewcommand{\instsize}{\large}

\leftlogo[1]{example-image}
\conference{Open Poster Presentation}

\title{title}
\author{name}
\institute{nameinst}
\email{jvlfvj}

\begin{document}

\maketitle

\renewcommand{\fontpointsize}{15pt}
\begin{multicols}{3}
\begin{figure}
\includegraphics[width=\textwidth]{example-image}
\caption{diagram}
\end{figure}

\begin{figure}
\centering
\begin{subfigure}{0.3\textwidth}
\centering
\includegraphics[width=0.9\textwidth]{example-image-a}
\caption{a}
\end{subfigure}\hfil
\begin{subfigure}{0.3\textwidth}
\centering
\includegraphics[width=0.9\textwidth]{example-image-b}
\caption{b}
\end{subfigure}\hfil
\begin{subfigure}{0.3\textwidth}
\centering
\includegraphics[width=0.9\textwidth]{example-image-c}
\caption{c}
\end{subfigure}%
\caption{fig}
\end{figure}

\lipsum[1-6]
\end{multicols}
\end{document}

• Thanks for your answer. The title and the logo should be at top and outside the columns. The figures and subfigures are distributed in the three columns in the main body of the poster. I will try this out. But you have not used columns in your code. As you already mentioned, is it really not possible to use subfigures in multicols in sciposter ? – TLaw Mar 26 '15 at 22:00
• If you had put text inside the multicols, all of the text would have printed before the first figure. Subfigures do some nasty things so that they they will show up in the list of figures AFTER the figure caption, even if the figure caption is expanded later. Anyway, if you don't want a list of figures or use figure numbers, you can replace \captionof with plain old centered text. – John Kormylo Mar 26 '15 at 22:08
• I tried using your code but in multicols environment, the figures are appearing in columns and not side by side. I also tried a0poster but in that I got a warning that floats are not allowed in multicols environment. – TLaw Mar 27 '15 at 9:17