org-reveal icon indicating copy to clipboard operation
org-reveal copied to clipboard

Improved customization of MathJax

Open torfjelde opened this issue 1 year ago • 0 comments

With respect to the MathJax support in org-reveal, I've encountered a few pain points:

  1. I'd like to be able to specify a MathJax configuration to use (both globally, i.e. a default one, and locally, i.e. per-buffer basis). For example, I make heavy use of the physics package, so it would be nice to make this available in all my Reveal.js presentations too (which can be done through the MathJax config).
  2. It would be nic to be able to switch between different MathJax versions.

This PR attempts to address the above while maintaining the current behaviors.

Configurations can now be specified by:

  • In buffer: #+REVEAL_MATHJAX_CONFIG
  • Through customization: org-reveal-mathjax2-config or org-reveal-mathjax3-config, depending on which MathJax version we're working with.

Version of MathJax is specified by::

  • In buffer: #+REVEAL_MATHJAX_VERSION: 2.7.5
  • Custom variablle: org-reveal-mathjax-version
  • If REVEAL_MATHJAX_URL is specified, and org-reveal-extract-mathjax-version-from-url is non-nil, we will attempt to extract the version from the URL.
  • Otherwise, defaults to 2.7.5, as is currently done.

I personally find this quite useful, so figured I'd make a PR:)

Also, love the package! Rely on it for all my presentation needs, so thank you so much for your work!

EDIT: If there's interest in this, I can of course also add a README section about this :+1:

torfjelde avatar May 28 '23 01:05 torfjelde