8

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 |

1 Answer 1

9

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                                |
2
  • 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, 2018 at 19:03
  • 2
    Instead of using \usepackage[table]{xcolor}, \usepackage{xcolor,colortbl} solves the background issue for me in org mode 9.3.7 Sep 20, 2020 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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