Function: markdown-toggle-math
markdown-toggle-math is an interactive and byte-compiled function
defined in markdown-mode.el.
Signature
(markdown-toggle-math &optional ARG)
Documentation
Toggle support for inline and display LaTeX math expressions.
With a prefix argument ARG, enable math mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/markdown-mode-20260321.143/markdown-mode.el
(defun markdown-toggle-math (&optional arg)
"Toggle support for inline and display LaTeX math expressions.
With a prefix argument ARG, enable math mode if ARG is positive,
and disable it otherwise. If called from Lisp, enable the mode
if ARG is omitted or nil."
(interactive (list (or current-prefix-arg 'toggle)))
(setq markdown-enable-math
(if (eq arg 'toggle)
(not markdown-enable-math)
(> (prefix-numeric-value arg) 0)))
(if markdown-enable-math
(font-lock-add-keywords
'markdown-mode markdown-mode-font-lock-keywords-math)
(font-lock-remove-keywords
'markdown-mode markdown-mode-font-lock-keywords-math))
(when (called-interactively-p 'interactive)
(message "markdown-mode math support %s" (if markdown-enable-math "enabled" "disabled")))
(markdown-reload-extensions))