세 번째 하위 테이블 옆에 두 개의 하위 테이블을 쌓는 방법은 무엇입니까?

세 번째 하위 테이블 옆에 두 개의 하위 테이블을 쌓는 방법은 무엇입니까?

이 질문에 설명된 것과 동일합니다.세 번째 하위 그림 옆에 두 개의 하위 그림을 쌓는 방법은 무엇입니까?, 이번에는 반대이고 테이블이 있습니다. 이것 대신에

| SUBTBL1 | SUBTBL3 |    
| SUBTBL2 | SUBTBL3 |

알 겠어:

| SUBTBL1 |  BLANK  |    
| SUBTBL2 | SUBTBL3 |

c와 동일한 b 대신 미니페이지 t의 위치로 시도했지만 작동하지 않았습니다.

\documentclass{report}
\usepackage{colortbl}
\usepackage{float}
\usepackage{graphicx}

\begin{document}
\begin{minipage}[b]{0.5\linewidth}
\begin{table}[H]
\begin{tabular}{|c|c|c|c|}
\hline
text & text & text & text \\ \hline
\hline
text & text & text & text \\ \hline
\end{tabular}
\caption{SUBTBL1}
\end{table}
\vspace{0.5cm}

\begin{table}[H]
\begin{tabular}{|c|c|}
\hline
text & text\\ \hline
text & text\\ \hline
text & text\\ \hline
text & text\\ \hline
\end{tabular}
\caption{SUBTBL2}
\end{table}
\end{minipage}\quad
\begin{minipage}[b]{0.5\linewidth}
\begin{table}[H]
\begin{tabular}{|c|c|}
\hline
text & text\\ \hline
text & text\\ \hline
text & text\\ \hline
text & text\\ \hline
\end{tabular}
\caption{SUBTBL3}
\end{table}
\end{minipage}
\end{document}

답변1

s table내부에 환경을 두는 대신 하나의 환경과 그 안에 두 개의 s를 사용하십시오. 동일한 (또는 ) 환경 내에 여러 캡션을 가질 수 있습니다.minipagetableminipagetablefigure

두 개의 미니페이지가 0.5\linewidth나란히 있고 \quad그 사이에 공백이 있으면 상자가 가득 차고 두 번째 미니페이지가 오른쪽 여백에 약간 찔리는 것을 볼 수 있습니다. 상황에 따라 미니페이지 사이의 공간을 완전히 제거하고,

\end{minipage}% <-- percentcharacter removes space from line feed
\begin{minipage}{0.5\linewidth}

또는 너비를 약간 줄이고 대신 사용하십시오 \hfill( \quad아래 예와 같이).

여기에 이미지 설명을 입력하세요

\documentclass{report}
\begin{document}
\begin{table}
\begin{minipage}{0.48\linewidth}
\centering
\begin{tabular}{|c|c|c|c|}
\hline
text & text & text & text \\ \hline
\hline
text & text & text & text \\ \hline
\end{tabular}
\caption{SUBTBL1}
\vspace{0.5cm}

\begin{tabular}{|c|c|}
\hline
text & text\\ \hline
text & text\\ \hline
text & text\\ \hline
text & text\\ \hline
\end{tabular}
\caption{SUBTBL2}
\end{minipage}\hfill
\begin{minipage}{0.48\linewidth}
\centering
\begin{tabular}{|c|c|}
\hline
text & text\\ \hline
text & text\\ \hline
text & text\\ \hline
text & text\\ \hline
\end{tabular}
\caption{SUBTBL3}
\end{minipage}
\end{table}
\end{document}

오른쪽 테이블 하단을 왼쪽 하단 테이블과 정렬하려면 캡션의 높이가 동일하다고 가정하고 [b]두 환경에 위치 인수를 추가하면 minipage됩니다.

\begin{minipage}[b]{0.48\linewidth}

둘 다를 위해. (캡션의 높이가 다르고 캡션의 첫 번째 줄을 서로 수직으로 정렬하려면 다른 조치를 취해야 합니다. 이를 달성하는 최선의 방법은 모르겠지만 아마도 완료될 수 있을 것입니다. 패키지 와 함께 floatrow제공되며 사이트 어딘가에 이에 대한 질문이 있을 수 있습니다.)

답변2

subcaption패키지를 로드하고 병렬 환경을 사용하는 것이 좋습니다 subtable. 왼쪽에는 하위 테이블 (a)와 (b)가 포함되고, 오른쪽에는 하위 테이블 (c)가 포함됩니다.

여기에 이미지 설명을 입력하세요

\documentclass{report}
\usepackage{float}
\usepackage{subcaption}

\begin{document}
\hrule % just to illustrate width of textblock
\begin{table}[H]
\begin{subtable}{0.5\linewidth}
\centering
\begin{tabular}{|c|c|c|c|}
\hline
text & text & text & text \\ \hline
text & text & text & text \\ \hline
\end{tabular}
\caption{SUBTBL1}

\vspace{0.5cm}

\begin{tabular}{|c|c|}
\hline
text & text\\ \hline
text & text\\ \hline
text & text\\ \hline
text & text\\ \hline
\end{tabular}
\caption{SUBTBL2}
\end{subtable}%
\begin{subtable}{0.5\linewidth}
\centering
\begin{tabular}{|c|c|}
\hline
text & text\\ \hline
text & text\\ \hline
text & text\\ \hline
\end{tabular}
\caption{SUBTBL3}
\end{subtable}
\caption{Overall table caption}
\end{table}
\end{document}

관련 정보