
그림에서 볼 수 있듯이 테이블은 불완전하며 페이지를 넘어 확장됩니다. 페이지 안에 맞춰야 해요. 따라서 행 높이를 늘리고 열 너비를 줄여야 합니다. 어떻게 해야 하나요? 또한 텍스트가 중앙에 정렬되지 않습니다. 나는 여기서 문제를 이해하지 못합니다.
\begin{table}[ht]
\begin{center}
\begin{tabular}{||c||c|c||c|c|c|c||}
\hline
\multirow{2}{2cm}{\textbf{Atlas Resolution}} & \multicolumn{2}{p{3cm}||}{\centering \textbf{Variant-1}} & \multicolumn{2}{p{3cm}||}{\centering \textbf{Variant-2}} & \multicolumn{2}{p{3cm}||}{\centering \textbf{Variant-3}} \\ \cline{2-7}
& \textbf{Average Render Time (ms)} & \textbf{IFPS} & \textbf{Average Render Time (ms)} & \textbf{IFPS} & \textbf{Average Render Time (ms)} & \textbf{IFPS}\\
\hline\hline
512$\times$512 & & & & & & \\
\hline
1024$\times$1024 & & & & & & \\
\hline
18432$\times$18432 & & & & & & \\
\hline
19456$\times$19456 & & & & & & \\ [1ex]
\hline
\end{tabular}
\caption{List of sizes for various resolution of Dataset-I, compressed variant Dataset-II and different slices variant Dataset-II}
\end{center}
\end{table}
\label{tab:1}
업데이트된 표:
답변1
다음 해결 방법이 허용됩니다.
\documentclass{article}
\usepackage{booktabs,makecell,multirow,tabularx}
\renewcommand\theadfont{\bfseries\normalsize}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\usepackage{geometry}
\begin{document}
\begin{table}[ht]
\centering
\begin{tabularx}{\textwidth}{c L c L c L c }
\toprule
\multirow{2}{*}{\thead{Atlas\\ Resolution}}
& \multicolumn{2}{c}{\thead{Variant-1}}
& \multicolumn{2}{c}{\thead{Variant-2}}
& \multicolumn{2}{c}{\thead{Variant-3}} \\
\cmidrule(lr){2-3}\cmidrule(lr){4-5}\cmidrule(lr){6-7}
& \thead[b]{Average\\ Render\\ Time (ms)} & \thead[b]{IFPS}
& \thead[b]{Average\\ Render\\ Time (ms)} & \thead[b]{IFPS}
& \thead[b]{Average\\ Render\\ Time (ms)} & \thead[b]{IFPS} \\
\midrule
512$\times$512 & & & & & & \\
1024$\times$1024 & & & & & & \\
\addlinespace[2pt]
18432$\times$18432 & & & & & & \\
19456$\times$19456 & & & & & & \\
\bottomrule
\end{tabularx}
\caption{List of sizes for various resolution of Dataset-I, compressed variant Dataset-II and different slices variant Dataset-II}
\label{tab:1}
\end{table}
\end{document}
편집하다:
나는 당신의 테이블을 완전히 새롭게 디자인합니다. 여기에서는 booktabs
가로 규칙, makecell
열 머리글, tabularx
텍스트 너비에 대한 범위 테이블 및 열 너비의 간단한 결정을 위해 패키지를 사용합니다. 열 머리글의 글꼴은 다음과 같이 정의됩니다.
\renewcommand\theadfont{\bfseries\normalsize}
열 머리글의 글꼴이 굵은 글씨가 아닌 경우 많은 사람들(나도 포함)이 테이블을 더 미학적으로 고려한다는 Mico의 의견은 저에게 있습니다. 이는 다음을 사용하여 간단하게 달성할 수 있습니다.
\renewcommand\theadfont{\normalsize}
이 경우 테이블 감시는 다음과 같습니다.