aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardofSprites <[email protected]>2025-12-26 18:20:21 -0500
committerBardofSprites <[email protected]>2025-12-26 18:20:21 -0500
commitd45da2cce12b4defa12ae61f7deecb405da008de (patch)
tree45c03d05e9a75ca2f7b6b4fe721ef672eb4c06bf
parent79dbaae4a966414a228ed5d3790207195606722d (diff)
add symbols in org-cdlatex
-rw-r--r--bard-elisp/bard-writing.el23
1 files changed, 23 insertions, 0 deletions
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)