Tamaño de la mesa y alineación vertical

Tamaño de la mesa y alineación vertical

Quiero agrandar mi tabla y hacer que todas las entradas de la tabla se alineen verticalmente.

Este es mi código:

\begin{table}[h]
\caption{My Table}
\centering
    \begin{tabular}{c|c|c|c|c}
        \hline
        \multirow{2}{*}{} & \multicolumn{2}{c|}{A} & \multicolumn{2}{c}{B} \\\cline{2-5}
          & type1 & type2 & type1 & type2 \\\hline
        a & xx    & xx    & xx    & xx    \\\hline
        b & xx    & xx    & xx    & xx    \\\hline
        c & xx    & xx    & xx    & xx    \\\hline      
    \end{tabular}
\end{table}

Aquí está el resultado:

ingrese la descripción de la imagen aquí

Respuesta1

Quizás la solución más sencilla sea utilizar pestañas en lugar de tener líneas verticales y horizontales:

\documentclass{article}
\usepackage{multirow}
\usepackage{booktabs}
\begin{document}
\begin{table}[h]\large
\caption{My Table}
\centering
    \begin{tabular}{ccccc}
        \toprule
        \multirow{2}{*}{} & \multicolumn{2}{c}{A} & \multicolumn{2}{c}{B} \\
          & type1 & type2 & type1 & type2 \\ \midrule
        a & xx    & xx    & xx    & xx    \\
        b & xx    & xx    & xx    & xx    \\
        c & xx    & xx    & xx    & xx    \\ \bottomrule
    \end{tabular}
\end{table}
\end{document}

imagen de mesa

información relacionada