Pandoc does not natively support the $...$ math delimiters used by the mathjsx package. However, you can work around this limitation by using a different approach to include LaTeX math expressions in your Markdown document.
Instead of using mathjsx, you can use the pandoc-citeproc filter to include LaTeX math expressions in your Markdown document. This filter works with pandoc to convert LaTeX math expressions to images when converting to PDF.
First, you need to have the pandoc-citeproc package installed. You can install it using the following command:
pip install pandoc-citeproc
Next, create a filters.yml file in the same directory as your Markdown file, or in a directory specified by the -H option when running pandoc. This file should contain the following content:
---
output_dir: "images"
---
This configuration tells pandoc to save the generated images in a directory named "images" within the output directory.
Now, in your Markdown file, you can include LaTeX math expressions using the following syntax:
Here is a math expression using pandoc-citeproc:
$$\int_{a}^{b} f(x) dx = F(b) - F(a)$$
When you run pandoc to convert your Markdown file to PDF, make sure to use the -H option to specify the directory containing the filters.yml file:
pandoc -H filters.yml my_markdown.md -o my_pdf.pdf
This will generate a PDF with the LaTeX math expressions converted to images.
Keep in mind that this approach may not provide the same level of syntax highlighting and editing capabilities as mathjsx, but it does allow you to include LaTeX math expressions in your Markdown document when using pandoc for conversion.