Document ClassesTable Issue in Presentation

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
marie2011
Posts: 138
Joined: Mon Feb 06, 2012 4:58 pm

Table Issue in Presentation

Post by marie2011 »

Dear forum members,

When trying to compile a table with beamer I get the following error:

Code: Select all

ERROR: Undefined control sequence.

--- TeX said ---
\beamer@doifinframe ...in {tabular}{llc} \toprule 
                                                  \textbf {\numer } & \textb...
l.64 \end{frame}
                
--- HELP ---
TeX encountered an unknown command name. You probably misspelled the
name. If this message occurs when a LaTeX command is being processed,
the command is probably in the wrong place---for example, the error
can be produced by an \item command that's not inside a list-making
environment. The error can also be caused by a missing \documentclass
command.
I was wondering if you know the reason. That is my minimal working example:

Code: Select all

\documentclass[10pt]{beamer}
 \usepackage[T1]{fontenc}
 \usepackage[utf8]{inputenc}
 \usepackage[spanish,ngerman,catalan,english]{babel}
 \usepackage{pdfpages}
 \usepackage{tabularx}
\usepackage{tabu}


\usefonttheme[stillsansserifsmall]{serif}
\usefonttheme{structuresmallcapsserif}
\usetheme{Pittsburgh}
\usecolortheme{seahorse}
\setbeamertemplate{footline}[frame number]


\beamertemplatenavigationsymbolsempty

\begin{document}
\newcommand*\numer{N"o}
\selectlanguage{spanish}
\begin{frame}
  \titlepage
\end{frame}

\begin{frame}
  \frametitle{{\'I}ndice}
   \tableofcontents
\end{frame}


\frame{
	\frametitle{{\'I}ndice}
	\tableofcontents
	[pausesections]
}
\begin{frame}
\begin{table}[!ht] 
\caption{Errores}
 \centering
 \begin{tabular}{llc}
 \toprule
\textbf{\numer} & \textbf{Subcategoría} &\textbf{Total}\\
\hline
\hline
E & P& 8\\
A& U& 7\\
\hline
\bottomrule
\end{tabular}
\label{tab:total}
\end{table}
\end{frame}
\end{document}
Do you know hot to change "CUADRO" into "TABLA"?

Is it possible to include a long table in beamer?

Many thanks in advance.

Regards,

Marie

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Table Issue in Presentation

Post by localghost »

marie2011 wrote:[…] When trying to compile a table with beamer I get the following error […] I was wondering if you know the reason. […]
You missed to load booktabs for the \toprule command.
marie2011 wrote:[…] Do you know hot to change "CUADRO" into "TABLA"? […]
As usual when using babel.

Code: Select all

\addto{\captionsspanish}{%
  \renewcommand*{\tablename}{Tabla}
}
marie2011 wrote:[…] Is it possible to include a long table in beamer? […]
Perhaps with the longtabu environment from tabu and the allowframebreaks option for the concerned frames. Details may be found in the beamer user guide.


Thorsten
marie2011
Posts: 138
Joined: Mon Feb 06, 2012 4:58 pm

Re: Table Issue in Presentation

Post by marie2011 »

Hello Thorsten,

Many thanks for your prompt answer.

I am going to see the aspect with tabu.

Regards,

Marie
Post Reply