Skip to content

Commit

Permalink
Use raw strings for math equations (#881)
Browse files Browse the repository at this point in the history
This fixes “Math input error” which can be seen in the documentation:
https://sphinx-book-theme.readthedocs.io/en/stable/reference/notebooks.html#math
  • Loading branch information
mitya57 authored Dec 23, 2024
1 parent 5395804 commit 52a6f27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/content/notebooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/notebooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 52a6f27

Please sign in to comment.