
아래에 4개의 테이블이 있습니다.
\documentclass[11pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[table]{xcolor}
\begin{document}
\begin{tabular}{||c c c||}
\hline
Points & X(m) & t(s)\\ [0.5ex]
\hline\hline
0 & 0 & 0\\
\hline
1 & 2 & 1.48 \\
\hline
2 & 4 & 2.76 \\
\hline
3 & 6 & 4.02 \\
\hline
4 & 8 & 5.22 \\
\hline
5 & 10 & 6.43 \\
\hline
6 & 12 & 7.76 \\
[1ex]
\hline
\end{tabular}
\begin{tabular}{||c c c||}
\hline
Points & X(m) & t(s)\\ [0.5ex]
\hline\hline
0 & 12 & 0\\
\hline
1 & 10 & 1.53 \\
\hline
2 & 8 & 2.94\\
\hline
3 & 6 & 4.53 \\
\hline
4 & 4 & 5.96 \\
\hline
5 & 2 & 7.36 \\
\hline
6 & 0 & 8.83 \\
[1ex]
\hline
\end{tabular}
\begin{tabular}{||c c c||}
\hline
Points & X(m) & t(s)\\ [0.5ex]
\hline\hline
0 & 0 & 0\\
\hline
1 & 2 & 1.48 \\
\hline
2 & 4 & 2.76 \\
\hline
3 & 6 & 4.02 \\
\hline
4 & 8 & 5.22 \\
\hline
5 & 10 & 6.43 \\
\hline
6 & 12 & 7.76 \\
[1ex]
\hline
\end{tabular}
\begin{tabular}{||c c c||}
\hline
Points & X(m) & t(s)\\ [0.5ex]
\hline\hline
0 & 12 & 0\\
\hline
1 & 10 & 1.80 \\
\hline
2 & 8 & 3.46 \\
\hline
3 & 6 & 4.94 \\
\hline
4 & 4 & 6.49 \\
\hline
5 & 2 & 8.20 \\
\hline
6 & 0 & 9.85 \\
[1ex]
\hline
\end{tabular}
\end{document}
지금은 테이블이 많은 공간을 차지하기 때문에 테이블 4개를 2x2 격자로 배열하고 싶습니다. 이 작업을 어떻게 수행할 수 있습니까?
답변1
테이블 사이의 빈 줄은 각 테이블을 새 줄로 시작합니다. 처음 두 테이블과 마지막 두 테이블 사이에서 삭제하십시오. 예를 들면 다음과 같습니다.
\documentclass[11pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[table]{xcolor}
\begin{document}
\begin{center}
\begin{tabular}{||c c c||}
\hline
Points & X(m) & t(s)\\ [0.5ex]
\hline\hline
0 & 0 & 0\\
\hline
1 & 2 & 1.48 \\
\hline
2 & 4 & 2.76 \\
\hline
3 & 6 & 4.02 \\
\hline
4 & 8 & 5.22 \\
\hline
5 & 10 & 6.43 \\
\hline
6 & 12 & 7.76 \\
[1ex]
\hline
\end{tabular}
\hfil %<---
\begin{tabular}{||c c c||}
\hline
Points & X(m) & t(s)\\ [0.5ex]
\hline\hline
0 & 12 & 0\\
\hline
1 & 10 & 1.53 \\
\hline
2 & 8 & 2.94\\
\hline
3 & 6 & 4.53 \\
\hline
4 & 4 & 5.96 \\
\hline
5 & 2 & 7.36 \\
\hline
6 & 0 & 8.83 \\
[1ex]
\hline
\end{tabular}
\medskip
\begin{tabular}{||c c c||}
\hline
Points & X(m) & t(s)\\ [0.5ex]
\hline\hline
0 & 0 & 0\\
\hline
1 & 2 & 1.48 \\
\hline
2 & 4 & 2.76 \\
\hline
3 & 6 & 4.02 \\
\hline
4 & 8 & 5.22 \\
\hline
5 & 10 & 6.43 \\
\hline
6 & 12 & 7.76 \\
[1ex]
\hline
\end{tabular}
\hfil %<---
\begin{tabular}{||c c c||}
\hline
Points & X(m) & t(s)\\ [0.5ex]
\hline\hline
0 & 12 & 0\\
\hline
1 & 10 & 1.80 \\
\hline
2 & 8 & 3.46 \\
\hline
3 & 6 & 4.94 \\
\hline
4 & 4 & 6.49 \\
\hline
5 & 2 & 8.20 \\
\hline
6 & 0 & 9.85 \\
[1ex]
\hline
\end{tabular}
\end{center}
\end{document}