facelessuser / PyMdown

CLI batch markdown converter/previewer. Wrapped around Python's Markdown Package and Pygments.
MIT License
5 stars 9 forks source link

Math chagnes #26

Closed facelessuser closed 10 years ago

facelessuser commented 10 years ago

Because the MathJax library is so big, might be nice to not load it if no math blocks are found in the markdown. This could be accomplished by simply adding a flag to the main markdown object that can be checked. Then the Javascript can be selectively loaded.

facelessuser commented 10 years ago

I decided to just do this by creating shortcuts for loading a list of js and/or css. Now if you don't want to load all of mathjax by default, you can just add the following to get mathjax working in a single file:

include:
- mathjax

Where mathjax is a setting:

"@mathjax":
   js:
        -   mathjax-config.js
        -   'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'