Skip to content

[BUG] ParseError: KaTeX parse error: Undefined control sequence: \ce #72

@fffweb

Description

@fffweb
  • [ x] I have searched for existing issues that already reported this problem and found none
  • [ x] The bug for the VSCode plugin
  • [ x] The bug is also present in the web version of VSCode or GitHub Codespaces

Describe the bug

chemistry formular $\ce{N2 + 3H2 ->[Fe] 2NH3}$ cause problem

Image

To Reproduce

---
markmap:
  extraJs:
    - npm:katex/dist/contrib/mhchem.min.js
---

- katex
  - $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$
  - $\ce{N2 + 3H2 ->[Fe] 2NH3}$

Expected behavior
just like behavior in https://markmap.js.org/repl#?d=gist:af76a4c245b302206b16aec503dbe07b:katex.md

Actual behavior
will display :ParseError: KaTeX parse error: Undefined control sequence: \ce

Environment:

  • OS: [windows 11]

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions