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

Math is now 404 #864

Closed
Artoria2e5 opened this issue Sep 11, 2024 · 1 comment
Closed

Math is now 404 #864

Artoria2e5 opened this issue Sep 11, 2024 · 1 comment

Comments

@Artoria2e5
Copy link

Artoria2e5 commented Sep 11, 2024

When trying to figure out #699 I discovered that math is now 404:
image

Maybe using an external service to render the TeX wasn't such a good idea after all... What are the chances we can use KaTeX HTML/CSS output for this?

Implementation sketch

  • Link to katex.min.css to output if formula exists. Now linking to an external CSS is really silly for an e-mail, but https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css makes extensive references to fonts and other assets, and we are never getting them all.
  • For each formula block, call katex.renderToString() on it and paste in the resulting HTML. If the block is not inline, add { displayMode: true }.

Other ideas

Run mathjax and paste the SVG in -- possibly cheaper than getting the CSS, now that I think about it! Run MathJax.tex2svg() on the string, be sure to respect the inline-ness and set { display: false } if the block is inline.

@adam-p
Copy link
Owner

adam-p commented Nov 10, 2024

Nominally fixed with #261.

For client-side rendering, see #874 (and #261 and #144).

@adam-p adam-p closed this as completed Nov 10, 2024
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