Information and discussion about graphics, figures & tables in LaTeX documents.
marie2011
Posts: 138 Joined: Mon Feb 06, 2012 4:58 pm
Post
by marie2011 » Mon Mar 04, 2013 8:28 pm
Dear forum members,
I was wondering if it is possible to present first the part of "errores", and subsquently the results of each study (beginning with the first study). I know how to do it in a horizontal way (with
\pause
), but I cannot manage it with the vertical way.
Here 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}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{amsfonts}
\usepackage{color}
\usefonttheme[stillsansserifsmall]{serif}
\usefonttheme{structuresmallcapsserif}
\usetheme{Pittsburgh}
%\usecolortheme{whale}
\usecolortheme{seahorse}
\setbeamertemplate{footline}[frame number]
\beamertemplatenavigationsymbolsempty
\addto{\captionsspanish}{%
\renewcommand*{\tablename}{Tabla}
}
\begin{document}
\selectlanguage{spanish}
\begin{frame}
\begin{table}[!ht]
\centering
\caption{Recuento}\label{tab:errores}
\resizebox{\textwidth}{!}{%
\begin{tabular}{@{}l*{11}{c}@{}}
\toprule
\bfseries Tipo de error
& \multicolumn{2}{c} {\bfseries 1st study}
& \multicolumn{2}{c}{\bfseries 2nd study}
& \multicolumn{2}{c}{\bfseries 3rd study}\\
\cmidrule(r){2-3}\cmidrule(r){4-5}\cmidrule(r){6-7}
& \bfseries C & \bfseries R & \bfseries C & \bfseries R & \bfseries C & \bfseries R \\
\midrule
\bfseries Errores
& & & 2 & &6& 11 \\
\bfseries Errores
& & 8 & 19 & 6 &13 &36 \\
\bfseries Errores
& & & 4 & & 6& 15 \\
\bfseries Errores
& & 1 & & & & 1\\
\bfseries Total
& \bfseries & \bfseries 9 & \bfseries 25 & \bfseries 6 &\bfseries 25 & \bfseries 63 \\
\bfseries
& \bfseries & \bfseries & \bfseries & \bfseries &\bfseries & \bfseries \\
\hline
\bottomrule
\end{tabular}
}
\end{table}
\end{frame}
\end{document}
Many thanks in advance.
Regards,
Marie
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
mas
Posts: 226 Joined: Thu Dec 04, 2008 4:39 am
Post
by mas » Tue Mar 05, 2013 3:38 am
You can do that using
\onslide
. I have put the code below. Please see whether it serves your purpose.
Code: Select all
\documentclass[10pt]{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[spanish,ngerman,catalan,english]{babel}
\usepackage{pdfpages}
\usepackage{tabularx}
\usepackage{tabu}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{amsfonts}
\usepackage{color}
\usefonttheme[stillsansserifsmall]{serif}
\usefonttheme{structuresmallcapsserif}
\usetheme{Pittsburgh}
%\usecolortheme{whale}
\usecolortheme{seahorse}
\setbeamertemplate{footline}[frame number]
\beamertemplatenavigationsymbolsempty
\addto{\captionsspanish}{%
\renewcommand*{\tablename}{Tabla}
}
\begin{document}
\selectlanguage{spanish}
\begin{frame}
\begin{table}[!ht]
\centering
\caption{Recuento}\label{tab:errores}
\resizebox{\textwidth}{!}{%
\begin{tabular}{@{}l*{11}{c}@{}}
\toprule
\bfseries Tipo de error
& \multicolumn{2}{c} {\bfseries 1st study}
& \multicolumn{2}{c}{\bfseries 2nd study}
& \multicolumn{2}{c}{\bfseries 3rd study}\\
\cmidrule(r){2-3}\cmidrule(r){4-5}\cmidrule(r){6-7}
& \bfseries C & \bfseries R & \bfseries C & \bfseries R & \bfseries C & \bfseries R \\
\midrule
\bfseries Errores & & \onslide<2->{} & \onslide<3->{2 } & \onslide<3->{ } & \onslide<4->{6 } & \onslide<4->{11} \\
\bfseries Errores & & \onslide<2->{8} & \onslide<3->{19} & \onslide<3->{6} & \onslide<4->{13} & \onslide<4->{36} \\
\bfseries Errores & & \onslide<2->{} & \onslide<3->{ 4} & \onslide<3->{ } & \onslide<4->{6 } & \onslide<4->{15} \\
\bfseries Errores & & \onslide<2->{1} & \onslide<3->{ } & \onslide<3->{ } & \onslide<4->{ } & \onslide<4->{ 1} \\
\bfseries Total
& \bfseries & \onslide<2->{\bfseries 9} & \onslide<3->{\bfseries 25} & \onslide<3->{\bfseries 6}
&\onslide<4->{\bfseries 25} & \onslide<4->{\bfseries 63} \\
\hline
\bottomrule
\end{tabular}
}
\end{table}
\end{frame}
\end{document}
Regards.
marie2011
Posts: 138 Joined: Mon Feb 06, 2012 4:58 pm
Post
by marie2011 » Tue Mar 05, 2013 10:15 am
Hello mas,
Many thanks for your answer. Everything works fine now.
Regards,
Marie