comwes/mkpdfs-mkdocs-plugin

Mathjax integration

NilsWinter opened this issue · 2 comments

Hi there,
I'm using arithmatex to render Latex equations on my doc website (I'm using the Material theme with PyMdown Extensions).
Does anybody know if it is possible to have it render Latex in the exported PDF as well?
As far as I understand, the equations are rendered through mathjax using javascript and I guess this is the reason it's not being rendered for the PDF?

Thanks a lot,
Nils

@NilsWinter I don't think this feature will be integrated for now. But it a good one, I'll think on planning this as to me it's important. I'm tagging this as feature request, Any suggestion of how to integrate this is welcome

@NilsWinter I've found out a solution for your issue.

If you install markdown-katex with this pip3 install markdown-katex
You can add the following configuration to your mkdocs.yml by adding a markdown extension.

markdown_extensions:
  - markdown_katex:
      no_inline_svg: True
      insert_fonts_css: True
  - admonition
  - footnotes

This parameter no_inline_svg: True is important to prevent the use of javascript to render latex data.

You can also check markdown-katex for a more complete documentation.

I hope this helps.
KR,
Gerry N.