orzih / mkdocs-with-pdf

Generate a single PDF file from MkDocs repository.
MIT License
325 stars 76 forks source link

Math formula and source code #75

Open Fallqs opened 3 years ago

Fallqs commented 3 years ago

It's a pity that

it doesn't look so satisfying when converting Math formulas and source codes via current version. I think it would be useful and convenient if you could improve support for them in future updates.

Math Formula

This is what the original mkdocs website looks like:

截屏2021-08-30 上午12 31 18

And this is what the rendered PDF looks like:

Screenshot_2021-08-30-00-28-25-322_cn wps moffice

Source Code

This is what the original website looks like:

截屏2021-08-30 上午12 31 55

And this is the rendered PDF looks like:

Screenshot_2021-08-30-00-28-53-613_cn wps moffice
whitewum commented 3 years ago

I fix the pdf problem by

theme:
    name: 'material'

plugins:
  - with-pdf:
      render_js: true  # add this

https://squidfunk.github.io/mkdocs-material/reference/mathjax/#mathjax

adamryczkowski commented 1 year ago

How did you manage to do that? I've tried this: https://github.com/orzih/mkdocs-with-pdf/issues/147 and failed with an empty document.