[Tex/LaTex] How to properly label the figures and tables in beamer in Share Latex?

beamercaptionsnumbering

This is my preamble:

\documentclass{beamer}
\usetheme{CambridgeUS}
\usepackage{graphicx,mathabx}

\begin{document}

\begin{frame}
\titlepage
\frametitle{} 
\end{frame}

\begin{frame}
\frametitle{Main Results}
\framesubtitle{Graphical Analysis}
\begin{figure}[h!]
\centering\includegraphics[width=0.6\textwidth] {example-image}
\caption{Effect of increasing $\widecheck{G}$, and decreasing $\widehat{G}$ on $x^*$}
\end{figure}
\end{frame}

\begin{frame}
\frametitle{Appendices}
\framesubtitle{Appendix 2}
\begin{table}[htbp]
\caption{Parametric values}
\begin{center}
\begin{tabular}{|c|c|c|}\hline
Parameter & Value\\\hline
$\alpha$ & 0.6\\
$\beta$ & 0.5\\
$\widehat{G}$ & 90\\
$\widecheck{G}$ & 50\\
$\bar{P}$ & 10\\\hline
\end{tabular}
\end{center}
\end{table}
\end{frame}

\end{document}

I want to number my figures and tables, such as "Figure 1: The title", "Table 1: Title". Right now, I have just "Figure:" and "Table:". This is for all the figures and tables, and they're not numbered. Also, I want the colons included.

Best Answer

Specify that you want to use the numbered template associated with captions. That is, add

\setbeamertemplate{caption}[numbered]{}% Number float-like environments

to your preamble:

enter image description here

\documentclass{beamer}
\usetheme{CambridgeUS}
\usepackage{graphicx,mathabx}

\setbeamertemplate{caption}[numbered]{}% Number float-like environments

\begin{document}

\begin{frame}
  \titlepage
  \frametitle{} 
\end{frame}

\begin{frame}
  \frametitle{Main Results}
  \framesubtitle{Graphical Analysis}
    \begin{figure}[h!]
    \includegraphics[width=0.6\textwidth] {example-image}
    \caption{Effect of increasing $\widecheck{G}$, and decreasing $\widehat{G}$ on $x^*$}
  \end{figure}
\end{frame}

\begin{frame}
  \frametitle{Appendices}
  \framesubtitle{Appendix 2}
  \begin{table}[htbp]
    \caption{Parametric values}
    \begin{tabular}{|c|c|c|}\hline
      Parameter & Value\\\hline
      $\alpha$ & 0.6\\
      $\beta$ & 0.5\\
      $\widehat{G}$ & 90\\
      $\widecheck{G}$ & 50\\
      $\bar{P}$ & 10\\\hline
    \end{tabular}
  \end{table}
\end{frame}

\end{document}

I don't see the real benefit from numbering floats in a beamer presentation, as referencing within such a presentation will be lost to the audience. It would be best to revisit a slide (using something like \againframe) to refresh the audience's memory about some figure/table.