Skip to content
This repository has been archived by the owner on Jul 29, 2023. It is now read-only.

nunjucks 在解析markdown中的数学公式时有意外表现 #25

Closed
hooozen opened this issue Jun 17, 2023 · 2 comments
Closed

nunjucks 在解析markdown中的数学公式时有意外表现 #25

hooozen opened this issue Jun 17, 2023 · 2 comments

Comments

@hooozen
Copy link

hooozen commented Jun 17, 2023

When I write a math equation in my markdown file like following

Indicator Function, $I_{\{0<x<1\}}$

It is expected to be shown as
image

But after hexo-renderer-nunjucks process it become

Indicator Function, $I_{{0&lt;x&lt;1}}$

then it will renderer by latex engine like
image
which missing {}.

Plugin behave differently from the standard. So it may be considered to process latex equation in $...$ or $$...$ specially.

@stevenjoezhang
Copy link
Member

You can add a space between {{, or

See hexojs/hexo#4518

@hooozen
Copy link
Author

hooozen commented Jun 17, 2023

thank you very much. I also solved the problem well by using the markdown renderer hexo-renderer-pandoc replacing hexo-renderer-marked.

@hooozen hooozen closed this as completed Jun 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants