From 52a6f2717b150f0d0d19079fad01569842b2f0a3 Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Mon, 23 Dec 2024 19:27:15 +0300 Subject: [PATCH] Use raw strings for math equations (#881) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes “Math input error” which can be seen in the documentation: https://sphinx-book-theme.readthedocs.io/en/stable/reference/notebooks.html#math --- docs/content/notebooks.md | 2 +- docs/reference/notebooks.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/notebooks.md b/docs/content/notebooks.md index f75d0f4d..e2a8221a 100644 --- a/docs/content/notebooks.md +++ b/docs/content/notebooks.md @@ -115,7 +115,7 @@ print("this works for code cells too, if you add a `margin` tag to them") ```{code-cell} ipython3 # You can also include enriched outputs like Math from IPython.display import Math -Math("\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}") +Math(r"\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}") ``` ## Removing content before publishing diff --git a/docs/reference/notebooks.md b/docs/reference/notebooks.md index 4b7b3e6a..da2b7923 100644 --- a/docs/reference/notebooks.md +++ b/docs/reference/notebooks.md @@ -123,7 +123,7 @@ plt.show() ```{code-cell} ipython3 # You can also include enriched outputs like Math from IPython.display import Math -Math("\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}") +Math(r"\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}") ``` ### Pandas DataFrames