Document Classesbeamer puzzle

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
manyadike-danes
Posts: 1
Joined: Fri Apr 01, 2011 7:01 pm

beamer puzzle

Post by manyadike-danes »

forum

i am preparing a beamer document and it has tables which i wish to have numbered, so i included,
\setbeamertemplate{caption}[numbered]
this worked perfectly well until i wished to make the font smaller on a table and i used the 'captionof' command as follows,
\begin{frame}
\captionof{table}{Coh98 firm demography (1) -- numbers}
\setlength{\tabcolsep}{2pt}
\small
\begin{center}
\begin{tabular}{l|rrrrrrrrr}
etc

this had the effect of suppressing the table numbering.

is there some tweak in the caption package i have missed?

thanks

ma-d

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

mnajem
Posts: 20
Joined: Thu Mar 18, 2010 12:23 pm

Re: beamer puzzle

Post by mnajem »

Hi,

I also using beamer for quite a number of slides presentation. I tried to look at my source code, seems that if you want your table to be numbered, enough with \caption{bla} in your table.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

beamer puzzle

Post by localghost »

manyadike-danes wrote:[…] i am preparing a beamer document and it has tables which i wish to have numbered, so i included,
\setbeamertemplate{caption}[numbered]
this worked perfectly well until i wished to make the font smaller on a table […]
It's much simpler than you might think.

Code: Select all

\documentclass[smaller]{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{fix-cm}
\usepackage{booktabs}

\setbeamertemplate{caption}[numbered]

\begin{document}
  \begin{frame}
    \begin{table}
      \caption{Dummy table}\label{tab:dummy}
      \small
      \begin{tabular}{*4{c}}\toprule
        Head & Head & Head & Head \\ \midrule
        Values & Values & Values & Values \\
        Values & Values & Values & Values \\ \bottomrule
      \end{tabular}
    \end{table}
  \end{frame}
\end{document}

Best regards and welcome to the board
Thorsten
Post Reply