[[./prettify-math-demo.gif]]
It's base on mathjax, refer mathjax for math formula related stuffs. Default math formula delimiters: | ~`~ | inline asciimath | | ~``~ | block asciimath | | ~$~ | inline latex | | ~$$~ | block latex |
** Prerequisite ~nodejs~ - used to run mathjax, if not available simple installation refer: [[https://nodejs.dev/download/package-manager][Installing Node.js]]
** Installation *** via straight.el
(straight-use-package '(prettify-math :host nil :repo "https://github.com/shaqtsui/prettify-math" :files (:defaults "mathjax-jsonrpc.js")))
*** or from ~melpa~
add melpa in init.el if not available
(require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) (package-initialize)
command: ~M-x package-refresh-contents RET~ ~M-x package-install RET prettify-math RET~
** Usage Enable in current buffer: ~M-x prettify-math-mode RET~, or globally: ~M-x global-prettify-math-mode RET~.
** Customization *** Customize ~prettify-math-default-scale~ for formula scale
*** Set delimiter before this module loaded. Code example in init.el:
(setq prettify-math-delimiters-alist '(("$" tex) ("$$" tex block) (("\(" . "\)") tex block) ("`" asciimath) ("``" asciimath block))) (require 'prettify-math)
** Compare with existing similar packges *** Existing similar packages:
*** why prettify-math: