I made a nerdy thing!
LatexInComments (laic) is an #emacs package to render LaTeX math blocks in code comments as overlays.
don't ask "but why?", ask *"WHY NOT?"*
@ocivitf I feel like the “why” is obvious. This is very cool!
@ocivitf Eventually we plan to ship Emacs-wide LaTeX previews (including in prog-mode) with Org mode. Some details:
@karthink This looks extremely promising, and much more ambitious than laic.
org-latex-preview was my main inspiration, and I did try adapting it to prog-mode comments first, but I found some friction that made me decide to start from scratch and focus on my 2 top priorities: 0-config and speed on 1st invocation.
Good luck with the project, I'll definitely keep an eye on it.
@ocivitf a vscode extension that did this would go absolutely insane
@lycansubscribe I found a few when researching alternatives, but I have not tried them personally, I don't use VSC :)
- https://marketplace.visualstudio.com/items?itemName=Remisa.mathover
- https://marketplace.visualstudio.com/items?itemName=vs-publisher-1305558.VsTeXCommentsExtension
- https://marketplace.visualstudio.com/items?itemName=howcasperwhat.comment-formula
@ocivitf this is one of the coolest things i have probably ever seen
@ocivitf i was working on a better literate coffeescript mode a while ago and this kinda blows that out of the water
@ocivitf a related thing i've wanted for a while now: a standard way to have the windowing system allow a parent app P1 to own the relative position, size, & clipping of a sub-window S, while a descendant process P2 owns GPU textures associated with S.
Like, sure, you could display a static image, but you could also display interactive widgets that let you manipulate parameters referenced in an equation used to generate a plot like in Mathematica, where P1 is, say, a terminal emulator.
@ocivitf (or, P1 could be a GUI version of emacs, or a web browser, etc).
So you could have modern, interactive, high-framerate 3D graphics being rendered as a component of a vim/neovim session (for example).
It seems like the main hurdle is that each window-management API would need to explicitly allow this, and the utility is going to be very limited unless you could get all windowing-system vendors to implement the same cross-platform API (bc we'd need support in Wayland, macOS, win32...).