19

I love the ability to preview LateX fragments in Org-mode. With two easy shortcuts one can turn them on and off on-demand:

  • Turning previewing ON: C-c C-x, C-l
  • Turning previewing OFF: C-c C-c

One problem I encounter often is that the preview has a small font size. Is there any way to control it?

Amelio Vazquez-Reina
  • 5,157
  • 4
  • 32
  • 47

2 Answers2

28

Expanding Constantine's answer.

You can use C-h v org-format-latex-options RET to understand what can be changed in this variable. One of the options is the scale. In the help page in Emacs you can click to change the value of the scale to 2.0, for example, so that the equations look bigger when you run C-c C-x C-l.

Alternatively, you can add the following to your init.el file:

(setq org-format-latex-options (plist-put org-format-latex-options :scale 2.0))

Which also increases the scale.

  • 1
    Don't know if others are having this issue, but it doesn't work using this elisp snippet. I have this in my setup, which works for me: `(after! org (plist-put org-format-latex-options :scale 1.75)` – Edward Grefenstette May 10 '21 at 16:14
  • @EdwardGrefenstette minor addition: you're going to need an extra closing parenthesis at the end of your code snippet, otherwise Emacs reports an end-of-line error – pfincent Jan 15 '22 at 13:51
20

You can customize the variable org-format-latex-options to increase :scale.

See the Org Manual, 11.7.4 Previewing LaTeX fragments.

Constantine
  • 9,072
  • 1
  • 34
  • 49
  • Do you know whether there is a way to change the background color of the latex fragments? It's slightly different from my Emacs background color, which bugs me out a bit... – pfincent Feb 26 '21 at 20:16