21

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?

2 Answers 2

20

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

See the Org Manual, 11.7.4 Previewing LaTeX fragments.

3
  • 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
    Commented Feb 26, 2021 at 20:16
  • @pfincent with C-h v org-format-latex-options you can see a few options in Value some of which mention background. I have not tried to change the background but maybe some of those options could help. Commented Mar 2 at 5:06
  • @pfincent for example this answer looks like it could help ( I just saw the code I did not test it) emacs.stackexchange.com/a/74196/43678 Commented Mar 2 at 5:25
30

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.

2
  • 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) Commented May 10, 2021 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
    Commented Jan 15, 2022 at 13:51

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.