From 6b8b5bcad3405121c59848c293d93a4a7fd9485e Mon Sep 17 00:00:00 2001 From: Niklas Korsbo Date: Sun, 21 Mar 2021 09:27:48 +0100 Subject: [PATCH] Add support for VSCode plot pane rendering. --- src/LaTeXStrings.jl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/LaTeXStrings.jl b/src/LaTeXStrings.jl index 40160b1..849b0e4 100644 --- a/src/LaTeXStrings.jl +++ b/src/LaTeXStrings.jl @@ -105,6 +105,17 @@ function Base.show(io::IO, s::LaTeXString) end end +Base.showable(::MIME"juliavscode/html", ::LaTeXString) = true +function Base.repr(::MIME"juliavscode/html", s::LaTeXString) + mathjax_import_str = """ + + + + + """ + return mathjax_import_str * s.s +end + Base.firstindex(s::LaTeXString) = firstindex(s.s) Base.lastindex(s::LaTeXString) = lastindex(s.s) Base.iterate(s::LaTeXString, i::Int) = iterate(s.s, i)