Javascript support in Poster 2 markdown post

I want to insert LaTeX maths into blog posts using MathJax | Beautiful math in all browsers.
I can do this at rapidweaver level by inserting the following code in the headers of all pages:

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

On the following blog page
Second Markdown post using LaTeX
the first part is hard coded HTML into the general Poster 2 page. The symbol alpha is well rendered.

Below, the post content comes from a markdown text file which contains similar text. Here, the Mathjax code (i.e. (\alpha) ) is not parsed.

Can this be fixed? Or does the Markdown renderer intercept the ( and ) commands?

TIA,
François

[quote=“snorky22, post:1, topic:4591”]
I re-post the end of my question with correct code
Below, the post content comes from a markdown text file which contains similar text. Here, the Mathjax code (i.e. \(\alpha\) ) is not parsed.

Can this be fixed? Or does the Markdown renderer intercept the \(and \) commands?

I am using PHP Markdown Extra inside Poster Stack, I don’t know if this library supports your request.

I think in Markdown you would need \\(\alpha\\)

2 Likes

Thanks, I will try doubling the backslash and tell you the result.

Escaping the \by a double backslash \\is a brilliant idea; it works!

Thanks a lot for your quick response

1 Like