I’m trying to plot some graphs using CairoMakie.jl that contains latex strings. But it doesn’t work as intended. it renders the same string but with a $ before and after. Here is an example from Makie documentation. Any Ideas why is that so?
using CairoMakie
f = Figure(fontsize = 18)
Axis(f[1, 1],
title = L"\frac{x + y}{\sin(k^2)}",
xlabel = L"\sum_a^b{xy}",
ylabel = L"\sqrt{\frac{a}{b}}"
)
f
Could you post the versions of CairoMakie and Makie you’re using? It could be that you’re on an old version.
Also, note that you have to supply the latex string at the time you’re creating the axis or label - updating it later will lead to the effect you have described.
Those are not the latest versions, you can always see those by going to makie.juliaplots.org/stable and looking at the very bottom what versions the docs we’re built with. Or check the versions in the github repository directly.
That usually means that they haven’t been correctly mapped in MathTeXEngine or the computer modern font doesn’t have them. Maybe open an issue in MathTeXEngine.jl?