LaTeX Rendering
DiagrammaticEquations.jl can render equations from a Decapode eDSL block as LaTeX strings.
using DiagrammaticEquations
eqs = decapode_latex_strings(quote
h::Form0
Γ::Constant
∂ₜ(h) == Γ * h
q == h + Γ
end)
eqs2-element Vector{Union{Nothing, String}}:
"\\partial_t\\left( h \\right) = \\Gamma \\cdot h"
"q = h + \\Gamma"For notebook-style LaTeX display, use decapode_latex (or @decapode_latex) which provides a text/latex show method.
decapode_latex(quote
h::Form0
Γ::Form0
n::Constant
∂ₜ(h) == Γ * δ(d(h) ∧ mag(♯(d(h))) ^ (n - 1) ∧ h ^ (n + 2))
end)\[\begin{aligned}\partial_t\left( h \right) = \Gamma \cdot \delta\left( d\left( h \right) \wedge \left( \mathrm{mag}\left( \sharp\left( d\left( h \right) \right) \right) \right)^{n - 1} \wedge h^{n + 2} \right)\end{aligned}\]