Render KaTeX in newsletters

Hello,

I’m using KaTeX formulas in my blog posts, but they aren’t rendered properly when sent via email, as this requires JavaScript execution. The formulas just appear as plain text, like \(\sqrt{N}\).

Do you have a solution for rendering these kinds of formulas in email newsletters?

I’ve already checked the forum, and the only topic mentioning this issue didn’t receive a response: LaTex or KaTeX in Newsletter.
I also understand that converting all formulas to images is an option, but this isn’t ideal when there are many formulas.

Thanks in advance for your help!

Welcome to the forum @jstts :waving_hand:

Would it work to send the email with a screenshot image of the KaTeX and a link to the post?

Then swap this out for the JS on the post.

You could use the new content visibility feature quite cutely here.

  1. Add your KaTeX via a HTML card, and set visibility to be off for email
  2. Add a screenshot of the KaTeX in a call to action card, with a link to the post. Set visibility off for the web

Hi @jonhickman, thanks for your answer!

I’m not sure I fully understand your suggestion. What would be the purpose of having a screenshot of the KaTeX that redirects the user to the blog article on click? If the solution is sending a short email to redirect the user to the blog article, why bother doing a clickable screenshot of a KaTeX formula?

Also I would be interested in a solution that allows to display the full article in the email, including the LaTeX formulas. I’ve already tried to send newsletters with a call to action only but it’s losing a lot of traction.

You won’t get your KaTeX in the email, as you’ve said.

An image is a good way of representing it, but doesn’t help people to actually read or copy the content.

Giving them an image and a path back to the post is a good middle ground I would have thought (sorry if that’s not the case)

1 Like