Caption package not working with beamer
You don't need the caption
package for this.
Simply issue the command
\setbeamerfont{caption}{size=\footnotesize}
MWE
\PassOptionsToPackage{demo}{graphicx} % remove in your document
\documentclass{beamer}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{lmodern}% http://ctan.org/pkg/lm
\graphicspath{{images/}}
\usetheme{default}
\setbeamerfont{caption}{size=\footnotesize}
\begin{document}
\begin{frame}
\begin{figure}[h]
\centering
\includegraphics[scale=0.8]{axb-grid}
\caption{$A \times B$ grid}
\label{fig:axbgrid}
\end{figure}
\end{frame}
\end{document}
Output:
EDIT
While with old versions of beamer
, caption
commands used to work, it seems that now the caption
package is not able to recognize beamer
anymore.
In fact, loading caption
with beamer
you get the following warning:
Package
caption
Warning:\caption
will not be redefined since it's already(
caption
) redefined by a document class or package which is(
caption
) unknown to thecaption
package.See the
caption
package documentation for explanation.
If you want caption
and its \captionsetup
to work with beamer
, you have to load caption
with the option compatibility=false
:
\usepackage[compatibility=false]{caption}
but, as the documentation warns:
But please note that using this option is neither recommended nor supported since unwanted side-effects or even errors could occur afterwards.
These Issues have been cleared and should be closed in 2019 versions of the packages
Please update to Tex Live 2019 (Note W32TeX / MiKTeX are generally already updated)