
Estoy usando varias filas en mi tabla para la columna más a la derecha, pero la línea vertical está truncada. ¿Cómo puedo solucionar esto?
\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}
Respuesta1
Como ha dicho leandriis, la última regla vertical de la segunda fila no se dibuja porque tu fila no está completa ya que no está la última celda. Poner &
al final de esa fila crea esa celda y dibuja la regla.
También puedes considerar el paquete nicematrix
. En el entorno {NiceTabular}
de ese paquete |
siempre se trazan las reglas verticales especificadas en el preámbulo. No es necesario agregar un |
reverso \multicolummn
y las reglas se dibujan incluso con filas 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}