
질문: 내 비머 문서의 프레임에 테이블 전체가 나타나지 않습니다. 안내해주세요
\documentclass[12pt,fleqn]{beamer}
\usepackage{booktabs}
\begin{document}
\begin{frame}
\frametitle{A large table}
\resizebox{\textwidth}{!}{%
\begin{tabular}{*{5}{c}}
\toprule
$x$ & $y$ & $x^2$ & $y^2$ & $xy$ \\
\midrule
43 & 29 & 1849 & 841 & 1247 \\
44 & 31 & 1936 & 961 & 1364 \\
46 & 19 & 2116 & 361 & 874 \\
40 & 18 & 1600 & 324 & 720 \\
44 & 19 & 1936 & 361 & 836 \\
42 & 27 & 1764 & 729 & 1134 \\
45 & 27 & 2025 & 729 & 1215 \\
42 & 29 & 1764 & 841 & 1218 \\
38 & 41 & 1444 & 1681 & 1558 \\
40 & 30 & 1600 & 900 & 1200 \\
42 & 26 & 1764 & 676 & 1092 \\
57 & 10 & 3249 & 100 & 570\\
\bottomrule
\end{tabular}%
}
\end{frame}
\end{document}
답변1
테이블과 함께 사용하지 마십시오 \resizebox
. 글꼴 크기가 일관되지 않고 때로는 테이블을 읽을 수 없게 됩니다.
tabular*
또는 등 전체 테이블 너비를 지정할 수 있는 환경을 사용합니다 tabularx
. 표준 글꼴 크기( \small
, &c.)와 값을 사용해도 됩니다 \tabcolsep
.
이 경우 `tabular*를 사용하여 다음 코드를 제안합니다.
\documentclass[12pt,fleqn]{beamer}
\usepackage{booktabs}
\begin{document}
\begin{frame}
\frametitle{A large table}
\centering\begin{tabular*}{\framewidth}{@{\extracolsep{\fill}}*{5}{c}}
\toprule
$x$ & $y$ & $x^2$ & $y^2$ & $xy$ \\
\midrule
43 & 29 & 1849 & 841 & 1247 \\
44 & 31 & 1936 & 961 & 1364 \\
46 & 19 & 2116 & 361 & 874 \\
40 & 18 & 1600 & 324 & 720 \\
44 & 19 & 1936 & 361 & 836 \\
42 & 27 & 1764 & 729 & 1134 \\
45 & 27 & 2025 & 729 & 1215 \\
42 & 29 & 1764 & 841 & 1218 \\
38 & 41 & 1444 & 1681 & 1558 \\
40 & 30 & 1600 & 900 & 1200 \\
42 & 26 & 1764 & 676 & 1092 \\
57 & 10 & 3249 & 100 & 570\\
\bottomrule
\end{tabular*}
\end{frame}
\end{document}