Update output.jl

This commit is contained in:
Simon Christ 2020-04-21 16:51:25 +02:00 committed by GitHub
parent 2c3f79783d
commit ee2646b565
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,6 +45,7 @@ end
eps(fn::AbstractString) = eps(current(), fn)
function tex(plt::Plot, fn::AbstractString)
fn = addExtension(fn, "tex")
io = open(fn, "w")
show(io, MIME("application/x-tex"), plt)
close(io)
@ -102,7 +103,7 @@ end
function addExtension(fn::AbstractString, ext::AbstractString)
try
oldext = getExtension(fn)
if oldext == ext
if _savemap[oldext] == ext
return fn
else
return "$fn.$ext"