diff --git a/Project.toml b/Project.toml index 4bdc82f01..d04ae760e 100644 --- a/Project.toml +++ b/Project.toml @@ -12,6 +12,12 @@ ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46" Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" +[weakdeps] +Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" + +[extensions] +ModelingToolkitStandardLibraryLatexify = "Latexify" + [compat] Aqua = "0.8" ChainRulesCore = "1.24" @@ -21,6 +27,7 @@ DataInterpolations = "6" ForwardDiff = "0.10" DiffEqBase = "6.152" IfElse = "0.1" +Latexify = "0.16" LinearAlgebra = "1.10" Optimization = "4" ModelingToolkit = "9.47" diff --git a/ext/ModelingToolkitStandardLibraryLatexifyExt.jl b/ext/ModelingToolkitStandardLibraryLatexifyExt.jl new file mode 100644 index 000000000..300f3bdcb --- /dev/null +++ b/ext/ModelingToolkitStandardLibraryLatexifyExt.jl @@ -0,0 +1,14 @@ +module ModelingToolkitStandardLibraryLatexifyExt + +using ModelingToolkitStandardLibrary +using Latexify + +@latexrecipe function f(n::AnalysisPoint) + env --> :equation + cdot --> false + index --> :subscript + + return nameof(n) +end + +end \ No newline at end of file