Skip to content

Commit 02d369d

Browse files
committed
Manually trigger latexify extension from Plots with Requires
1 parent fd7198c commit 02d369d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ext/UnitfulExt.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ import RecipesBase
99
import LaTeXStrings: LaTeXString
1010
import Latexify: latexify
1111

12+
# Very ugly hack for loading the Unitful + Latexify extension on old versions of Julia:
13+
if !isdefined(Base, :get_extension)
14+
using Requires
15+
function __init__()
16+
# @info "using Requires" unitfullatexifyext_fname isdefined(Base, :get_extension)
17+
unitfullatexifyext_fname = joinpath(dirname(dirname(pathof(Unitful))), "ext", "LatexifyExt.jl")
18+
@require Latexify="5c2747f8-3f33-11e9-0e5d-1d1b2b2a6f19" include(unitfullatexifyext_fname)
19+
end
20+
end
21+
1222
const MissingOrQuantity = Union{Missing, <:Quantity, <:LogScaled}
1323

1424
#==========

0 commit comments

Comments
 (0)