Skip to content

Commit 52a6f27

Browse files
authored
Use raw strings for math equations (#881)
This fixes “Math input error” which can be seen in the documentation: https://sphinx-book-theme.readthedocs.io/en/stable/reference/notebooks.html#math
1 parent 5395804 commit 52a6f27

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/content/notebooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ print("this works for code cells too, if you add a `margin` tag to them")
115115
```{code-cell} ipython3
116116
# You can also include enriched outputs like Math
117117
from IPython.display import Math
118-
Math("\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}")
118+
Math(r"\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}")
119119
```
120120

121121
## Removing content before publishing

docs/reference/notebooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ plt.show()
123123
```{code-cell} ipython3
124124
# You can also include enriched outputs like Math
125125
from IPython.display import Math
126-
Math("\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}")
126+
Math(r"\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}")
127127
```
128128

129129
### Pandas DataFrames

0 commit comments

Comments
 (0)