我该如何创建下表?

我该如何创建下表?

第一张桌子

第二张桌子

我想知道如何在乳胶中创建这样的表格。谢谢!

答案1

为了好玩,我使用了\fcolorboxes 和\fboxes 的堆栈。

\documentclass{article}
\usepackage{xcolor,stackengine}
\begin{document}
\fboxsep=-.5pt\relax\fboxrule=1pt\relax
\ensurestackMath{\Longunderstack{m_1 m_2 m_3 m_4}} \fbox{%
\fboxrule=.5pt\fboxsep=2.5pt\relax
\Longunderstack[l]{\fcolorbox{black}{gray}{\textcolor{white}{\makebox[106pt]{124}}} {} {} \,M}%
\Longunderstack{{} \fcolorbox{black}{gray}{\textcolor{white}{\makebox[10pt]{8}}}}%
\Longunderstack{{} {} \fcolorbox{black}{gray}{\textcolor{white}{\makebox[8pt]{6}}}}%
\Longunderstack{{} {} {} \fcolorbox{black}{gray}{\textcolor{white}{\makebox[8pt]{6}}}}%
}\par
\bigskip
\ensurestackMath{\Longunderstack{m_1 m_2 m_3 m_4}} \stackunder{\fbox{%
\fboxrule=.5pt\fboxsep=2.5pt\relax
\Longunderstack[l]{\fcolorbox{black}{gray}{\textcolor{white}{\makebox[33pt]{36}}} {} {} \,M$'$}%
\Longunderstack{{} \fcolorbox{black}{gray}{\textcolor{white}{\makebox[33pt]{36}}}}%
\Longunderstack{{} {} \fcolorbox{black}{gray}{\textcolor{white}{\makebox[33pt]{36}}}}%
\Longunderstack{{} {} {} \fcolorbox{black}{gray}{\textcolor{white}{\makebox[33pt]{36}}}}%
}}{$N=500$ samples}
\end{document}

在此处输入图片描述

相关内容