-
Notifications
You must be signed in to change notification settings - Fork 255
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
Add support for LaTeX formula rendering when rendering markdown #158
Conversation
Neat! @jph00 any objections to adding this to MarkdownJS? |
Let's add a bool param to enable/disable it, and default to false. Thanks! |
Oh also would be nice if start/end tags were configurable. E.g OpenAI models use different ones. |
Could it be technically feasible and more useful to add direct mathjax support? |
I think that would be an "addition to", not an "instead of"! :D Feel free to create a new issue showing what obstacles you're facing with mathjax, or drop by the discord (https://discord.gg/qcXvcxMhdP). |
Hello, I have added a parameter to control whether to enable KaTeX rendering. |
I have already added custom start/end tags to the MarkdownJS function. |
This is the new test script: https://pb.yym68686.top/ywjD?lang=python |
Thank you! |
I added a few lines of code to support KaTeX formula rendering. Here is a test case:
Fenced code blocks work here.
"""
@rt('/')
def get(req):
return Titled("Markdown rendering example", Div(content,cls="marked"))
if name == "main":
import uvicorn
uvicorn.run(
"main:app",
host="0.0.0.0",
port=5001,
reload=True,
)