Engee 文档

乳胶;乳胶

该页面正在翻译中。

Makie可以从https://github.com/stevengj/LaTeXStrings.jl[LaTeXStrings.jl]包使用https://github.com/Kolaru/MathTeXEngine.jl/[MathTeXEngine.jl]。

虽然这个引擎的响应速度足以在GLMakie中使用,但它只支持LaTeX最常用命令的子集。

使用L字符串

你可以通过 [医]拉丁文 对象到几乎任何具有文本标签的对象。 它们是使用 L 串宏前缀。 整个字符串被解释为一个方程,如果它不包含一个未转义 $. </无翻译>

using CairoMakie
f = Figure(fontsize = 18)

Axis(f[1, 1],
    title = L"\forall \mathcal{X} \in \mathbb{R} \quad \frac{x + y}{\sin(k^2)}",
    xlabel = L"\sum_a^b{xy} + \mathscr{L}",
    ylabel = L"\sqrt{\frac{a}{b}} - \mathfrak{W}"
)

f
8df2695

您还可以混合数学模式和文本模式。 为https://docs.julialang.org/en/v1/manual/strings/#string-interpolation[字符串插值]使用 %$而不是 $: </无翻译>

using CairoMakie
f = Figure(fontsize = 18)
t = "text"
Axis(f[1,1], title=L"Some %$(t) and some math: $\frac{2\alpha+1}{y}$")

f
cf742ec

统一字体

我们提供了一个LaTeX主题,可以轻松切换到所有文本的LaTeX默认字体。 </无翻译>

using CairoMakie
with_theme(theme_latexfonts()) do
    fig = Figure()
    Label(fig[1, 1], "A standard Label", tellwidth = false)
    Label(fig[2, 1], L"A LaTeXString with a small formula $x^2$", tellwidth = false)
    Axis(fig[3, 1], title = "An axis with matching font for the tick labels")
    fig
end
9c60725