docsifyjs / docsify

🃏 A magical documentation site generator.

Home Page:https://docsify.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

An exception occurs when Katex inline formula contains subscripts

LzcGeorge opened this issue · comments

My text is 字母:$a$ , $c$ 和 $n_0 $ , $n_0 +$
But $n_0$ shows wrongly, Why is there an extra scroll wheel below this?

How to remove the roller below?
Thanks .

Hi @LzcGeorge , could you plz provide an reproduce sample on it ?

FYI, I test it locally.

# Test
My text is 字母:$a$  , $c$ 和 $n_0 $ , $n_0 +$
image

Hi @Koooooo-7,Thank you for your help.
I checked my JavaScript file again and found the source of my issue.

At fist,my js file like that

<script src="//cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.js"></script>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.css" />
<script src="//cdn.jsdelivr.net/npm/docsify-latex@0"></script>

Most of the cases are showing normal behavior, but there is an issue occurring like this.

Now ,I change it and it works!

<script src="//cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.js"></script>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.css" />
<script src="//cdn.jsdelivr.net/npm/marked@4"></script>

<!-- CDN files for docsify-katex -->
<script src="//cdn.jsdelivr.net/npm/docsify-katex@latest/dist/docsify-katex.js"></script>

Thanks!

no prob.