Linhas uniformemente espaçadas verticalmente dentro da makecell

Linhas uniformemente espaçadas verticalmente dentro da makecell

Eu tenho uma tabela com um cabeçalho girado e algumas makecellsdepois para ajustar o cabeçalho girado em uma linha:

\documentclass{article}
\usepackage{makecell}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{rotating}

\renewcommand\theadfont{\normalsize}

\begin{document}
\begin{table}[t]
\centering
\begin{tabular}{cccc}
    \toprule
     & & \multicolumn{2}{c}{\textbf{Condition A}} \\
     & & A1 & A2 \\
    \cmidrule{3-4}
    \settowidth\rotheadsize{\theadfont \textbf{Condition B}}
    \rothead{\textbf{Sampling}} & \makecell{B1 \\ B2} & \makecell{xx/xx \\ xx/xx} & \makecell{xx/xx \\ xx/xx} \\
    \bottomrule
\end{tabular}
\caption{Results under different conditions}
\end{table}
\end{document}

Gostaria que o texto makecellsfosse espaçado verticalmente na célula, em vez de centralizado no meio. Existe uma maneira fácil de fazer isso?

Responder1

Se entendi bem o que você quer, \rotatebox[origin=c]o trabalho é:

\documentclass{article}
\usepackage{makecell}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{rotating}

\renewcommand\theadfont{\normalsize}

\begin{document}

\begin{table}[t]
\centering
\renewcommand{\cellset}{\renewcommand{\arraystretch}{1.6}}
\begin{tabular}{cccc}
    \toprule
     & & \multicolumn{2}{c}{\textbf{Condition A}} \\
     & & A1 & A2 \\
    \cmidrule{3-4}
   \rotatebox[origin=c]{90}{\textbf{Sampling}} & \makecell{B1 \\ B2} & \makecell{xx/xx \\ xx/xx} & \makecell{xx/xx \\ xx/xx} \\
    \bottomrule
\end{tabular}
\caption{Results under different conditions}
\end{table}

\end{document} 

insira a descrição da imagem aqui

informação relacionada