MakieTeX.jl

TeX integration in Makie
Author JuliaPlots
Popularity
24 Stars
Updated Last
1 Year Ago
Started In
April 2020

MakieTeX

MakieTeX works by compiling a latex document and transforming it to a renderable svg for CairoMakie or raster image for GLMakie.

using GLMakie, MakieTeX
fig, ax, p = teximg(raw"\hat {f}(\xi )=\int _{-\infty }^{\infty }f(x)\ e^{-2\pi ix\xi }~ dx", textsize=100)
# Don't stretch the text 
ax.autolimitaspect[] = 1f0
autolimits!(ax)
fig

teximg

using GLMakie MakieTeX
fig = Figure(resolution = (400, 300));
ax = Axis(fig[1, 1]);
hidexdecorations!(ax); hideydecorations!(ax);
tex = LTeX(fig[2, 1], raw"\int \mathbf E \cdot d\mathbf a = \frac{Q_{encl}}{4\pi\epsilon_0}", textsize=20);
fig

ltex

There is a way to integrate LTeX into a legend, but it's pretty hacky now. Ask on #makie in the JuliaLang Slack if you want to know. legendtex

Used By Packages

No packages found.