项目时间表

项目时间表

我需要为学校项目制定时间表。时间表必须包括我们小组的三名成员在特定时间内要做什么,就像这样:f在此处输入图片描述

答案1

如果您愿意,只需使用tabular或。tabularx

\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{tabularx}
\begin{document}
  \begin{tabularx}{\textwidth}{|l*{3}{|>{\raggedright\arraybackslash}X}|}\hline
       & Alice & Bob & Chris \\\hline
       October & \multicolumn{2}{c|}{Read books} & Start Programing \\\hline
       November & \multicolumn{3}{c|}{\cellcolor{green}Holidays}\\\hline
       December & Read a book & Write a chapter & Programing\\\hline
  \end{tabularx}
\end{document}

在此处输入图片描述

也可以使用以下方式加入列multirow

\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{tabularx}
\usepackage{multirow}
\begin{document}
  \begin{tabularx}{\textwidth}{|l*{3}{|>{\raggedright\arraybackslash}X}|}\hline
       & Alice  & Bob                             & Chris \\\hline
       October  & \multicolumn{2}{c|}{Read books} & Start Programing \\\hline
       November & \multicolumn{3}{c|}{\cellcolor{green}Holidays}\\\hline
       December & \cellcolor{red}                                & Write a chapter & Programing\\\cline{1-1}
       January &  \multirow{-2}{*}{\cellcolor{red}Read a book}    & Write a chapter & Programing\\\hline
  \end{tabularx}
\end{document}

在此处输入图片描述

您也可以将多行和多列进行组合。

\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{tabularx}
\usepackage{multirow}
\begin{document}
  \begin{tabularx}{\textwidth}{|l*{3}{|>{\raggedright\arraybackslash}X}|}\hline
       & Alice  & Bob                             & Chris \\\hline
       October  & \multicolumn{2}{c|}{Read books} & Start Programing \\\hline
       November & \multicolumn{3}{c|}{\cellcolor{green}Holidays}\\\hline
       December & \multicolumn{2}{c|}{\cellcolor{red}} & Programing\\\cline{1-1}
       January &  \multicolumn{2}{c|}{\multirow{-2}{*}{\cellcolor{red}Read a book}}     & Programing\\\hline
  \end{tabularx}
\end{document}

在此处输入图片描述

相关内容