What is the canonical way to enable LaTex?

change site-scripts to

{{ $script := .Site.Data.webpack_assets.app }}
{{ with $script.js }}
     <script src="{{ relURL (printf "%s%s" "dist/" .) }}"></script>
{{ end }}

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({ tex2jax: {inlineMath: [["$$","$$"],["\\(","\\)"]]} })
</script>

and it works… AND changed single $ to double $$

Check .Site.Data.webpack_assets.app ! And better to use the newest MathJax version!

Good Luck!

1 Like