From 909230afcd4aad97d2d4d15259586cdd35a7365b Mon Sep 17 00:00:00 2001 From: TEC Date: Sat, 9 Mar 2024 00:23:28 +0800 Subject: [PATCH] Overhaul mathjax configuration Put a big effort into making much of the custom LaTeX preamble carry over. --- config.org | 89 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 60 insertions(+), 29 deletions(-) diff --git a/config.org b/config.org index 85c1936..8a3104f 100644 --- a/config.org +++ b/config.org @@ -10916,40 +10916,71 @@ very well at the moment. ***** MathJax -If MathJax is used, we want to use version 3 instead of the default version 2. -Looking at a [[https://www.intmath.com/cg5/katex-mathjax-comparison.php][comparison]] we seem to find that it is ~5 times as fast, uses a -single file instead of multiple, but seems to be a bit bigger unfortunately. -Thankfully this can be mitigated my adding the ~async~ attribute to defer loading. +I want to use svg MathJax by default, and with a few of the custom commands that +are part of my LaTeX preamble. #+begin_src emacs-lisp -(setq org-html-mathjax-options - '((path "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js" ) - (scale "1") - (autonumber "ams") - (multlinewidth "85%") - (tagindent ".8em") - (tagside "right"))) +(setcdr (assoc 'path org-html-mathjax-options) + (list "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js")) (setq org-html-mathjax-template - " -") + +") #+end_src *** LaTeX Export