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

LaTeX/KaTeX support #24

Closed
ThatOneCalculator opened this issue Nov 15, 2024 · 5 comments
Closed

LaTeX/KaTeX support #24

ThatOneCalculator opened this issue Nov 15, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@ThatOneCalculator
Copy link

Many articles appear broken due to the lack of *TeX rendering

@nsh07
Copy link
Owner

nsh07 commented Nov 16, 2024

I will have to look into it. Parsing the expressions seems a bit complicated at first because it seems the wikipedia API query I'm using doesn't really return proper LaTeX-formatted expressions (it uses Wikipedia's web format for LaTeX). I might implement this, but I do agree that pages with equations look utterly broken right now.

For a quick fix, I can remove the unnecessary blank lines, which I will implement in the next release

@nsh07
Copy link
Owner

nsh07 commented Dec 26, 2024

Hey, it might actually be quite easy to implement this! I've found a web server that can render LaTeX expressions into SVG images, which I can then load into articles instead of the raw latex expressions. Here's an example

@nsh07 nsh07 removed the might-do label Dec 26, 2024
@ThatOneCalculator
Copy link
Author

Nice! Since that's a paid product, maybe a self-hosted server could be used with smth like https://github.com/UST-QuAntiL/latex-renderer ?

@nsh07
Copy link
Owner

nsh07 commented Dec 27, 2024

Actually only the web editor interface seems to be paid, the actual service seems to be completely free because the website renders the image for whatever LaTeX expression you give it without any API keys

@nsh07
Copy link
Owner

nsh07 commented Dec 27, 2024

I've added support for rendering expressions. Only thing left to do is to scale the image properly on different display sizes. I will complete it tomorrow :)

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

No branches or pull requests

2 participants