# how can i use latex in julia v1.0

**URL:** <https://discourse.julialang.org/t/how-can-i-use-latex-in-julia-v1-0/13340>\
**Category:** General Usage\
**Created:** [August 13, 2018, 3:14am UTC](https://discourse.julialang.org/t/how-can-i-use-latex-in-julia-v1-0/13340 "2018-08-13T03:14:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![leaoshark](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leaoshark/32/11462_2.png) [@leaoshark](https://discourse.julialang.org/u/leaoshark)\
**Post date:** [August 13, 2018, 3:14am UTC](https://discourse.julialang.org/t/how-can-i-use-latex-in-julia-v1-0/13340/1 "2018-08-13T03:14:10Z")

</div>

i want to write in latex a title in a plot

so

title("(Omega\_d )^2 " i try to use \Omega and press tab to choose the greek letter … but the subscript \_d i can not

julia v1.0 do not accept L"\Omega\_d"  
any ideas ?

---

<div class="post-metadata">

**Author:** ![Norman](https://avatars.discourse-cdn.com/v4/letter/n/97f17d/32.png) [@Norman](https://discourse.julialang.org/u/Norman)\
**Post date:** [August 13, 2018, 4:52am UTC](https://discourse.julialang.org/t/how-can-i-use-latex-in-julia-v1-0/13340/2 "2018-08-13T04:52:10Z")

</div>

Have you installed [LaTeXStrings](https://github.com/stevengj/LaTeXStrings.jl)? The L" " string is from this package.

It seems that the package authors are still fixing some compatibility issues with V1.0. But it should work fine at least on Julia V0.7.

---

<div class="post-metadata">

**Author:** ![mcarpe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcarpe/32/2719_2.png) [@mcarpe](https://discourse.julialang.org/u/mcarpe)\
**Post date:** [August 13, 2018, 10:40am UTC](https://discourse.julialang.org/t/how-can-i-use-latex-in-julia-v1-0/13340/3 "2018-08-13T10:40:09Z")

</div>

Even without LaTexStrings you should be able to use LaTeX (depending on what package you’re using for plotting). In Plots.jl this should work:  
`plot(...., title = "\$(\\Omega_d)^2\$")`

or, as mentioned, with LaTeXStrings.jl:

```julia
using LaTeXStrings
plot(...., title = L"$(\Omega_d)^2$")

```

---

<div class="post-metadata">

**Author:** ![leaoshark](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leaoshark/32/11462_2.png) [@leaoshark](https://discourse.julialang.org/u/leaoshark)\
**Post date:** [August 22, 2018, 12:17pm UTC](https://discourse.julialang.org/t/how-can-i-use-latex-in-julia-v1-0/13340/4 "2018-08-22T12:17:52Z")

</div>

how can i write a sentence and use latex ? for example:

title = general collision “$(\Omega\_d)^2$”)

i the output appears $ symbol and the Omega\_d do not appear

---

<div class="post-metadata">

**Author:** ![elsuizo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elsuizo/32/89_2.png) [@elsuizo](https://discourse.julialang.org/u/elsuizo)\
**Post date:** [August 22, 2018, 12:24pm UTC](https://discourse.julialang.org/t/how-can-i-use-latex-in-julia-v1-0/13340/5 "2018-08-22T12:24:38Z")

</div>

you have not put the L before the string

---

<div class="post-metadata">

**Author:** ![leaoshark](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leaoshark/32/11462_2.png) [@leaoshark](https://discourse.julialang.org/u/leaoshark)\
**Post date:** [August 22, 2018, 1:14pm UTC](https://discourse.julialang.org/t/how-can-i-use-latex-in-julia-v1-0/13340/6 "2018-08-22T13:14:40Z")

</div>

not work this:

using Plots,LaTeXStrings  
plot(rand(10),xlabel=“General Collision”“$(\Omega\_d)^2$”)

---

<div class="post-metadata">

**Author:** ![mcarpe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcarpe/32/2719_2.png) [@mcarpe](https://discourse.julialang.org/u/mcarpe)\
**Post date:** [August 22, 2018, 1:35pm UTC](https://discourse.julialang.org/t/how-can-i-use-latex-in-julia-v1-0/13340/7 "2018-08-22T13:35:45Z")

</div>

Have you read my post above?  
The solution is there.

---

<div class="post-metadata">

**Author:** ![leaoshark](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leaoshark/32/11462_2.png) [@leaoshark](https://discourse.julialang.org/u/leaoshark)\
**Post date:** [August 22, 2018, 2:39pm UTC](https://discourse.julialang.org/t/how-can-i-use-latex-in-julia-v1-0/13340/8 "2018-08-22T14:39:25Z")

</div>

> [@mcarpe](#):
>
> L"(\Omega\_d)^2"

using Plots,LaTeXStrings  
plot(rand(10),xlabel= L"blablabla(\Omega\_d)^2")

i want the word blablabla has not the same font that the latex equation … blablabla have to be out of the latex

---

<div class="post-metadata">

**Author:** ![elsuizo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elsuizo/32/89_2.png) [@elsuizo](https://discourse.julialang.org/u/elsuizo)\
**Post date:** [August 22, 2018, 3:51pm UTC](https://discourse.julialang.org/t/how-can-i-use-latex-in-julia-v1-0/13340/9 "2018-08-22T15:51:47Z")

</div>

and so?

`plot(rand(10),xlabel= "blablabla"*L"(\Omega_d)^2"))`

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [August 22, 2018, 4:13pm UTC](https://discourse.julialang.org/t/how-can-i-use-latex-in-julia-v1-0/13340/10 "2018-08-22T16:13:57Z")

</div>

Or `L"blablabla $ (\Omega_d)^2 $"` with math markers `$` as in LaTeX.

---

<div class="post-metadata">

**Author:** ![mcarpe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcarpe/32/2719_2.png) [@mcarpe](https://discourse.julialang.org/u/mcarpe)\
**Post date:** [August 22, 2018, 7:36pm UTC](https://discourse.julialang.org/t/how-can-i-use-latex-in-julia-v1-0/13340/11 "2018-08-22T19:36:17Z")

</div>

Yes, I forgot to include the $.  
As far as I know, however, mixing normal text and math doesn’t currently work with the default `gr()` backend in `Plots.jl`. It should work with `pyplot()`.
