LaTeXStrings ArgumentError: regex message

Hi all,

I have already submitted an issue to LaTeXStrings github site about this, but I do not know whether it is fine to ask here as well. If not, forgive me.

I used to use LaTeXStrings seamlessly, but I guess (not sure) the latest version v1.2.1 might have broken something. This simple MWE shouldt work, right?

using Plots
using LaTeXStrings
x = range(0, 10, length=100)
α = 1.0
plot(x, α*x, xaxis=L"x", yaxis=L"y", label=L"\alpha = %$α")

issuing the following error:

ArgumentError: regex matching is only available for the String type; use String(s) to convert

Stacktrace:
  [1] match(r::Regex, s::LaTeXString, i::Int64)
    @ Base ./regex.jl:317
  [2] match(r::Regex, s::LaTeXString)
    @ Base ./regex.jl:316
  [3] gr_inqtext(x::Int64, y::Int64, s::LaTeXString)
    @ Plots ~/.julia/packages/Plots/0FnGd/src/backends/gr.jl:231
...

Best

See https://github.com/jheinen/GR.jl/issues/437 (it seems it will be solved soon).

Thanks Paul,

So it seems not to be exactly related to LaTeXStrings, but GR instead, right? I will wait for the GR upgrade and as soon as this is fixed accordingly, I will mark your prompt answer as the solution.

Cheers

I have already updated all my packages and the versions I now have are:

st
      Status `~/Dropbox/research/modified_gravity/programs/mocalvao/julia/Palatini_exponential/Project.toml`
  [0c46a032] DifferentialEquations v6.19.0
  [28b8d3ca] GR v0.62.1
  [7073ff75] IJulia v1.23.2
  [b964fa9f] LaTeXStrings v1.2.1
  [91a5bcdd] Plots v1.23.4
  [e88e6eb3] Zygote v0.6.29

Nevertheless, I still have the same error:

ERROR: ArgumentError: regex matching is only available for the String type; use String(s) to convert

same here. I’ll get back to the GR developers

This seems to be fixed now.