From a21811ee8b9893a0e865735725a633dfed8d80b8 Mon Sep 17 00:00:00 2001
From: Marc Arene <marc.arene@apc.in2p3.fr>
Date: Tue, 30 Mar 2021 17:38:14 +0200
Subject: [PATCH] use \providecommand instead of \newcommand to avoid latex bug

---
 bilby/core/utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bilby/core/utils.py b/bilby/core/utils.py
index 6797fe821..6867c0539 100644
--- a/bilby/core/utils.py
+++ b/bilby/core/utils.py
@@ -1190,7 +1190,7 @@ def latex_plot_format(func):
         _old_family = rcParams["font.family"]
         if find_executable("latex"):
             rcParams["text.usetex"] = True
-            rcParams['text.latex.preamble'] = r'\newcommand{\mathdefault}[1][]{}'
+            rcParams['text.latex.preamble'] = r'\providecommand{\mathdefault}[1][]{}'
         else:
             rcParams["text.usetex"] = False
         rcParams["font.serif"] = "Computer Modern Roman"
-- 
GitLab