答案1
通常,你应该先展示你迄今为止尝试过的方法,因为这样更容易找到适合你需求的答案。但由于今天是降临节的第二个星期日,我感到很慷慨。也许你可以尝试这样的方法:
\documentclass[border=10pt]{standalone}
\usepackage{nicematrix, tikz}
\usetikzlibrary{fit}
\pgfset{
nicematrix/cell-node/.append style={
minimum size=2em,
}
}
\begin{document}
\begin{NiceTabular}{ *{6}{c} }[create-medium-nodes]
\Block[draw]{2-2}{\diagbox
{\scriptsize $Q_3(t)$ \\ $Q_2(t)$}
{\scriptsize $Q_1(t)$ \\ $Q_0(t)$}} & & & & \\
& & 00 & 01 & 11 & 10 \\
& 00 & 1 & & & \\
& 01 & & 1 & & 1 \\
& 11 & & 1 & $\ast$ & $\ast$ \\
& 10 & & 1 & & 1 \\
\CodeAfter
\begin{tikzpicture}[
round fit/.style 2 args={
name suffix=-medium,
draw,
rounded corners,
fit={#1},
inner sep={-4pt+#2}
}
]
\draw (2-|3) -- (2-|7) -- (7-|7) -- (7-|2) -- (3-|2)
(3-|3) -- (3-|7)
(4-|2) -- (4-|7)
(5-|2) -- (5-|7)
(6-|2) -- (6-|7)
(3-|3) -- (7-|3)
(2-|4) -- (7-|4)
(2-|5) -- (7-|5)
(2-|6) -- (7-|6);
\node[round fit={(3-3)}{0pt}] {};
\node[round fit={(4-4) (5-4)}{0pt}] {};
\node[round fit={(5-4) (6-4)}{2pt}] {};
\node[round fit={(4-6) (5-6)}{0pt}] {};
\node[round fit={(5-6) (6-6)}{2pt}] {};
\end{tikzpicture}
\end{NiceTabular}
\end{document}