Tunning org-latex-preview-impatient in Emacs

Posted on June 22, 2025
Tags:

Table of Contents

  1. Installation
  2. Org-latex-preview-impatient preview
    1. Inline Math
    2. Display Math
  3. Kelly Criterion
  4. Bayes’ theorem
  5. Shannon–Hartley theorem
  6. Maxwell’s equations
  7. Curvature
  8. ROI, Return on Investment
  9. Limit definition of the constant e
  10. Least squares
  11. EOQ

Installation

Declare package install in packages.el, in Doom1 for instance:

(package! org-latex-impatient
  :recipe (:host github
           :repo "yangsheng6810/org-latex-impatient"
           :branch "master"))

Add env setting of NODE_OPTIONS for avoiding failure in parsing xml when tex2svg generates svg with deprecation warning in xml:

(use-package org-latex-impatient
  :defer t
  :hook (org-mode . org-latex-impatient-mode)
  :init
  (setq org-latex-impatient-tex2svg-bin
        ;; location of tex2svg executable
        (file-truename "~/node_modules/mathjax-node-cli/bin/tex2svg"))
  (setenv "NODE_OPTIONS" "--no-deprecation")
  (setq max-image-size nil))

Org-latex-preview-impatient2 preview

Open a .org file and insert content like following latex segements, then enable org-latex-impatient-mode by M-x org-latex-impatient-mode . img

Inline Math

We are aware that the solutions to ax2 + bx + c = 0 are $x_{1},x_{2} = \frac{-b \pm \sqrt{b^{2} - 4ac}}{2a}$

Display Math

$$x_{1},x_{2} = \frac{-b \pm \sqrt{b^{2} - 4ac}}{2a}$$

Kelly Criterion

Bayes’ theorem

Shannon–Hartley theorem

Maxwell’s equations

Curvature

ROI, Return on Investment

Limit definition of the constant e

Least squares

EOQ

$Q^* = \sqrt{\frac{2DS}{H}}$

Footnotes

1 https://github.com/doomemacs/doomemacs

2 https://github.com/yangsheng6810/org-latex-impatient