JuliaStrings/LaTeXStrings.jl

`\textrm` turned to math in plot

Closed this issue · 1 comments

I am using LaTeXStrings.jl with Plots.jl to add labels to my curves. The label contains some formulae and some plain text description (see in the figure below). It seems that if I call the L"" directly, everything is good. However, when I used it in plot, the space and hyphen in text will be rendered as math, say, the space is missing and the hyphen is a minus.

Is it a bug or feature? Maybe I miss that in manual, but if I want the expected label, what should I do?

Snipaste_2021-06-06_20-56-10

BTW, I am using LaTeXStrings v1.2.1 and Plots v1.16.2 .

LaTeXStrings doesn't actually do any LaTeX rendering. That is up to the Plots.jl package (or rather, whatever backend it is using), so you should report the problem there.