Flexible Lisp Blogware. Fork for personal use. Mirrored from https://github.com/kingcons/coleslaw originally.

mathjax.lisp 511B

123456789101112131415161718
  1. (defpackage :coleslaw-mathjax
  2. (:use :cl :coleslaw))
  3. (in-package :coleslaw-mathjax)
  4. (defvar *mathjax-header* "<script type=\"text/x-mathjax-config\">
  5. MathJax.Hub.Config({tex2jax: {inlineMath: [['\\(','\\)']]}});
  6. </script>
  7. <script type=\"text/javascript\"
  8. src=\"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML\">
  9. </script>")
  10. (defmethod enable ()
  11. (coleslaw::add-injection *mathjax-header* :head))
  12. (defmethod disable ()
  13. (coleslaw::remove-injection *mathjax-header* :head))