I am using Emacs + orgmode to write text and latex equations. The preview within orgmode (with C-c C-x C-l) works well for latex equations. However, I noticed that if I display a latex table within orgmode, it uses a black font color, so it is almost invisible in a dark background (screenshot below).

enter image description here

Question: Is it possible to change the font color for previewed tables to be the same as the font color for latex math?


You can tweak this by customizing the variable org-format-latex-options. In particular, set the :foreground option to auto to match the text face, or default to match the default face.

| improve this answer | |
  • Hey Tyler, thanks for the suggestion, but it does not seem to work. Changing to :foreground auto and previewing the table leads to the error Invalid face. The weird thing is that the color is correct for math equations ($...$ and \begin{align}...\end{align}), but not for tables (\begin{table}...\end{table}). – Guilherme Salomé Jul 4 '18 at 22:09
  • I have tried this multiple times again, and also changing my init.el, but still no success. – Guilherme Salomé Aug 31 '19 at 21:03
  • Sorry for the slow response. You're right - the settings seem to work only for equations, not tables. As far as I can tell org handles equations and tables exactly the same, but for some reason the dvipng program doesn't apply the color setting to tables. – Tyler Sep 5 '19 at 16:37

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.