Skip to content

Commit 03dc799

Browse files
feat: implement latexification for Connector
1 parent 276aef3 commit 03dc799

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/systems/analysis_points.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ function Base.show(io::IO, ::MIME"text/plain", ap::AnalysisPoint)
140140
end
141141
end
142142

143+
Symbolics.hide_lhs(::AnalysisPoint) = true
144+
143145
@latexrecipe function f(ap::AnalysisPoint)
144146
index --> :subscript
145147
snakecase --> true

src/systems/connectors.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ function Base.show(io::IO, c::Connection)
4141
print(io, ")")
4242
end
4343

44+
@latexrecipe function f(c::Connection)
45+
index --> :subscript
46+
return Expr(:call, :connect, map(nameof, c.systems)...)
47+
end
48+
49+
function Base.show(io::IO, ::MIME"text/latex", ap::Connection)
50+
print(io, latexify(ap))
51+
end
52+
4453
isconnection(_) = false
4554
isconnection(_::Connection) = true
4655
"""

0 commit comments

Comments
 (0)