# LaTeXStrings ArgumentError: regex message

**URL:** https://discourse.julialang.org/t/latexstrings-argumenterror-regex-message/70865
**Category:** New to Julia
**Tags:** latex, plots
**Created:** [November 3, 2021, 12:02pm UTC](https://discourse.julialang.org/t/latexstrings-argumenterror-regex-message/70865 "2021-11-03T12:02:59Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![mocalvao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mocalvao/32/19318_2.png) [@mocalvao](https://discourse.julialang.org/u/mocalvao)
#### Post date: [November 3, 2021, 12:02pm UTC](https://discourse.julialang.org/t/latexstrings-argumenterror-regex-message/70865/1 "2021-11-03T12:02:59Z")

</div>

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?

```julia
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:

```julia
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

---

<div class="post-metadata">

### Author: ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)
#### Post date: [November 3, 2021, 12:21pm UTC](https://discourse.julialang.org/t/latexstrings-argumenterror-regex-message/70865/2 "2021-11-03T12:21:08Z")

</div>

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

---

<div class="post-metadata">

### Author: ![mocalvao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mocalvao/32/19318_2.png) [@mocalvao](https://discourse.julialang.org/u/mocalvao)
#### Post date: [November 3, 2021, 12:37pm UTC](https://discourse.julialang.org/t/latexstrings-argumenterror-regex-message/70865/3 "2021-11-03T12:37:19Z")

</div>

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

---

<div class="post-metadata">

### Author: ![mocalvao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mocalvao/32/19318_2.png) [@mocalvao](https://discourse.julialang.org/u/mocalvao)
#### Post date: [November 3, 2021, 12:50pm UTC](https://discourse.julialang.org/t/latexstrings-argumenterror-regex-message/70865/4 "2021-11-03T12:50:17Z")

</div>

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

```julia
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:

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

```

---

<div class="post-metadata">

### Author: ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)
#### Post date: [November 3, 2021, 12:53pm UTC](https://discourse.julialang.org/t/latexstrings-argumenterror-regex-message/70865/5 "2021-11-03T12:53:47Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)
#### Post date: [November 3, 2021, 4:44pm UTC](https://discourse.julialang.org/t/latexstrings-argumenterror-regex-message/70865/6 "2021-11-03T16:44:26Z")

</div>

This seems to be fixed now.
