I am trying to plot Markdown in the legend of a plot. According to this blog post by @Tamas_Papp LaTeXStrings.jl
can be used to display latex math and that works, but when I want to typeset other LaTeX commands it doesn’t work (as pointed out in the documentation).
So I try markdown
using Markdown
md"\$K_1\$ **hah**"
is properly rendered in jupyter, but the same for
using Plots
using Markdown
plot(rand(10),label=md"\$K_1\$ **hah**")
renders $K_1$ **hah**
instead of K_1 hah.
Similarly
using Plots
using LaTeXStrings
plot(rand(10),label=latexstring("\$K_1\$"))
renders correctly but
using Plots
using LaTeXStrings
plot(rand(10),label=latexstring("\$K_1\$ hah"))
does not.
Is there a way to force the legend to display correctly?