clayh53 / tufte-jekyll

Minimal Jekyll blog styled to resemble the look and layout of Edward Tufte's books
MIT License
635 stars 206 forks source link

Add mathjax config option to support inline #38

Closed ghost closed 8 years ago

ghost commented 8 years ago

One option is to change the math start and end tags to $ (for inline) and $$ (for block) as is possible with other configurations of MathJax. Would doing that break a lot of things (and if no: can anyone point me in the right direction for this)? https://github.com/clayh53/tufte-jekyll/issues/36#issue-139613004

Doing this requires adding this to the page:

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>

This should be a configurable option as Mathjax has good reasons for not defaulting to using $ for inline equations as they describe here: http://docs.mathjax.org/en/latest/start.html#tex-and-latex-input

ping @ekstroem

ghost commented 8 years ago

@clayh53 is there a reason you're using TeX-AMS-MML_HTMLorMML configuration and not the TeX-MML-AM_CHTML - just curious.