We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bad rendering of Super Exponential Cutoff Power Law Model used for 4FGL-DR3 equations in docs
**Gammapy version**
dev

**Bug description**

The latex rendering of equations in the following doc page is broken. 
https://docs.gammapy.org/dev/user-guide/model-gallery/spectral/plot_super_exp_cutoff_powerlaw_4fgl.html

I think that it is due to the `\a`that appears multiple times in `\frac`, but I am not really sure as I don't understand HTML.

Bad rendering of Super Exponential Cutoff Power Law Model used for 4FGL-DR3 equations in docs
**Gammapy version**
dev

**Bug description**

The latex rendering of equations in the following doc page is broken. 
https://docs.gammapy.org/dev/user-guide/model-gallery/spectral/plot_super_exp_cutoff_powerlaw_4fgl.html

I think that it is due to the `\a`that appears multiple times in `\frac`, but I am not really sure as I don't understand HTML.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `examples/models/spectral/plot_super_exp_cutoff_powerlaw_4fgl.py`
Content:
```
1 r"""
2 .. _super-exp-cutoff-powerlaw-4fgl-dr3-spectral-model:
3 
4 Super Exponential Cutoff Power Law Model used for 4FGL-DR3
5 ==========================================================
6 
7 This model parametrises super exponential cutoff power-law model spectrum used for 4FGL.
8 
9 It is defined by the following equation:
10 
11 .. math::
12 
13 
14     \phi(e) =
15             \begin{cases}
16                 \phi_0 \cdot \left(\frac{E}{E_0}\right)^{\frac{\a}{\Gamma_2} -\Gamma_1} \cdot \exp \left(
17                   \frac{\a}{\Gamma_2^2} \left( 1 - \left(\frac{E}{E_0}\right)^{\frac{\a}{\Gamma_2} \right)
18               \right)&
19                               \\
20                 \phi_0 \cdot \left(\frac{E}{E_0}\right)^{ -\Gamma_1 - \frac{\a}{2} \ln \frac{E}{E_0} - \frac{\a \Gamma_2}{6} \ln^2 \frac{E}{E_0} - \frac{\a \Gamma_2^2}{24} \ln^3 \frac{E}{E_0}}\\
21                 0 & \text{for } \left| \Gamma_2 \ln \frac{E}{E_0}  \right|
22             \end{cases}
23 
24 See Equation (2) and (3) in https://arxiv.org/pdf/2201.11184.pdf
25 """
26 
27 # %%
28 # Example plot
29 # ------------
30 # Here is an example plot of the model:
31 
32 from astropy import units as u
33 import matplotlib.pyplot as plt
34 from gammapy.modeling.models import (
35     Models,
36     SkyModel,
37     SuperExpCutoffPowerLaw4FGLDR3SpectralModel,
38 )
39 
40 energy_range = [0.1, 100] * u.TeV
41 model = SuperExpCutoffPowerLaw4FGLDR3SpectralModel(
42     index_1=1,
43     index_2=2,
44     amplitude="1e-12 TeV-1 cm-2 s-1",
45     reference="1 TeV",
46     expfactor=1e-2,
47 )
48 model.plot(energy_range)
49 plt.grid(which="both")
50 plt.ylim(1e-24, 1e-10)
51 
52 # %%
53 # YAML representation
54 # -------------------
55 # Here is an example YAML file using the model:
56 
57 model = SkyModel(spectral_model=model, name="super-exp-cutoff-power-law-4fgl-dr3-model")
58 models = Models([model])
59 
60 print(models.to_yaml())
61
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/examples/models/spectral/plot_super_exp_cutoff_powerlaw_4fgl.py b/examples/models/spectral/plot_super_exp_cutoff_powerlaw_4fgl.py
--- a/examples/models/spectral/plot_super_exp_cutoff_powerlaw_4fgl.py
+++ b/examples/models/spectral/plot_super_exp_cutoff_powerlaw_4fgl.py
@@ -10,16 +10,7 @@
 
 .. math::
 
-
-    \phi(e) =
-            \begin{cases}
-                \phi_0 \cdot \left(\frac{E}{E_0}\right)^{\frac{\a}{\Gamma_2} -\Gamma_1} \cdot \exp \left(
-                  \frac{\a}{\Gamma_2^2} \left( 1 - \left(\frac{E}{E_0}\right)^{\frac{\a}{\Gamma_2} \right)
-              \right)&
-                              \\
-                \phi_0 \cdot \left(\frac{E}{E_0}\right)^{ -\Gamma_1 - \frac{\a}{2} \ln \frac{E}{E_0} - \frac{\a \Gamma_2}{6} \ln^2 \frac{E}{E_0} - \frac{\a \Gamma_2^2}{24} \ln^3 \frac{E}{E_0}}\\
-                0 & \text{for } \left| \Gamma_2 \ln \frac{E}{E_0}  \right|
-            \end{cases}
+\phi(E) = \begin{cases} \phi_0 \cdot \left(\frac{E}{E_0}\right)^{\frac{a}{\Gamma_2} -\Gamma_1} \cdot \exp \left( \frac{a}{\Gamma_2^2}\left( 1 - \left(\frac{E}{E_0}\right)^{\Gamma_2} \right) \right) \\ \phi_0 \cdot \left(\frac{E}{E_0}\right)^{ -\Gamma_1 - \frac{a}{2} \ln \frac{E}{E_0} - \frac{a \Gamma_2}{6} \ln^2 \frac{E}{E_0} - \frac{a \Gamma_2^2}{24} \ln^3 \frac{E}{E_0}} & \text{for } \left| \Gamma_2 \ln \frac{E}{E_0} \right| < 10^{-2} \end{cases}
 
 See Equation (2) and (3) in https://arxiv.org/pdf/2201.11184.pdf
 """

{"golden_diff": "diff --git a/examples/models/spectral/plot_super_exp_cutoff_powerlaw_4fgl.py b/examples/models/spectral/plot_super_exp_cutoff_powerlaw_4fgl.py\n--- a/examples/models/spectral/plot_super_exp_cutoff_powerlaw_4fgl.py\n+++ b/examples/models/spectral/plot_super_exp_cutoff_powerlaw_4fgl.py\n@@ -10,16 +10,7 @@\n \n .. math::\n \n-\n-    \\phi(e) =\n-            \\begin{cases}\n-                \\phi_0 \\cdot \\left(\\frac{E}{E_0}\\right)^{\\frac{\\a}{\\Gamma_2} -\\Gamma_1} \\cdot \\exp \\left(\n-                  \\frac{\\a}{\\Gamma_2^2} \\left( 1 - \\left(\\frac{E}{E_0}\\right)^{\\frac{\\a}{\\Gamma_2} \\right)\n-              \\right)&\n-                              \\\\\n-                \\phi_0 \\cdot \\left(\\frac{E}{E_0}\\right)^{ -\\Gamma_1 - \\frac{\\a}{2} \\ln \\frac{E}{E_0} - \\frac{\\a \\Gamma_2}{6} \\ln^2 \\frac{E}{E_0} - \\frac{\\a \\Gamma_2^2}{24} \\ln^3 \\frac{E}{E_0}}\\\\\n-                0 & \\text{for } \\left| \\Gamma_2 \\ln \\frac{E}{E_0}  \\right|\n-            \\end{cases}\n+\\phi(E) = \\begin{cases} \\phi_0 \\cdot \\left(\\frac{E}{E_0}\\right)^{\\frac{a}{\\Gamma_2} -\\Gamma_1} \\cdot \\exp \\left( \\frac{a}{\\Gamma_2^2}\\left( 1 - \\left(\\frac{E}{E_0}\\right)^{\\Gamma_2} \\right) \\right) \\\\ \\phi_0 \\cdot \\left(\\frac{E}{E_0}\\right)^{ -\\Gamma_1 - \\frac{a}{2} \\ln \\frac{E}{E_0} - \\frac{a \\Gamma_2}{6} \\ln^2 \\frac{E}{E_0} - \\frac{a \\Gamma_2^2}{24} \\ln^3 \\frac{E}{E_0}} & \\text{for } \\left| \\Gamma_2 \\ln \\frac{E}{E_0} \\right| < 10^{-2} \\end{cases}\n \n See Equation (2) and (3) in https://arxiv.org/pdf/2201.11184.pdf\n \"\"\"\n", "issue": "Bad rendering of Super Exponential Cutoff Power Law Model used for 4FGL-DR3 equations in docs\n**Gammapy version**\r\ndev\r\n\r\n**Bug description**\r\n\r\nThe latex rendering of equations in the following doc page is broken. \r\nhttps://docs.gammapy.org/dev/user-guide/model-gallery/spectral/plot_super_exp_cutoff_powerlaw_4fgl.html\r\n\r\nI think that it is due to the `\\a`that appears multiple times in `\\frac`, but I am not really sure as I don't understand HTML.\r\n\nBad rendering of Super Exponential Cutoff Power Law Model used for 4FGL-DR3 equations in docs\n**Gammapy version**\r\ndev\r\n\r\n**Bug description**\r\n\r\nThe latex rendering of equations in the following doc page is broken. \r\nhttps://docs.gammapy.org/dev/user-guide/model-gallery/spectral/plot_super_exp_cutoff_powerlaw_4fgl.html\r\n\r\nI think that it is due to the `\\a`that appears multiple times in `\\frac`, but I am not really sure as I don't understand HTML.\r\n\n", "before_files": [{"content": "r\"\"\"\n.. _super-exp-cutoff-powerlaw-4fgl-dr3-spectral-model:\n\nSuper Exponential Cutoff Power Law Model used for 4FGL-DR3\n==========================================================\n\nThis model parametrises super exponential cutoff power-law model spectrum used for 4FGL.\n\nIt is defined by the following equation:\n\n.. math::\n\n\n    \\phi(e) =\n            \\begin{cases}\n                \\phi_0 \\cdot \\left(\\frac{E}{E_0}\\right)^{\\frac{\\a}{\\Gamma_2} -\\Gamma_1} \\cdot \\exp \\left(\n                  \\frac{\\a}{\\Gamma_2^2} \\left( 1 - \\left(\\frac{E}{E_0}\\right)^{\\frac{\\a}{\\Gamma_2} \\right)\n              \\right)&\n                              \\\\\n                \\phi_0 \\cdot \\left(\\frac{E}{E_0}\\right)^{ -\\Gamma_1 - \\frac{\\a}{2} \\ln \\frac{E}{E_0} - \\frac{\\a \\Gamma_2}{6} \\ln^2 \\frac{E}{E_0} - \\frac{\\a \\Gamma_2^2}{24} \\ln^3 \\frac{E}{E_0}}\\\\\n                0 & \\text{for } \\left| \\Gamma_2 \\ln \\frac{E}{E_0}  \\right|\n            \\end{cases}\n\nSee Equation (2) and (3) in https://arxiv.org/pdf/2201.11184.pdf\n\"\"\"\n\n# %%\n# Example plot\n# ------------\n# Here is an example plot of the model:\n\nfrom astropy import units as u\nimport matplotlib.pyplot as plt\nfrom gammapy.modeling.models import (\n    Models,\n    SkyModel,\n    SuperExpCutoffPowerLaw4FGLDR3SpectralModel,\n)\n\nenergy_range = [0.1, 100] * u.TeV\nmodel = SuperExpCutoffPowerLaw4FGLDR3SpectralModel(\n    index_1=1,\n    index_2=2,\n    amplitude=\"1e-12 TeV-1 cm-2 s-1\",\n    reference=\"1 TeV\",\n    expfactor=1e-2,\n)\nmodel.plot(energy_range)\nplt.grid(which=\"both\")\nplt.ylim(1e-24, 1e-10)\n\n# %%\n# YAML representation\n# -------------------\n# Here is an example YAML file using the model:\n\nmodel = SkyModel(spectral_model=model, name=\"super-exp-cutoff-power-law-4fgl-dr3-model\")\nmodels = Models([model])\n\nprint(models.to_yaml())\n", "path": "examples/models/spectral/plot_super_exp_cutoff_powerlaw_4fgl.py"}], "after_files": [{"content": "r\"\"\"\n.. _super-exp-cutoff-powerlaw-4fgl-dr3-spectral-model:\n\nSuper Exponential Cutoff Power Law Model used for 4FGL-DR3\n==========================================================\n\nThis model parametrises super exponential cutoff power-law model spectrum used for 4FGL.\n\nIt is defined by the following equation:\n\n.. math::\n\n\\phi(E) = \\begin{cases} \\phi_0 \\cdot \\left(\\frac{E}{E_0}\\right)^{\\frac{a}{\\Gamma_2} -\\Gamma_1} \\cdot \\exp \\left( \\frac{a}{\\Gamma_2^2}\\left( 1 - \\left(\\frac{E}{E_0}\\right)^{\\Gamma_2} \\right) \\right) \\\\ \\phi_0 \\cdot \\left(\\frac{E}{E_0}\\right)^{ -\\Gamma_1 - \\frac{a}{2} \\ln \\frac{E}{E_0} - \\frac{a \\Gamma_2}{6} \\ln^2 \\frac{E}{E_0} - \\frac{a \\Gamma_2^2}{24} \\ln^3 \\frac{E}{E_0}} & \\text{for } \\left| \\Gamma_2 \\ln \\frac{E}{E_0} \\right| < 10^{-2} \\end{cases}\n\nSee Equation (2) and (3) in https://arxiv.org/pdf/2201.11184.pdf\n\"\"\"\n\n# %%\n# Example plot\n# ------------\n# Here is an example plot of the model:\n\nfrom astropy import units as u\nimport matplotlib.pyplot as plt\nfrom gammapy.modeling.models import (\n    Models,\n    SkyModel,\n    SuperExpCutoffPowerLaw4FGLDR3SpectralModel,\n)\n\nenergy_range = [0.1, 100] * u.TeV\nmodel = SuperExpCutoffPowerLaw4FGLDR3SpectralModel(\n    index_1=1,\n    index_2=2,\n    amplitude=\"1e-12 TeV-1 cm-2 s-1\",\n    reference=\"1 TeV\",\n    expfactor=1e-2,\n)\nmodel.plot(energy_range)\nplt.grid(which=\"both\")\nplt.ylim(1e-24, 1e-10)\n\n# %%\n# YAML representation\n# -------------------\n# Here is an example YAML file using the model:\n\nmodel = SkyModel(spectral_model=model, name=\"super-exp-cutoff-power-law-4fgl-dr3-model\")\nmodels = Models([model])\n\nprint(models.to_yaml())\n", "path": "examples/models/spectral/plot_super_exp_cutoff_powerlaw_4fgl.py"}]}