4

We are using XeLaTeX and the longtable package to visualize information, one of those reports must have a colored cell. A single cell, not the entire row.

An example output is here: Example of the colored cell

Is there a way to color a single cell when using long tables?

Update: example code:

\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 Answers1

7
\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}

enter image description here