¿Cómo ampliar el ancho de columna de columnas específicas?

¿Cómo ampliar el ancho de columna de columnas específicas?

¿Cómo expandir el ancho de columna de columnas específicas en la tabla? Lo intenté \begin{tabular}{llc{2cm}c{2cm}cc}pero no funciona. aquí está mi código.

\begin{table}
\begin{center}
\label{table:quantitativekth}
\begin{tabular}{llc{2cm}c{2cm}cc}
\hline\noalign{\smallskip}
\multirow{2}{*}{Type} & \multirow{2}{*}{Model} & \multicolumn{2}{c}{$\text{x}_{0:10} \rightarrow \hat{\text{x}}_{10:30}$}\ \ \ &\multicolumn{2}{c}{$\text{x}_{0:10} \rightarrow \hat{\text{x}}_{10:50}$}\ \ \ \\
 &  & SSIM & PSNR & SSIM & PSNR \\
\noalign{\smallskip}
\hline
\noalign{\smallskip}
Deterministic \ & 2D ConvLSTM \cite{convlstm} & 0.712 & 0.639 & - & - \\ % 2.833082
& PredRNN++ \cite{wang-predrnn} & 0.865 & 0.741 & - & - \\ % 15390160
& E3D-LSTM \cite{wang-e3d} & 0.879 & 0.810 & - & - \\ % 38696497, 41940673
\noalign{\smallskip}
\hline
\noalign{\smallskip}
Stochastic & Variational 2D ConvLSTM \cite{vrnn} & - & - & - & - \\ % 2856122
& Ours & 0.863 & 0.850 & - & - \\ %12853578
\noalign{\smallskip}
\hline
\end{tabular}
\end{center}
\caption{Results on the KTH action dataset when predicting 20 timesteps into the future i.e. $\hat{\text{x}}_{10:30}$ and 40 timesteps into the future o.e. i.e. $\hat{\text{x}}_{10:50}$. The metrics are computed frame-wise. Higher SSIM and PSNR scores indicate better results.}
\end{table}

Respuesta1

A continuación se muestra un código de ejemplo que utiliza el nuevo Wtipo de columna del arraypaquete. Este tipo de columna toma dos argumentos, el primero es la alineación horizontal deseada del contenido y el segundo es el ancho de la columna. Además de eso, también cargué el booktabspaquete y usé sus \toprulecomandos \midruley \bottomrulepara evitar tener que combinarlo \hlinecon espacio agregado manualmente. Además de eso, he arreglado la posición del \lablel. Para garantizar una referencia correcta, debe colocarse después del \caption. Por último, también reemplacé el centerentorno con el \centeringcomando para evitar espacios en blanco adicionales alrededor de la mesa.

ingrese la descripción de la imagen aquí

\documentclass{article}
\usepackage{geometry}
\usepackage{array}
\usepackage{multirow}
\usepackage{amsmath}
\usepackage{booktabs}
\begin{document}
\begin{table}
\centering
\begin{tabular}{llW{c}{2cm}W{c}{2cm}cc}
\toprule
\multirow{2}{*}{Type} & \multirow{2}{*}{Model} & \multicolumn{2}{c}{$\text{x}_{0:10} \rightarrow \hat{\text{x}}_{10:30}$}\ \ \ &\multicolumn{2}{c}{$\text{x}_{0:10} \rightarrow \hat{\text{x}}_{10:50}$}\ \ \ \\
 &  & SSIM & PSNR & SSIM & PSNR \\
\midrule
Deterministic \ & 2D ConvLSTM \cite{convlstm} & 0.712 & 0.639 & - & - \\ % 2.833082
& PredRNN++ \cite{wang-predrnn} & 0.865 & 0.741 & - & - \\ % 15390160
& E3D-LSTM \cite{wang-e3d} & 0.879 & 0.810 & - & - \\ % 38696497, 41940673
\midrule
Stochastic & Variational 2D ConvLSTM \cite{vrnn} & - & - & - & - \\ % 2856122
& Ours & 0.863 & 0.850 & - & - \\ %12853578
\bottomrule
\end{tabular}
\caption{Results on the KTH action dataset when predicting 20 timesteps into the future i.e. $\hat{\text{x}}_{10:30}$ and 40 timesteps into the future o.e. i.e. $\hat{\text{x}}_{10:50}$. The metrics are computed frame-wise. Higher SSIM and PSNR scores indicate better results.}
\label{table:quantitativekth}
\end{table}

\end{document}

Respuesta2

Dado que una columna obtiene su ancho del miembro más ancho, todo lo que necesita es forzar el ancho de cualquier miembro para que tenga un ancho determinado. \makebox[width][c]{text} hará eso.

\documentclass{standalone}
\usepackage{amsmath}
\usepackage{multirow}
\begin{document}

\begin{tabular}{llcccc}
\hline\noalign{\smallskip}
\multirow{2}{*}{Type} & \multirow{2}{*}{Model} & \multicolumn{2}{c}{$\text{x}_{0:10} \rightarrow \hat{\text{x}}_{10:30}$}\ \ \ &\multicolumn{2}{c}{$\text{x}_{0:10} \rightarrow \hat{\text{x}}_{10:50}$}\ \ \ \\
 &  & \makebox[2cm]{SSIM} & \makebox[2cm]{PSNR} & SSIM & PSNR \\
\noalign{\smallskip}
\hline
\noalign{\smallskip}
Deterministic \ & 2D ConvLSTM \cite{convlstm} & 0.712 & 0.639 & - & - \\ % 2.833082
& PredRNN++ \cite{wang-predrnn} & 0.865 & 0.741 & - & - \\ % 15390160
& E3D-LSTM \cite{wang-e3d} & 0.879 & 0.810 & - & - \\ % 38696497, 41940673
\noalign{\smallskip}
\hline
\noalign{\smallskip}
Stochastic & Variational 2D ConvLSTM \cite{vrnn} & - & - & - & - \\ % 2856122
& Ours & 0.863 & 0.850 & - & - \\ %12853578
\noalign{\smallskip}
\hline
\end{tabular}

\end{document}

información relacionada