더 긴 열 방해가 있는 테이블의 행을 결합하고 줄입니다(v2).

더 긴 열 방해가 있는 테이블의 행을 결합하고 줄입니다(v2).

모두들 좋은 하루 되세요.

나는 이전의 매우 좋은 게시물을 팔로우하고 있으며질문 딱 두 개만주어진 답변에 대해여기,

  1. *의 역할은 무엇입니까 \multirow{2}{*}{}?

  2. 테이블의 한 버전은 다음과 같습니다.

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

하지만...

하지만 확장된 긴 기둥 장애물이 있는 경우\multirow{2}{$\begin{matrix} 5\\5\\5\\5\\5\\5 \end{matrix}$ }{}

다음과 같이 표시됩니다.

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

주요 질문: \multirow{2}에 긴 열이 있고 열에 5개 중 6개가 있습니다. 인접한 줄을 방해하지 않고 5개 중 6개가 모두 단일 블록에 있는 것처럼 보이도록 테이블을 수정하려면 어떻게 해야 합니까? ? 이 문제를 어떻게 해결하나요?

최소한의 템플릿은 다음과 같습니다.

\begin{document}


\centering\renewcommand\arraystretch{1.2}
\begin{tabular}{c|c|c}
\hline
Topic 1 & \multicolumn{2}{c}{Topic 2}\\
\hline
33333 & 44444 & \multirow{2}{*}{55555}\\
\cline{1-2}
aaaaa & bbbbb\\
\hline
aaaaa & \multicolumn{2}{c}{ddddd}
\\
\hline
 \end{tabular}



\centering\renewcommand\arraystretch{1.2}
\begin{tabular}{c|c|c}
\hline
Topic 1 & \multicolumn{2}{c}{Topic 2}\\
\hline
33333 & 44444 & \multirow{2}{*}{$\begin{matrix} 5\\5\\5\\5\\5\\5 \end{matrix}$ }\\
\cline{1-2}
aaaaa & bbbbb\\
\hline
aaaaa & \multicolumn{2}{c}{ddddd}
\\
\hline
 \end{tabular}

\end{document}

답변1

*\multirow{n}{*}{…}, 다중 행은 ​​내용의 자연스러운 너비를 갖습니다.

두 번째 테이블의 경우, 의 값을 n에서 으로 2변경 하는 보조 행을 추가하기만 하면 됩니다 6. 가능성은 다음과 같습니다.

    \documentclass{article}
\usepackage{amsmath}
    \usepackage{multirow, makecell}

    \begin{document}


\centering\renewcommand\arraystretch{1.2}
\begin{tabular}{c|c|c}
\hline
Topic 1 & \multicolumn{2}{c}{Topic 2}\\
\hline
33333 & 44444 & \multirow{2}{*}{55555}\\
\cline{1-2}
aaaaa & bbbbb\\
\hline
aaaaa & \multicolumn{2}{c}{ddddd}
\\
\hline
 \end{tabular}
\vspace{1cm}

\centering\renewcommand\arraystretch{1.2}
\begin{tabular}{c|c|c}
\hline
Topic 1 & \multicolumn{2}{c}{Topic 2}\\
\hline
33333 & 44444 & \multirow{6}{*}{$\begin{matrix} 5\\5\\5\\5\\5\\5 \end{matrix}$ }\\%{5\\5\\5\\5\\5\\5}
\cline{1-2}
aaaaa & bbbbb\\
\cline{1-2}
aaaaa & \\
\cline{1-2}
\multicolumn{2}{c|}{}\\
\multicolumn{2}{c|}{}\\
\multicolumn{2}{c|}{}\\
\hline
& \multicolumn{2}{c}{ddddd}\\
\hline
 \end{tabular}

\end{document} 

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

관련 정보