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

How can I render all inline formulas in $..$ #3935

Open
devil6117 opened this issue Mar 11, 2024 · 2 comments
Open

How can I render all inline formulas in $..$ #3935

devil6117 opened this issue Mar 11, 2024 · 2 comments
Labels

Comments

@devil6117
Copy link

devil6117 commented Mar 11, 2024

Thank for your KaTex, this is a good tool for studying. but I'm in trouble.

I try to type an inline formula, but it isn't working. if I type a block formula, it is working and show prefect.

I configured it as required with https://katex.org/docs/autorender.

Here's what I configured.

image

Here's the render in my website and the source code.

image

image

Build Tool: Hugo v0.123.7
Build environment: GitHub Codespaces
Web browser: Microsoft Edge v122.0.2365.66

I'm not a native speaker of English. I'm sorry my description wasn't clear enough.

@devil6117 devil6117 added the bug label Mar 11, 2024
@edemaine
Copy link
Member

Presumably, Hugo is adding extra HTML tags that makes autorender not detect your equations. Inspecting the elements (or posting some generated HTML) would help diagnose.

You might explore a plugin specific to Hugo. I found https://gohugo.io/content-management/mathematics/ which may do what you want.

@devil6117
Copy link
Author

devil6117 commented Mar 11, 2024

Presumably, Hugo is adding extra HTML tags that makes autorender not detect your equations. Inspecting the elements (or posting some generated HTML) would help diagnose.

You might explore a plugin specific to Hugo. I found https://gohugo.io/content-management/mathematics/ which may do what you want.

Prof Demaine,

Good afternoon, thank you very much for your reply.

I tried to find more relevant documentation. I even want to change to pandoc, it may render well.

But I But I choose to continue using KaTeX. I considered HugoBlox, it was not compiled successfully. I still need to get the theme if it could work.

I didn't read the official documentation of Hugo and KaTeX carefully. it's my mistake.

As you can see, it works correctly.

image

solution: change "$...$" to "\(...\)".

this is not KaTeX's bug.

image

it's not working in vscode, no possible, there is no one-size-fits-all tool.

by the way, thanks for your lesson.

this learning notes is learning for your lesson —— Introduction to algorithm

image

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

No branches or pull requests

2 participants