tpapp / julia-repl

Run an inferior Julia REPL in a terminal inside Emacs
Other
169 stars 35 forks source link

FR: show REPL output in LaTeX (if gui) #143

Open larrasket opened 11 months ago

larrasket commented 11 months ago

It would be great if it had an option to process equations like sagemath show

Example: image

hexaeder commented 11 months ago

Not sure how this is related to julia-repl? I guess first of all you'd need some graphic support in the terminal emulator (Sixel), which vterm does not have afaik :(

On Julia side, one could built something like SixelTerm.jl to overload show methods for symbolic equations. Symbolics.jl already supports latex output, and MathTeXEngine.jl + CairoMakie could be used to create the bitmaps. So it looks like outside of Emacs all tools required are just waiting to be connected.

larrasket commented 11 months ago

The example I provided is from an emacs shell too, see https://github.com/sagemath/sage-shell-mode, however, I'm not sure whether it uses vterm or not. I think that this would be better implemented just by processing any latex-formatted output like the way Org-mode does it, without interpolating the Julia REPL itself.

tpapp commented 10 months ago

I concur with @hexaeder, this should ideally be handled via Julia's display mechanisms, and then eg displayed as SVG. That is already handled just fine.