especially now that github markdown supports latex. If you do ?ModuleName and there are no docstrings, you get the readme. If the repl .md could render latex that would be cool
GitHub markdown supports what now? That’s very exciting.
I’m not sure what it would mean for the repl to render LaTeX, it’s not something that I would expect to be possible in most terminal emulators. Maybe a layer that translates \mu into μ, (i.e. a tex2utf8 engine) but that seems like you’d be crossing the river for water.
Or simplify it ![]()
using Latexify
render(latexify("4+5/(3-sqrt(36))"), MIME("juliavscode/html"))
ERROR: MethodError: no method matching display(::MIME{Symbol("juliavscode/html")}, ::String)
That is not the repl. It appears to be some IDE.
I made something that does this for LaTeX bits of docstrings.
julia> using Markdown
julia> using MarkdownLaTeXRender
julia> md"Hey ``\sum \mathbb{x}^2-\frac{1}{2}\sigma``"
Hey ∑ 𝕩² − ¹/₂σ
Looks like VS code
That’s also an (the same?) IDE. Still not the repl.
FWIW, one tool I know that does have the ability to show mathematical formulas in the terminal is maxima:
(%i1) integrate(f(x) / x, x, -1, 1);
1
/
[ f(x)
(%o1) I ---- dx
] x
/
- 1
I have absolutely no idea how they do this, and whether it would be doable to get inspiration from the maxima code to have something similar in Julia.
A nice solution to the original question is LibTeXPrintf.jl by @suavesito:
julia> texprintln("a = \\sum_i \\frac{1}{i}")
⎲ 1
a = ⎳ ─
ⁱ i
It also accepts LaTeXStrings.
Cool. This works pretty well with Handcalcs.jl. I want to integrate a terminal mode with this.
julia> b = 5
5
julia> h = 15
15
julia> texprintln(
@handcalcs begin
Ix = b * (h)^3/12
Iy = h * (b)^3/12
end
)
b ⋅h³ 5 ⋅15³
Ix = ───── = ────── = 1406.25
12 12
$ h ⋅b³ 15 ⋅5³ $
[10pt]Iy = ───── = ────── = 156.25
12 12
Maybe there is a way to parse out the $ and the [10pt]. That would be nice.

