-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Content containing math formulas cannot be rendered #62
Comments
At first, I thought it was caused by no update, but it turned out that it wasn't, and it should be that there were some problems with the plugin. Using |
@gera2ld Can you help me take a look? |
@jaywhj It works as expected. Can you provide a minimal reproduction (a complete project or docker image)? |
@gera2ld I found out why, it's the use of KaTex. Since Material for MkDocs also used KaTex to render math before this, using In addition, even without this conflict, using it via file inclusion, there are cases where parts of the content are rendered incorrectly, cf. the rendering of the test.md file. this is a minimal reproduction: |
Add a detailed description of the parsing rendering issues: Issue-1: Rendering by file inclusion has the following problems:
Issue-2: Rendering directly within the document using code block wrapping has the following problems:
Issue-3: Through the CLI alone or VS Code plugin rendering (not MkDocs plugin form), the image is not rendered, I do not know if it is a normal phenomenon, test cases see above |
There are several issues here:
|
@jaywhj You may verify the fix by: pip install mkdocs-markmap@git+https://github.com/gera2ld/mkdocs-markmap@699e391 extra_javascript:
- https://unpkg.com/[email protected]/dist/d3.min.js
- https://unpkg.com/[email protected]/dist/browser/index.iife.js
- https://unpkg.com/[email protected]/dist/browser/index.js |
@gera2ld |
@gera2ld
|
Fixed in: pip install mkdocs-markmap@git+https://github.com/gera2ld/mkdocs-markmap@50a559b |
Done, problem all fixed, thanks again. |
@neatc0der Hi, This found a bug.
When I use markmap in a code block, it can't render content containing math formulas, it doesn't parse out. for example:
- Katex: $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$
If the markdown text contains similar mathematical formulas, it will cause the entire document to fail to render and load.
I'm using the latest version of the plugin :
Here is the source file, you can try it.
markmap-plugin-test.md
Just remove the line
- Katex: $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$
above and it parses fine, but the table block below parses a bit imperfectly, being partially blocked.Originally posted by @jaywhj in #61 (comment)
The text was updated successfully, but these errors were encountered: