여러 줄의 잘린 수직선

여러 줄의 잘린 수직선

내 테이블의 가장 오른쪽 열에 다중 행을 사용하고 있는데 수직선이 잘립니다. 이 문제를 어떻게 해결합니까?

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

\begin{table*}[t]
\begin{center}
\resizebox{1\textwidth}{!}{
%\scriptsize
\begin{tabular}{|l|l|cc|cc|cc|cc|r|}
\hline%\noalign{\smallskip}
\multirow{2}{*}{Type} & \multirow{2}{*}{Model} &
\multicolumn{2}{c|}{$\text{x}_{1:5} \rightarrow \hat{\text{x}}_{6:15}$} & \multicolumn{2}{c|}{$\text{x}_{1:5} \rightarrow \hat{\text{x}}_{6:20}$} & \multicolumn{2}{c|}{$\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:20}$} & \multicolumn{2}{c|}{$\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:30}$} & \multirow{2}{*}{\# Params} \\
 &  & SSIM & MSE & SSIM & MSE & SSIM & MSE & SSIM & MSE \\
\hline
\end{tabular}
}
\end{center}

답변1

Leandriis가 말했듯이 마지막 셀이 없기 때문에 행이 완전하지 않기 때문에 두 번째 행의 마지막 수직 규칙이 그려지지 않습니다. &해당 행의 끝에 넣으면 해당 셀이 생성되고 규칙이 그려집니다.

패키지를 고려해 볼 수도 있습니다 nicematrix. 해당 패키지의 환경에서는 항상 서문에 {NiceTabular}지정된 수직 규칙이 그려집니다. 뒷면을 |추가할 필요가 없으며 불완전한 행이 있어도 규칙이 그려집니다.|\multicolummn

\documentclass{article}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{amsmath}
\usepackage{nicematrix}

\begin{document}

\begin{table*}[t]
\begin{center}
\resizebox{1\textwidth}{!}{
%\scriptsize
\begin{NiceTabular}{|l|l|cc|cc|cc|cc|r|}
\hline%\noalign{\smallskip}
\multirow{2}{*}{Type} & \multirow{2}{*}{Model} &
\multicolumn{2}{c}{$\text{x}_{1:5} \rightarrow \hat{\text{x}}_{6:15}$} & \multicolumn{2}{c}{$\text{x}_{1:5} \rightarrow \hat{\text{x}}_{6:20}$} & \multicolumn{2}{c}{$\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:20}$} & \multicolumn{2}{c}{$\text{x}_{1:10} \rightarrow \hat{\text{x}}_{11:30}$} & \multirow{2}{*}{\# Params} \\
 &  & SSIM & MSE & SSIM & MSE & SSIM & MSE & SSIM & MSE \\
\hline
\end{NiceTabular}
}
\end{center}

\end{table*}

\end{document}

위 코드의 출력

관련 정보