![메이크셀 내부에 수직으로 균일하게 간격을 둔 선](https://rvso.com/image/392342/%EB%A9%94%EC%9D%B4%ED%81%AC%EC%85%80%20%EB%82%B4%EB%B6%80%EC%97%90%20%EC%88%98%EC%A7%81%EC%9C%BC%EB%A1%9C%20%EA%B7%A0%EC%9D%BC%ED%95%98%EA%B2%8C%20%EA%B0%84%EA%B2%A9%EC%9D%84%20%EB%91%94%20%EC%84%A0.png)
회전된 헤더가 있는 테이블이 있고 makecells
나중에 회전된 헤더를 한 줄에 맞추기 위한 테이블이 있습니다.
\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}
makecells
의 텍스트를 셀 중앙에 배치하는 대신 수직으로 균일한 간격으로 배치하고 싶습니다 . 이 작업을 수행하는 쉬운 방법이 있나요?
답변1
내가 원하는 것이 무엇인지 잘 이해했다면 \rotatebox[origin=c]
다음 작업을 수행합니다.
\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}