# Issues

Issue #261 invalid

# Beamer and subcaption

José Ferreira
created an issue

The last update (3.28) has some incompatibility with subcaption package due to an error in caption package:

caption: The subcaption' package does not work correctly(caption) in compatibility mode.

Using compatibility=false option seems to work. A minimal example follows.

\documentclass[demo]{beamer}

\useoutertheme{infolines} \usecolortheme{seagull} %\usepackage[compatibility=false]{caption} \usepackage{caption} \usepackage{subcaption}

\begin{document}

\begin{frame}{An example} How I tested: \begin{figure} % from en.wikibooks.org/wiki/LaTeX \centering \begin{subfigure}[b]{0.3\textwidth} \includegraphics[width=\textwidth]{gull} \caption{A gull} \label{fig:gull} \end{subfigure}% ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc. %(or a blank line to force the subfigure onto a new line) \begin{subfigure}[b]{0.3\textwidth} \includegraphics[width=\textwidth]{tiger} \caption{A tiger} \label{fig:tiger} \end{subfigure} ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc. %(or a blank line to force the subfigure onto a new line) \begin{subfigure}[b]{0.3\textwidth} \includegraphics[width=\textwidth]{mouse} \caption{A mouse} \label{fig:mouse} \end{subfigure} \caption{Pictures of animals}\label{fig:animals} \end{figure}

\end{frame}

\end{document}

1. This is not a bug in beamer, I'm afraid. What's happened is that in #253 I've removed an extra space in the caption code. The caption package checks whether the original definition for \caption has altered, so is expecting to find that extra space. I've reported it to the author of caption: the fix needs to happen at that end.
Do you know of the status of the fix in the caption` package?