From 65c9a46c8da6277d12b8cd1651d1d6c2bd7a657f Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Mon, 6 Apr 2020 22:00:51 +0200 Subject: [PATCH] rely on require --- Project.toml | 2 -- src/backends/pgfplotsx.jl | 10 ++++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Project.toml b/Project.toml index 45d54ec7..0b4ebefb 100644 --- a/Project.toml +++ b/Project.toml @@ -12,7 +12,6 @@ FixedPointNumbers = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" GR = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" GeometryTypes = "4d00f742-c7ba-57c2-abde-4428a4b178cb" JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Measures = "442fdcdd-2543-5da2-b0f3-8c86c306513e" NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" @@ -38,7 +37,6 @@ FixedPointNumbers = "0.6, 0.7, 0.8" GR = "0.46, 0.47, 0.48" GeometryTypes = "0.7, 0.8" JSON = "0.21" -LaTeXStrings = "1" Measures = "0.3" NaNMath = "0.3" PGFPlotsX = "1.2.0" diff --git a/src/backends/pgfplotsx.jl b/src/backends/pgfplotsx.jl index 3cb2673b..17aa4815 100644 --- a/src/backends/pgfplotsx.jl +++ b/src/backends/pgfplotsx.jl @@ -1,5 +1,4 @@ using Contour: Contour -using LaTeXStrings using UUIDs Base.@kwdef mutable struct PGFPlotsXPlot is_created::Bool = false @@ -904,9 +903,12 @@ function pgfx_sanitize_string(s::AbstractString) s = replace(s, r"\\?\{" => "\\{") s = replace(s, r"\\?\}" => "\\}") end -function pgfx_sanitize_string(s::LaTeXString) - s = replace(s, r"\\?\#" => "\\#") - s = replace(s, r"\\?\%" => "\\%") +@require LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" begin + using LaTeXStrings + function pgfx_sanitize_string(s::LaTeXString) + s = replace(s, r"\\?\#" => "\\#") + s = replace(s, r"\\?\%" => "\\%") + end end function pgfx_sanitize_plot!(plt) for (key, value) in plt.attr