I watched the Latexify demonstration at JuliaCon here.
It seems from the video that simply entering something like latexify("x/y") into the terminal will result in output that looks like proper LaTeX.
However, when I tried on my terminal I ended up with this:
My version of the Julia REPL appears to simply display the raw version of the LaTeX, and also does so even when I try using show. Has something changed between then and now, or am I not displaying it properly?
AFAIK there’s no way to display proper LaTeX inside terminal emulator without rendering it out as some sort of image and then display with some image protocol.
Thanks for your reply.
I was worried that was the only option though, since I was afraid making Jupyter Notebook a prerequisite to my package would decrease user-friendliness and ease of use.
I’ll think about it though.
I recently added a render function to latexify.jl. It’s still very much a beta-feature, but the idea is to generate an image with the relevant equation and open it in a new window.
I don’t have any completely satisfactory solutions for the REPL but this is better than nothing.
render(latexify("x/y")), or my own favourite, latexify("x/y") |> render is correct usage. For it to work, however, you will need to have LuaLaTeX installed (+ some fairly basic packages). One day, I might make it more liberal such that it can use latex or pdflatex instead but currently it is pretty crude.
The code can (at the time of writing) be found here.
well, there is no support for displaying rich media in any arbitrary REPL. render in Latexify.jl will, however, try to create an image from the maths and open that in an external viewer. It also works nicely with the VSCode plotpane if you’re in VSCode.
No special reason, thank you.
Trying to visualize in VS Code this amazing post showing a continued fraction.
Quick attempts using Latexify.jl have not succeeded, yet.
using RecipesBase, LaTeXStrings
@recipe function f(::Type{LaTeXString}, s::LaTeXString)
framestyle := :none
titlefontsize --> 10
title := s
legend := false
([0],[0])
end
using Plots
plot(L"x^7-3x+4")
probably also better to make it an annotation than a title, then it won’t look as strange in plotly, for instance.