gocast icon indicating copy to clipboard operation
gocast copied to clipboard

Allow LaTeX snippets in chat

Open joschahenningsen opened this issue 2 years ago • 5 comments

Unsure if this is really something we should implement depending on the complexity of a potential solution, but messages like this:

image

Would look much better if we allowed creating latex snippets. IMO this would require a more sophisticated chat input which I'm not sure we actually want.

joschahenningsen avatar Sep 22 '22 09:09 joschahenningsen

I implemented this once with https://katex.org/, worked pretty well. Should be quite straight forward to add it.

alexanderstephan avatar Sep 24 '22 11:09 alexanderstephan

Nice, so that renders the snippets in the frontend, right?

joschahenningsen avatar Sep 24 '22 11:09 joschahenningsen

Yes, it renders in the browser, but it did feel pretty light weight.

alexanderstephan avatar Sep 24 '22 11:09 alexanderstephan

grafik Must be fast then 😂

alexanderstephan avatar Sep 24 '22 11:09 alexanderstephan

~~https://pkg.go.dev/gopkg.in/oi-archive/blackfriday.v2#section-readme Technically, blackfriday already supports MathJax and MathJax supports LaTeX like syntax afaik. That would be an alternative, I suppose.~~ Nevermind, just a weird old repo.

alexanderstephan avatar Sep 24 '22 11:09 alexanderstephan