Latex matrix in Makie


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

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!!

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

1 Like

Try to use MakieTeX ?

1 Like

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.

1 Like