Ich versuche, eine große Tabelle in eine Beamer-Folie einzupassen. Meine Tabelle hat 2 Panels, die 2 tabularx
Umgebungen darstellen. Mein Versuch beinhaltet eines \resizebox
für jede tabularx
Umgebung (siehe Code unten).
Wenn ich die beiden tabularx
in die gleiche Reihenfolge setze \resizebox
, erhalte ich eine Fehlermeldung, weil ich \\ [0.3cm]
etwas Abstand zwischen den beiden Feldern lassen möchte. Ich frage mich, ob es eine bessere Lösung als diese gibt.
Für jede Hilfe wäre ich sehr dankbar.
\documentclass{beamer}
\usepackage[english]{babel}
\usepackage{tabularx,booktabs,dcolumn}
\pdfmapfile{+sansmathaccent.map}
\newcolumntype{d}{D..{-1}}
\begin{document}
\begin{frame}
\frametitle{Title of my slide}
\begin{table}
\tiny
\begin{tabular}{c*{7}{d}}
\midrule
\multicolumn{1}{c}{$CCCCC$}
& \multicolumn{1}{c}{$CCCCC$}
& \multicolumn{1}{c}{$CCCC$}
& \multicolumn{1}{c}{$CCC$}
& \multicolumn{1}{c}{$CCCCCCC$}
& \multicolumn{1}{c}{$CCCCCC$}
& \multicolumn{1}{c}{$CCCCCC$}
& \multicolumn{1}{c}{$CCCCCCCCCCCCCC$}
\\
\midrule
\multicolumn{8}{c}{\textbf{Panel A: AAA}} \\
\midrule
0 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
& (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) \\
& & & & & & & \\
0 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
& (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) \\
& & & & & & & \\
0 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
& (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) \\
\end{tabular}
\vfill
\begin{tabular}{c*{7}{d}}
\multicolumn{8}{c}{\textbf{Panel B: BBB}} \\
\midrule
0 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
& (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) \\
& & & & & & & \\
0 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
& (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) \\
& & & & & & & \\
0 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
& (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) \\
\midrule
\end{tabular}
\end{table}
\end{frame}
\end{document}
Antwort1
Ich würde versuchen, die Skalierung von Tabellen zu vermeiden und die Verwendung tabularx
für numerische Daten zu vermeiden ( tabularx
passt die Spaltenbreiten an, indem die Zielbreite fürZeilenumbruchaber normalerweise möchten Sie bei dieser Art von Tabelle keinen Zeilenumbruch innerhalb der Zellen)
\documentclass{beamer}
\usepackage[english]{babel}
\usepackage{tabularx,booktabs,dcolumn}
\pdfmapfile{+sansmathaccent.map}
%\usepackage{graphicx}
%\usepackage{adjustbox}
\newcolumntype{d}{D..{-1}}
\begin{document}
\begin{frame}
\frametitle{Title of my slide}
\begin{table}
\tiny
\begin{tabular}{c*{7}{d}}
\midrule
\multicolumn{1}{c}{$CC1$}
& \multicolumn{1}{c}{$CC2$}
& \multicolumn{1}{c}{$CC3$}
& \multicolumn{1}{c}{$CC4$}
& \multicolumn{1}{c}{$CC5$}
& \multicolumn{1}{c}{$CC6$}
& \multicolumn{1}{c}{$CC7$}
& \multicolumn{1}{c}{$CC8$}
\\
\midrule
\multicolumn{8}{c}{\textbf{Panel A: AAA}} \\
\midrule
0 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
& (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) \\
& & & & & & & \\
0 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
& (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) \\
& & & & & & & \\
0 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
& (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) \\
\end{tabular}
\vfill
\begin{tabular}{c*{7}{d}}
\multicolumn{8}{c}{\textbf{Panel B: BBB}} \\
\midrule
0 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
& (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) \\
& & & & & & & \\
0 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
& (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) \\
& & & & & & & \\
0 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
& (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) & (0.00) \\
\midrule
\end{tabular}
\end{table}
\end{frame}
\end{document}