
Estou usando uma linha múltipla em minha tabela para a coluna mais à direita, mas a linha vertical está truncada. Como faço para corrigir isso?
\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}
Responder1
Como disse leandriis, a última regra vertical da segunda linha não é desenhada porque sua linha não está completa, pois não existe a última célula. Colocar &
no final dessa linha cria aquela célula e desenha a regra.
Você também pode considerar o pacote nicematrix
. No ambiente {NiceTabular}
desse pacote, |
são sempre traçadas as regras verticais especificadas no preâmbulo. Não há necessidade de adicionar |
ré \multicolummn
e as regras são desenhadas mesmo com linhas incompletas.
\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}