JuliaStrings/LaTeXStrings.jl

I think there is a bug in \hat, not sure if it from LaTeXStrings.jl

Closed this issue · 2 comments

using Plots
using Distributions
using LaTeXStrings

dist = Normal(5, 2)
d = cdf.(dist, -2:0.1:10)
hlin1 = collect(1:75)
hlin2 = collect(75:121)

plot(d, label = "", width = 2, grid=false, color = "SteelBlue")
plot!(hlin1, zeros(75), width = 2, label = "", color = "black")
plot!(hlin2, ones(47), width = 2, label = "", color = "black")
plot!(75*ones(2), [0, 1], width = 2, label = "", color = "black")
annotate!([(77, 0.4, Plots.text(L"y_{t+k} = 75", 12, :black, :left))])
annotate!([(45, 0.15, Plots.text(L"\hat{F}_{t+k|t}", 12, "SteelBlue", :right))])

gives me
Captura de Tela 2020-12-30 às 23 35 02
but the same command in overleaf gives
Captura de Tela 2020-12-30 às 23 35 49

Latexstrings doesn’t do any rendering. That’s up to your Plots backend

Thank you