![删除表格中多行单元格之间的非颜色空间](https://linux22.com/image/433212/%E5%88%A0%E9%99%A4%E8%A1%A8%E6%A0%BC%E4%B8%AD%E5%A4%9A%E8%A1%8C%E5%8D%95%E5%85%83%E6%A0%BC%E4%B9%8B%E9%97%B4%E7%9A%84%E9%9D%9E%E9%A2%9C%E8%89%B2%E7%A9%BA%E9%97%B4.png)
我正在使用 rmarkdown 创建一个包含多个彩色单元格且一些单元格分成多行的长表:
---
header-includes:
- \usepackage{pdflscape}
- \usepackage{longtable}
- \usepackage{colortbl}
- \usepackage{multirow}
output:
pdf_document:
latex_engine: xelatex
---
\begin{landscape}
\centering
\footnotesize
\setlength{\tabcolsep}{2pt}
\begin{longtable} {p{0.08\linewidth} >{\raggedright}p{0.1\linewidth} p{0.05\linewidth} p{0.04\linewidth} p{0.05\linewidth} >{\raggedright}p{0.08\linewidth} >{\raggedright}p{0.1\linewidth}p{00.06\linewidth} p{0.06\linewidth}p{0.06\linewidth}p{0.06\linewidth} p{0.12\linewidth}p{0.12\linewidth}}
First author, Year & Population & Mean age & Participants (n) & Follow up (years) & Analysis & Outcome & 1st & 2nd & 3rd & 4th & Other significant & Non-significant \\
\multirow{3}{*}{Ryu 2009} & \multirow{3}{*}{Men, age
30-59} & \multirow{3}{*}{37} & \multirow{3}{*}{10685} & \multirow{3}{*}{3.8} & \multirow{3}{*}{} & \multirow{3}{0.1\linewidth}{Incident
CKD (eGFR60)} & {\cellcolor[rgb]{0.706,0.561,1}} & {\cellcolor[rgb]{0.706,0.561,1}} & \multirow{3}{*}{~} & \multirow{3}{*}{~} & \multirow{3}{*}{HOMA-IR} & {\cellcolor[rgb]{1,1,0.4}}\textit{Obesity} \\
& & & & & & & {\cellcolor[rgb]{0.706,0.561,1}} & {\cellcolor[rgb]{0.706,0.561,1}} & & & & {\cellcolor[rgb]{1,0.498,0.38}}\textit{Hypertension} \\
& & & & & & & \multirow{-3}{*}{{\cellcolor[rgb]{0.706,0.561,1}}Low HDL} & \multirow{-3}{*}{{\cellcolor[rgb]{0.706,0.561,1}}Triglycerides} & & & & {\cellcolor[rgb]{0.675,0.957,0.635}}\textit{Fasting glucose} \\
\end{longtable}
\end{landscape}
我如何去除多行单元格(在本例中为包含“低 HDL”和“甘油三酯”的单元格)之间的空格,以使它们的颜色看起来不间断?