Search code examples
latexcaptionbeamer

Caption size - beamer


I have the following code on a beamer:

\documentclass{beamer} %[handout]
\usetheme{CambridgeUS}
\usepackage{appendixnumberbeamer}
\usepackage{caption}

\usepackage{arydshln}
\usepackage{natbib}
\usepackage{graphicx}
\captionsetup{font=scriptsize,labelfont=scriptsize}
\usepackage{tikz}
\usepackage[english]{babel}

\begin{document}
\begin{frame}
    \tiny
    \centering
    \captionof{table}{\tiny Individual stocks risk-reallocation}
    \hspace*{-1.0cm}
    \begin{tabular}{lccccc}
    some table here
    \end{tabular}
\end{frame}
\end{document}

The issue with this code is that although I manage to make the title size "tiny" I don't seem to manage to make the word "Table" on the caption tiny as well. Any help?


Solution

  • Beamer has its own mechanism to change the font size:

    \documentclass{beamer} %[handout]
    \usetheme{CambridgeUS}
    \usepackage{appendixnumberbeamer}
    
    \setbeamerfont{caption}{size=\tiny}
    \setbeamercolor{caption name}{fg=black}
    
    \begin{document}
    \begin{frame}
        \begin{table}
            \caption{Individual stocks risk-reallocation}
        \begin{tabular}{lccccc}
        some table here
        \end{tabular}
        \end{table}
    \end{frame}
    \end{document}