Makie.jl icon indicating copy to clipboard operation
Makie.jl copied to clipboard

Add makie latex string note

Open jeremiahpslewis opened this issue 3 years ago • 8 comments

~Based on this question, trying to make the docs a bit clearer on LatexString handling.~

Updated to 'stress test' the new Latex support in MathTeXEngine.jl v0.5+.

jeremiahpslewis avatar Sep 21 '22 09:09 jeremiahpslewis

Have a look at the other link in the section to see how markdown links are written

jkrumbiegel avatar Sep 21 '22 12:09 jkrumbiegel

Did you try this on Makie#master?

https://github.com/Kolaru/MathTeXEngine.jl/blob/50f8b4cbe2b5b477f1ff59b70f119ae97c49041f/prototype/prototype.jl#L162

It seems that mathbb etc should work on [email protected], which isn't compatible with the latest release of Makie.

cc @Kolaru

EDIT: I've checked and it acutally works

image

greimel avatar Sep 21 '22 13:09 greimel

@greimel Do you have a full reproducible example? I'm on

Status `/private/var/folders/7c/hm96b6vx3r9dc4_s5f6y9m1r0000gn/T/jl_J8s9XE/Project.toml`
  [13f3f980] CairoMakie v0.8.13 `https://github.com/JuliaPlots/Makie.jl.git:CairoMakie#master`
  [5ae59095] Colors v0.12.8
  [ee78f7c6] Makie v0.17.13 `https://github.com/JuliaPlots/Makie.jl.git#master`
  [0a4f8689] MathTeXEngine v0.5.1

and get errors when trying to render Latex \mathbb.

jeremiahpslewis avatar Sep 21 '22 14:09 jeremiahpslewis

Does plotting without latex work for you? You generally have to checkout MakieCore#master as well.

This works for me

begin
	using Pkg
	Pkg.activate(temp = true)
	pkg"add MakieCore#master Makie#master CairoMakie#master"
	using CairoMakie
end

scatter(rand(10), rand(10), axis = (; title = L"this is $\mathbb{E}$"))

greimel avatar Sep 21 '22 14:09 greimel

Works for me in Pluto.jl, ~but fails in the command line with the following error~ and works in terminal in a fresh session.

jeremiahpslewis avatar Sep 21 '22 14:09 jeremiahpslewis

Is that in a fresh julia session?

greimel avatar Sep 21 '22 14:09 greimel

Is that in a fresh julia session?

Nope. Works now, thanks!

jeremiahpslewis avatar Sep 21 '22 14:09 jeremiahpslewis

@jkrumbiegel This PR took a bit of an interesting turn, looks like the necessary Latex support is available, but not yet released as a tagged version. I've changed the docs to include a \mathbb and \mathcal example.

jeremiahpslewis avatar Sep 21 '22 14:09 jeremiahpslewis

\mathbb, \mathcal, \mathscr and \mathfrak should work in MathTeXEngine v0.5.1. And it should be compatible with Makie on master at least.

Kolaru avatar Sep 21 '22 20:09 Kolaru