KaTeX mode for text blocks

Since I have been diving down the KaTeX rabbit hole over here... I thought to myself, what if Retool added katex to the platform, and had it baked in??

What if we could turn on KaTeX input, like Markdown and have it directly render in the app? no iframes like my workarounds?

image

It's worth asking! I do wonder what kind of utilization this feature would see, but I think it's a totally valid use case. I'll talk to the team and see what the consensus is!

Out of curiosity, what kind of content are you wanting to render?

I am generating a report, and utilizing KaTeX to display my formulas and the steps to arrive at the results.

I am having trouble exporting the custom component to a PDF that looks the same.

I thought, if I could build my whole report with just text fields (that accept KaTeX) then I could use Retool's built in PDF exporting.

EDIT: yes, I see my formula is wrong there :stuck_out_tongue:

1 Like

Makes sense! As I'm sure you've discovered, one of the current limitations of the custom component is that it can't be exported to PDF using the built-in utility function. I've already pinged our team about this particular request and will keep you updated here!

1 Like

So I just found out about MathML and it seems to work in an HTML component with no issue. :slight_smile:

image
image

Nice! I half-wondered if there was a lightweight library that could do something similar, but this is even more convenient. Good to know! :+1: