6

This question already has an answer here:

I would like to highlight the first row in a table, starting with "Date"

Here is a screenshot of the table in question:

Table with no highlighted rows

marked as duplicate by Werner, user31729, Jesse, Ruben, Masroor Nov 29 '14 at 7:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – jub0bs Nov 28 '14 at 16:25
  • 3
    What kind of highlighting do you have in mind? – egreg Nov 28 '14 at 16:28
  • I was thinking of gray. I tried the following \rowcolor[lightgray]{0.8} somehow it didn't work. – user2501165 Nov 28 '14 at 16:31
15

This requires the xcolor package, its table option and the \rowcolor command.

From my point of view, there are too many lines in this table, but... well, it's the OP's design...

\documentclass[twoside]{article}
\usepackage[table,x11names]{xcolor}


\begin{document}
\begin{center}
\begin{tabular}{|*{4}{l|}}
\hline
\rowcolor{lightgray} Date & Time & Instruction & Design \tabularnewline
 & & & \tabularnewline
\hline
 & & & \tabularnewline
\hline
 & & & \tabularnewline
\hline
\end{tabular}
\end{center}
\end{document}

Example table with colored rows

  • To avoid option conflicts in a Beamer document, I used \usepackage{xcolor,colortbl}. – Matthias Braun Sep 25 at 14:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.