![如何为长表中的单个单元格着色](https://linux22.com/image/292388/%E5%A6%82%E4%BD%95%E4%B8%BA%E9%95%BF%E8%A1%A8%E4%B8%AD%E7%9A%84%E5%8D%95%E4%B8%AA%E5%8D%95%E5%85%83%E6%A0%BC%E7%9D%80%E8%89%B2.png)
我们使用 XeLaTeX 和 longtable 包来可视化信息,其中一个报告必须有一个彩色单元格。单个单元格,而不是整行。
示例输出如下:
使用长表格时,有没有办法为单个单元格着色?
更新:示例代码:
\documentclass[10pt,a4paper,onside,article,notitlepage, landscape]{memoir}
\begin{document}
\vspace*{-4cm}
\section*{Leverlijst per week}
\begin{longtable}{p{2cm}p{4cm} p{2cm}p{2cm} p{4cm}p{4cm} p{2cm}p{3cm}}
Order ID & Referentie & Locatie & Klant & Tekeningnummer & Omschrijving & Leverdatum & Status \\ \hline
1234 & REFERENCE & Location & Client & Drawingnumber & Description & Deliveryday & Status
\end{longtable}
\end{document}
答案1
\documentclass[10pt,a4paper,onside,article,notitlepage, landscape]{memoir}
\usepackage[table]{xcolor}
\usepackage{longtable}
\begin{document}
\begin{longtable}{*8l}
\rowcolor{blue!80!red!40}
Order ID & Referentie & Locatie & Klant & Tekeningnummer & Omschrijving & Leverdatum & Status \\ \hline
1234 & REFERENCE & Location & Client & Drawingnumber & Description & Deliveryday &
\cellcolor{red}Status
\end{longtable}
\end{document}