答案1
与。{NiceTabular}
nicematrix
\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\renewcommand{\arraystretch}{1.6}
\begin{NiceTabular}{ccccccc}[hvlines]
\CodeBefore
\rowcolor[gray]{0.9}{1,2}
\columncolor[gray]{0.9}{1,2}
\Body
\Block{2-2}{\diagbox{$\xi_\omega$}{$\Delta\xi_\omega$}} && \Block{1-*}{error signal} \\
&& NL & NS & ZE & PS & PL \\
\Block{4-1}<\rotate>{Change in Speed} & NL & NL & NL & NM & NS & ZE \\
& NL & NL & NL & NM & NS & ZE \\
& NL & NL & NL & NM & NS & ZE \\
& NL & NL & NL & NM & NS & ZE \\
\end{NiceTabular}
\end{document}
您需要多次编译(因为nicematrix
在后台使用 PGF/Tikz 节点)。
答案2
\documentclass{standalone}
\usepackage{tabularray,graphicx,xcolor}
\UseTblrLibrary{diagbox}
\begin{document}
\begin{tblr}{
cells = {c},
row{1,2} = {gray8},
column{1,2} = {gray8},
cell{1}{1} = {r=2,c=2}{mode=math},
cell{1}{3} = {c=5}{},
cell{3}{1} = {r=4}{},
hlines, vlines,
vspan=even, hspan=even,
belowsep=0pt,
}
\diagbox{\xi_\omega}{\Delta\xi_\omega} && error signal &&&& \\
&& NL & NS & ZE & PS & PL \\
\rotatebox{90}{Change in Speed} & NL & NL & NL & NM & NS & ZE \\
& NL & NL & NL & NM & NS & ZE \\
& NL & NL & NL & NM & NS & ZE \\
& NL & NL & NL & NM & NS & ZE \\
\end{tblr}
\end{document}