Skip to content

Commit 114f6ad

Browse files
automate latexify in notebooks
1 parent 0bcd660 commit 114f6ad

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/latexify_recipes.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,8 @@ end
2828
@latexrecipe function f(sys::ModelingToolkit.AbstractSystem)
2929
return latexify(equations(sys))
3030
end
31+
32+
Base.show(io::IO, ::MIME"text/latex", x::ModelingToolkit.Num) = print(io, latexify(x))
33+
Base.show(io::IO, ::MIME"text/latex", x::ModelingToolkit.Symbolic) = print(io, latexify(x))
34+
Base.show(io::IO, ::MIME"text/latex", x::ModelingToolkit.AbstractSystem) = print(io, latexify(x))
35+
Base.show(io::IO, ::MIME"text/latex", x::Vector{ModelingToolkit.Equation}) = print(io, latexify(x))

0 commit comments

Comments
 (0)