How to use Katex in QMarkdown?
-
I am not sure if Katex is supported in QMarkdown; I can’t find any info about it with the exception of: https://forum.quasar-framework.org/topic/6868/qmarkdown-v1-0-32-has-been-released
Is there any documentation?
-
@Pablo74 markdown-it-katex plugin has a severe issue right now, with no resolution. I don’t recommend using it.
markdown-it-katex Open GitHub opened this alert on 4 Sep 1 markdown-it-katex vulnerability found in package.json on 4 Sep Remediation No patched version is available. Details GHSA-5ff8-jcf9-fw62 high severity Vulnerable versions: > 0.0.0 Patched version: No fix All versions of markdown-it-katex are vulnerable to Cross-Site Scripting (XSS). The package fails to properly escape error messages, which may allow attackers to execute arbitrary JavaScript in a victim's browser by triggering an error. Recommendation No fix is currently available. Consider using an alternative package until a fix is made available.
But, if you want to use it, QMarkdown has the
extends
property for doing exactly that. Check it out in the docs. The example takes mermaid and extends it into QMarkdown. -
Thank you for information. It is too difficult to me extend Markdown with Katex…
-
If it was in QMarkdown, I’d be either removing it, because of the security and it seems to be a dead project, or fork it and fix what was needed. However, Katex itself is pretty big and not many people have asked for it (you and one other person this whole time).
-
OK, I understand.
I wish another “math type” posibility occurs in QMarkdown, maybe MathJax…? -
@Pablo74 If it’s been wrapped with a markdown-it plug-in, then yes, it can be integrated with the
extends
property. -
There IS a plugin markdown-it-mathjax, my problem is I don’t know how to extend it. I have read instructions, but not able to do it. I don’t use any build process, I use UMD files only.
Thank you for your patience and help.
-
@Pablo74 There is a
markdown-it-mathjax
, unfortunate for you, they do not provide a UMD version of it. So, you will not be able to extend the UMD version of QMarkdown with it.