Feature Request: Inline LaTeX for Ghostty #13291
|
It would be cool to be able to have inline LaTeX working. Send an escape code, then just latex source code, then send the matching closing escape code. The terminal would render the image with LaTeX (external tool call) and display it inline, just like all those inline LaTeX JS libraries for the web. Bonus point if somehow:
I know it's a big ask. But maybe... maybe it's possible one day :) I won't tell anyone this one's easy. But maybe some simple version of this is within reach? |
Replies: 6 comments 2 replies
|
This is pretty much a textbook example of something we won't implement because it's way too niche, but you're more than welcome to maintain a fork for it if you wish :) Maybe in the far off future there will be a plugin system to realize this, but it's frankly too invasive for anything outside of a fork |
|
Why not render it yourself, to an image, then display that with the Kitty image protocol? I've seen some Neovim plugins which do that for example. |
|
Someone just built it: |
|
Oh I love this |
|
OK, so it sort of illustrates why I requested for support to be explicitly added to Ghostty, especially if you read my FR here: mikewang817/TFormula#2 I think the final version of this sort of feature would be a capability that programs should be able to discover via termcap, and no wrapper programs would need to be used. That would ultimately mean its place is in the terminal. Wonder what you think about this, @pluiedev and @00-kat ? You could argue with "but what if someone wants some other thing that also gets rendered to graphics" and then my argument would be that:
I would be interested to hear everyone's thoughts on this. Thank you. |
|
PS to address the "too niche" argument, I think this might be a combination of point of view and survivorship bias. Maybe the person making the argument isn't part of a community that uses TeX a lot (POV). And if you look at e.g. emoji support, that was a "niche requirement" too for terminals for a long time, until someone added it (I think MacOS was first?) and people saw it's actually pretty useful and now everyone's using it (you can't run a test suite without seeing some emoji). |
This is pretty much a textbook example of something we won't implement because it's way too niche, but you're more than welcome to maintain a fork for it if you wish :) Maybe in the far off future there will be a plugin system to realize this, but it's frankly too invasive for anything outside of a fork