LaTeX in docstrings not rendering

I have had a look at


But I cannot get math formula to be rendered whether my doc is built by Travis or on my local machine using mkdocs.

The doctring is

Evaluates function f and its derivatives up to order n ∈ [0,4] at x:
The result is an array of length n+1.
Derivatives are numerically computed using the 5-point stencil method
with h≠0 being the grid spacing:

Rendered page:

I have tried replacing docstring triple quotes by simple quotes and replacing double backticks by escaped dollar signs but the rendered doc stays the same.

I must be doing something wrong but I cannot figure out what.

Thank you for your help.

This seems to be a problem with MathJax which is used to render the formulas. If you open the developer tools in your browser you can see that there is an error that MathJax was not found. This probably due to the fact that the MathJax CDN is retired.

1 Like

Thank you @saschatimme.
But what are the developer tools?

The developer tools are included in each browser, e.g. Chrome or Safari.

When I click on the rendered page link that you gave the LaTeX renders for me. I’m using a mobile phone, but I’m pretty confident that it will render on my PC as well. Will post if it doesn’t. Are you running any script blocker?

I have switched to a different MathJax CDN so the LaTex renders now:

Thank you

1 Like