xwidget
support.
If you are on mac OS, you can use brew
to install it.
brew tap d12frosted/homebrew-emacs-plus
brew install emacs-plus --HEAD --with-xwidgets
On Linux, you can build Emacs from git Repository.
git clone --depth 1 --branch emacs-27 https://github.com/emacs-mirror/emacs.git
cd emacs
./autogen.sh
./configure --with-modules --with-xwidgets
make -j4
sudo make install
use-package
(use-package webkit-katex-render
:init
;; if you use doom-emacs
(setq webkit-katex-render--background-color (doom-color 'bg))
;; if you want to set a different path to the html client
(setq webkit-katex-render--client-path "PATH/TO/CLIENT.html")
;; if you want to add your customized ~math-at-point~ function
(setq webkit-katex-render--math-at-point-function 'function))
- My config for
doom-emacs
(def-package! webkit-katex-render :load-path "~/Source/playground/emacs-webkit-katex-render"
:commands (webkit-katex-render-mode)
:config
(setq webkit-katex-render--background-color (doom-color 'bg)))
M-x webkit-katex-render-mode
to start the minor mode- Move your cursor to a latex fragment (in either org mode or latex-mode)
- Try look around and type equations!