# Latex matrix in Makie

**URL:** https://discourse.julialang.org/t/latex-matrix-in-makie/115608
**Category:** General Usage
**Tags:** question, latex, latexstrings, cairomakie
**Created:** [June 13, 2024, 3:54pm UTC](https://discourse.julialang.org/t/latex-matrix-in-makie/115608 "2024-06-13T15:54:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![VictorSeven](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/victorseven/32/50437_2.png) [@VictorSeven](https://discourse.julialang.org/u/VictorSeven)
#### Post date: [June 13, 2024, 3:54pm UTC](https://discourse.julialang.org/t/latex-matrix-in-makie/115608/1 "2024-06-13T15:54:09Z")

</div>

Hi,

I’m trying to show a matrix in Makie, via `text!`. Latex in general works well, but when I try to plot the matrix

`text!(ax, pos; text=L"\begin{pmatrix} 1 & 2 \\ 3 & 4\end{pmatrix}")`

I receive an error

```julia
ERROR: LoadError: TeXParseError: unsupported command \begin
at position 7 (string index 7)
\begin{pmatrix}1 & 2 \\ 3 & 4\end{pmatrix}
      ^

```

It seems that Makie does not like the `\begin` command. I have not found any potential workaround for it. If you know of any, I’d be grateful.

If this is really not yet supported, also, is there any ongoing issue on Github?

Hopefully this is not a duplicated question, but I’ve been searching for a while already and could not find any hint for this problem. Thanks!!

---

<div class="post-metadata">

### Author: ![barucden](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/barucden/32/26154_2.png) [@barucden](https://discourse.julialang.org/u/barucden)
#### Post date: [June 13, 2024, 4:03pm UTC](https://discourse.julialang.org/t/latex-matrix-in-makie/115608/2 "2024-06-13T16:03:07Z")

</div>

It’s probably not supported by MathTeXEngine: [[FEATURE] Supporting Matrix Notation · Issue #48 · Kolaru/MathTeXEngine.jl · GitHub](https://github.com/Kolaru/MathTeXEngine.jl/issues/48)

---

<div class="post-metadata">

### Author: ![ederag](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ederag/32/4106_2.png) [@ederag](https://discourse.julialang.org/u/ederag)
#### Post date: [June 13, 2024, 5:24pm UTC](https://discourse.julialang.org/t/latex-matrix-in-makie/115608/3 "2024-06-13T17:24:28Z")

</div>

Try to use [MakieTeX](https://github.com/JuliaPlots/MakieTeX.jl) ?

---

<div class="post-metadata">

### Author: ![VictorSeven](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/victorseven/32/50437_2.png) [@VictorSeven](https://discourse.julialang.org/u/VictorSeven)
#### Post date: [June 14, 2024, 2:05pm UTC](https://discourse.julialang.org/t/latex-matrix-in-makie/115608/4 "2024-06-14T14:05:14Z")

</div>

This is a fantastic package and it was very able to accomplish what I have in mind. Thank you very much!

Although Makie out-of-the-box support would be the best, MakieTeX seems to add a lot of really good functionality.
