How to display mathematics equation from OpenAI API output

70 Views Asked by At

It seems that ChatGPT use KaText to render math, but when I paste API output to KaText Demo website. It goes error.

(Gauss's Law):
   \[
   \nabla \cdot \mathbf{E} = \frac{\rho}{\varepsilon_0}
   \]

https://katex.org/#demo enter image description here So How should I display it in frontend?

0

There are 0 best solutions below