# what is the best way to post math formula with publii ?

March 26, 2020 at 10:04 pm#2231

noapmtl

I actually found a working solution for anyone having the same need with using MathJax :

In publii app, you click on “Tools” -> “Custom HTML”, in “head”, you add the following :

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

It will then render your latex formula. If you have a factorisation, you need to put spaces before and after a *, if not, it won’t render the formula.

Ex :

$$V_{min}=V_{init}*k= V_{init}*\frac{1}{1-n}$$

will not work while

$$V_{min}=V_{init} * k= V_{init} * \frac{1}{1-n}$$

will render correctly.

Hope it’ll work for you !