diff --git a/src/output.jl b/src/output.jl index d2b7da7c..9e2bd7cb 100644 --- a/src/output.jl +++ b/src/output.jl @@ -52,6 +52,14 @@ function tex(plt::Plot, fn::AbstractString) end tex(fn::AbstractString) = tex(current(), fn) +function html(plt::Plot, fn::AbstractString) + fn = addExtension(fn, "html") + io = open(fn, "w") + show(io, MIME("text/html"), plt) + close(io) +end +html(fn::AbstractString) = html(current(), fn) + # ---------------------------------------------------------------- @@ -63,6 +71,7 @@ const _savemap = Dict( "ps" => ps, "eps" => eps, "tex" => tex, + "html" => html, ) function getExtension(fn::AbstractString)