summaryrefslogtreecommitdiff
path: root/org-roam-ui.el
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-12-04 11:59:52 +0100
committerGitHub <[email protected]>2021-12-04 11:59:52 +0100
commit62c1ff33b7a90a77cc3851c41c1e689b2eac4a16 (patch)
tree79c4bcb34bc4a6e0684f07124cdaac01da4e7160 /org-roam-ui.el
parentaf0a8f2365968bbafc7991304060f381f9e67316 (diff)
feat: add custom latex Macros (#180)
* fix: remove \refs from katex processes * feat: add own latex macros
Diffstat (limited to 'org-roam-ui.el')
-rw-r--r--org-roam-ui.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/org-roam-ui.el b/org-roam-ui.el
index 61b8ea6..17059fe 100644
--- a/org-roam-ui.el
+++ b/org-roam-ui.el
@@ -145,6 +145,13 @@ Take ID as string as sole argument."
:group 'org-roam-ui
:type 'hook)
+(defcustom org-roam-ui-latex-macros nil
+ "Alist of LaTeX macros to be passed to org-roam-ui.
+Format as, i.e. with double backslashes for a single backslash:
+'((\"\\macro\".\"\\something{#1}\"))"
+ :group 'org-roam-ui
+ :type 'alist)
+
;; Internal vars
(defvar org-roam-ui--ws-current-node nil
@@ -577,7 +584,8 @@ from all other links."
(data .
(("dailyDir" .
,daily-dir)
- ("roamDir" . ,org-roam-directory)))))))))
+ ("roamDir" . ,org-roam-directory)
+ ("katexMacros" . ,org-roam-ui-latex-macros)))))))))
(defun org-roam-ui-sql-to-alist (column-names rows)
"Convert sql result to alist for json encoding.