制作带有特殊标题的表格

制作带有特殊标题的表格

我可以使用什么包来制作看起来像这样的表格?

在此处输入图片描述

答案1

当我在制定解决方案时,David 发布了这篇文章,我的解决方案与他的非常相似。以下是我的贡献:

\documentclass{article}

\usepackage{colortbl}
\usepackage{MnSymbol}

\begin{document}
\sffamily

% --- define colors
\definecolor{dark}{rgb}{0.5,0.5,0.5}
\definecolor{light}{rgb}{0.75,0.75,0.75}

% --- define two types of colored columns that contain bullets
\newcolumntype{A}{>{\columncolor{dark}}c}
\newcolumntype{B}{>{\columncolor{light}}c}

% --- symbols in the columns containing bullets
\newcommand\arrow{\small$\filledmedtriangledown$}
\newcommand\yes{$\bullet$}
\newcommand\blackyes{\cellcolor{black}\color{white}\yes}

% --- counters for automatic numbering
\newcounter{tablepart}
\newcounter{tableitem}[tablepart]

% --- commands for text corresponding entries
\newcommand\tablepart[1]{\stepcounter{tablepart}\textbf{Part \arabic{tablepart}. #1}}
\newcommand\tableitem[1]{\stepcounter{tableitem}\makebox[16pt][r]{\arabic{tableitem}} #1}

% --- the table
\tabcolsep=2pt
\begin{tabular}{ABAp{10cm}}
& \multicolumn{3}{>{\columncolor{dark}}l}{\color{white}  Property 1} \\
& & \multicolumn{2}{>{\columncolor{light}}l}{Property 2} \\
\arrow & & & \multicolumn{1}{>{\columncolor{dark}}l}{\color{white} Property 3} \\
& \arrow & & \\
& & \arrow & \tablepart{Introduction} \\
\yes & \yes & & \tableitem{Step one} \\
\hline
\yes & \blackyes & \yes & \tableitem{Step two} \\
\hline
\yes & \blackyes & \blackyes & \tableitem{Step three} \\
\hline
& & \\
& & & \tablepart{Conclusion} \\
\yes & \yes & & \tableitem{Step one} \\
\hline
\yes & & \yes & \tableitem{Step two} \\
\hline
\blackyes & & \yes & \tableitem{Step three} \\
\hline
\end{tabular}

\end{document}

答案2

这可能会帮助你入门:

在此处输入图片描述

\documentclass{article}

\usepackage{colortbl}

\begin{document}

\begin{tabular}{
>{\columncolor[gray]{0.3}}l
>{\columncolor[gray]{0.9}}l
ll}
\multicolumn{4}{>{\columncolor[gray]{0.3}}l}{\color{white}Something}\\
a&\multicolumn{3}{>{\columncolor[gray]{0.9}}l}{\color{black}Something Else}\\
a&b&c&d\\
a&b&c&d\\
a&b&c&d\\
\end{tabular}
\end{document}

相关内容