pages-themes / primer

Primer is a Jekyll theme for GitHub Pages
https://pages-themes.github.io/primer/
MIT License
278 stars 261 forks source link

Add Support for inline latex via MathJax #77

Open jbsooter opened 1 year ago

jbsooter commented 1 year ago

Would there be any interest in configuring Mathjax for this template by default? I am currently using jbsooter/primer to support this functionality for inline latex on GitHub pages. With GitHub supporting inline latex on all markdown documents, it would be nice if this came enabled out of the box for GitHub pages Jekyll templates as well.

What was changed in this fork:

Addition of Mathjax script and configuration of inline escape characters. See this thread.

   <script type="text/javascript" id="MathJax-script" async
         src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js">
 </script>

 <script>
   MathJax = {
     tex: {
       inlineMath: [['$', '$']]
     }
   };
 </script>
welcome[bot] commented 1 year ago

Welcome! Congrats on your first pull request to the Primer theme. If you haven't already, please be sure to check out the contributing guidelines.