我想创建一个像这样的表
目前,我正在阅读此帖子如何旋转多行表中的文本?但我不知道如何按照上述方法去做。
答案1
这是一个开始。希望它能有所帮助。根据@WojciechMorawiec 的建议进行了更新。
\documentclass{article}
\usepackage{array,multirow,graphicx}
\begin{document}
\begin{table}[h]
\begin{tabular}{|c|c|c|c|}
\hline
\multicolumn{1}{|c|}{label01} & \multicolumn{3}{c|}{label02} \\ \hline
\parbox[t]{2mm}{\multirow{4}{*}{\rotatebox[origin=c]{90}{some text}}} & \multicolumn{1}{c|}{\multirow{2}{*}{item 1}} & description & description \\ \cline{3-4}
& & description & description \\ \cline{2-4}
& \multirow{2}{*}{item 2} & description & description \\ \cline{3-4}
& & description & description \\ \hline
\parbox[t]{2mm}{\multirow{4}{*}{\rotatebox[origin=c]{90}{some text}}} & \multirow{2}{*}{item 1} & description & description \\ \cline{3-4}
& & description & description \\ \cline{2-4}
& \multirow{2}{*}{item 2} & description & description \\ \cline{3-4}
& & description & description \\ \hline
\end{tabular}
\end{table}
\end{document}
答案2
与。{NiceTabular}
nicematrix
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\begin{NiceTabular}{cccc}[hvlines]
label01 & \Block{1-3}{label02} \\
\Block{4-1}{\rotate some text} & \Block{2-1}{item 1} & description & description \\
& & description & description \\
& \Block{2-1}{item 1} & description & description \\
& & description & description \\
\Block{4-1}{\rotate some text} & \Block{2-1}{item 1} & description & description \\
& & description & description \\
& \Block{2-1}{item 1} & description & description \\
& & description & description \\
\end{NiceTabular}
\end{document}