Skip to content
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

Confused by extension example in README #30

Open
robogeek opened this issue Jan 21, 2025 · 2 comments
Open

Confused by extension example in README #30

robogeek opened this issue Jan 21, 2025 · 2 comments

Comments

@robogeek
Copy link

As a reader of Markdown-IT-KaTeX documentation, I want to be enlightened and informed.

In the section Katex extension, this code snippet leaves me confused.

import MarkdownIt from 'markdown-it'
import katex from 'katex'
import 'katex/contrib/mhchem'
import 'katex/contrib/copy-tex'
const md = new MarkdownIt()
katexPlugin(md, {
    katex,
})

From where does the reader derive katexPlugin?

This is the only place that katexPlugin is mentioned.

@Romaxx
Copy link

Romaxx commented Jan 22, 2025

this works for me:

import MarkdownIt from 'markdown-it'
import katex from 'katex'
import 'katex/contrib/mhchem'
import 'katex/contrib/copy-tex'
const md = new MarkdownIt()

md.use(mk,{"katex":katex});

@robogeek
Copy link
Author

Yes, I have code like that in my application currently.

But - My goal is getting the maintainer to update the documentation one way or another because this katexPlugin thing simply doesn't make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants