From d45da2cce12b4defa12ae61f7deecb405da008de Mon Sep 17 00:00:00 2001 From: BardofSprites <89086143+BardofSprites@users.noreply.github.com> Date: Fri, 26 Dec 2025 18:20:21 -0500 Subject: add symbols in org-cdlatex --- bard-elisp/bard-writing.el | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'bard-elisp/bard-writing.el') diff --git a/bard-elisp/bard-writing.el b/bard-elisp/bard-writing.el index 1733ed7..cd742de 100644 --- a/bard-elisp/bard-writing.el +++ b/bard-elisp/bard-writing.el @@ -224,4 +224,27 @@ saved or killed at the end of `denote-sequence-region'." (format "* Tasks for %s\n\n* Notes for today" (format-time-string "%Y-%m-%d (%a)"))) +;; Taken from: https://stackoverflow.com/a/75314192 +(defun add-multiple-into-list (lst items) + "Add each item from ITEMS into LST." + (dolist (item items) + (add-to-list lst item))) + +(defun bard/cdlatex-add-math-symbols () + "Add functions into list." + (add-multiple-into-list + 'cdlatex-math-symbol-alist-comb + '((?V "\\vec")))) + +(define-minor-mode bard/org-math-mode + "Enable features to write math in `org-mode'." + :init-value nil + :lighter " S=" + :global nil + (org-fragtog-mode t) + (org-cdlatex-mode t) + (electric-pair-local-mode t) + (bard/cdlatex-add-math-symbols)) + + (provide 'bard-writing) -- cgit v1.2.3