答案1
结合\multirow
和\multicolumn
:
\documentclass{article}
\usepackage{graphicx}
\usepackage{multirow}
\begin{document}
\begin{tabular}{|c|c|c|c|}
\hline
\multicolumn{2}{|c|}{} & \multicolumn{2}{|c|}{Managment B}\\
\cline{3-4}
\multicolumn{2}{|c|}{\multirow{-2}{*}{}} & yes & no\\
\hline
\multirow{2}{*}{\rotatebox{90}{Managment A }} & yes & 1 & 2\\[0.8cm]
\cline{2-4}
& yes & 3 & 4\\[0.8cm]
\hline
\end{tabular}
\end{document}
答案2
您的问题不清楚...提供的图像是否都是您想要在表格中呈现的内容,或者单元格中的文本是否更长,而不是所显示的单个“文本”。
假设这些单元格中的“文本”将是更长的文本,那么以下解决方案可能会对您有所帮助:
\documentclass{article}
\usepackage{rotating}
\usepackage{makecell, multirow, tabularx}
\renewcommand\theadfont{\normalsize}
\renewcommand\theadgape{}
\newcommand\mcbf[1]{\multicolumn{1}{>{\bfseries}c|}{#1}}
\usepackage{lipsum} % for dummy text
\begin{document}
\begin{table}
\centering
\sffamily
\settowidth\rotheadsize{ Management A }
\setcellgapes{3pt}
\makegapedcells
\begin{tabularx}{\linewidth}{|c|c|X|X|}
\hline
\multicolumn{2}{|c|}{}
& \multicolumn{2}{c|}{ \thead{Management B}} \\
\cline{3-4}
\multicolumn{2}{|c|}{}
& \thead{YES} & \thead{NO} \\
\hline
\multirow{10}{*}{\rothead{Management A}}
& YES & \mcbf{Group 1} & \mcbf{Group 2} \\
& & Sed feugiat. Cum sociis natoque penatibus
et magnis dis parturient montes, nascetur
ridiculus mus. & text \\
\cline{2-4}
& NO & \mcbf{Group 3} & \mcbf{Group 4} \\
& & Sed feugiat. Cum sociis natoque penatibus
et magnis dis parturient montes, nascetur
ridiculus mus. & text \\
\hline
\end{tabularx}
\end{table}
\end{document}