我想减少表格中所有单元格的行距,并且还想使用选项p{5cm}
(表格的第一列)在单元格中左对齐。我知道我应该使用 进行调整\setlength{\baselineskip}{1\baselineskip}
,但不知道应该将代码放在哪里。有人能给我提示吗?我有以下代码:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath, amsfonts, amssymb, amsbsy, array}
\usepackage{multicol, multirow}
\usepackage[table]{xcolor}
\usepackage{tabularx}
\definecolor{Gray}{gray}{0.85}
\definecolor{LightCyan}{rgb}{0.88,1,1}
\definecolor{bleudefrance}{rgb}{0.19, 0.55, 0.91}
\definecolor{airforceblue}{rgb}{0.36, 0.54, 0.66}
\definecolor{americanrose}{rgb}{1.0, 0.01, 0.24}
\definecolor{battleshipgrey}{rgb}{0.52, 0.52, 0.51}
\definecolor{ao}{rgb}{0.0, 0.0, 1.0}
\begin{document}
\begin{table}[h]
\caption{Ph.D. timeline}
\begin{tabular}{|p{5cm}|c|c|c|c|c|c|c|c|c|c|}
\hline
\multirow{2}{*}{\bf{Task and Activities}}&\multicolumn{4}{|c|}
{\cellcolor{bleudefrance}\textcolor{white}{\bf{2020}}} &\multicolumn{4}{|c|}
{\cellcolor{bleudefrance}\textcolor{white}{\bf{2021}}}& \multicolumn{2}{|c|}
{\cellcolor{bleudefrance}\textcolor{white}{\bf{2022}}} \\ \cline{2-11}
&Q1 &Q2 &Q3 &Q4 &Q1 &Q2 &Q3 &Q4 &Q1 &Q2 \\ \cline{1-11}
Dissertation Design Seminar & & \cellcolor{americanrose} & && && & & & \\ \cline{1-11}
Data collection & & \cellcolor{battleshipgrey} &\cellcolor{battleshipgrey}& & & & & & & \\
\cline{1-11}
Data cleaning \& Analysis & & &&\cellcolor{battleshipgrey} & & & & & & \\ \cline{1-11}
Post fieldwork seminar & & && & \cellcolor{americanrose}& & & & & \\ \cline{1-11}
Finalizing $2^{nd}$ chapter & &\cellcolor{battleshipgrey}&\cellcolor{battleshipgrey}&& & & & & &
\\ \cline{1-11}
Conference papers/ Draft chapters & & & & & &\cellcolor{ao}& & & & \\ \cline{1-11}
Finalizing $3^{rd}$ and $4^{th}$ chapters & & & &
&\cellcolor{battleshipgrey}&\cellcolor{battleshipgrey}& & & & \\ \cline{1-11}
Writing introduction and conclusion & & & & &&&\cellcolor{battleshipgrey}& & & \\ \cline{1-11}
Full draft seminar & & & & &&&&\cellcolor{americanrose}& & \\ \cline{1-11}
Submission of the thesis & & & & &&&&&\cellcolor{americanrose} & \\ \cline{1-11}
Defense the thesis & & & & &&&&& &\cellcolor{americanrose} \\ \cline{1-11}
\hline
\end{tabular}
\end{table}
\end{document}