I'd like to be able to select a specific cell in an org-mode table and add a background color to that cell for a pdf export. Such that

| This Cell is formatted normally | This cell is greyed a bit|
| This cell is greyed as well     | This cell is white again |

Getting inspiration from this answer, the following works. You must install the xcolor package as instructed there.

#+LATEX_HEADER: \usepackage[table]{xcolor}

* table test

| hi   | there                              |
| this | @@latex:\cellcolor{blue!25}@@ that |
| one  | two                                |
  • 1
    This in fact works for me without the need for @@latex: ... @@ Simply adding \cellcolor{blue!25} to the cells results in colored cells in the export. Excellent
    – Metropolis
    Feb 23 '18 at 19:03
  • 1
    Instead of using \usepackage[table]{xcolor}, \usepackage{xcolor,colortbl} solves the background issue for me in org mode 9.3.7 Sep 20 '20 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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