Unicode error with Plots.jl and PGFPlotsX

Using Plots with PGFPlotsX backend I get strange substitutions for some characters in the tex file. For example, this code

  plot(
        title = "Interpolação polinomial"
    )
  savefig("fig.tex")

generates a file fig.tex that contains:

\begin{axis}[point meta max={nan}, point meta min={nan}, legend cell align={left}, 
title={Interpola$ç$$ã$o polinomial} ...

As can be seen, in the title, some characters as ç and ã get surrounded by $. The resulting file cannot be included in the main tex file since I get errors like the one below when I try to compile with pdflatex.

Command \c invalid in math mode.

Is this a bug? Is there any setting in Plots.jl to left the title text without modification?

using Plots, LaTeXStrings
pgfplotsx()
plot(;
    title = LaTeXString("Interpolação polinomial")
)

(edit: Oh, I’m sorry, this just came up in my list, I didn’t realize how old it is. Hope you haven’t been waiting for this since January)

1 Like