Skip to content

Commit fdd3519

Browse files
authored
🐛 FIX: adding overflow x for math blocks (#213)
1 parent 3b002b4 commit fdd3519

File tree

5 files changed

+34
-6
lines changed

5 files changed

+34
-6
lines changed

docs/reference/markdown_limits.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,30 @@ Link to above: {eq}`my_label2`
211211
:
212212
[g(n) \leq c \cdot f(n)]\}$$
213213

214+
A really long math equation
215+
216+
$$
217+
\begin{align}
218+
\mathrm{SetConv} \left( \{(x^{c},y^{c})\}_{c=1}^{C} \right)(x) \left( \{(x^{c},y^{c})\}_{c=1}^{C} \right)(x) \left( \{(x^{c},y^{c})\}_{c=1}^{C} \right)(x)
219+
&= \sum_{c=1}^{C} y^{(c)} w_{\theta} \left( x - x^{(c)} \right) \sum_{c=1}^{C} y^{(c)} w_{\theta} \left( x - x^{(c)} \right) \sum_{c=1}^{C} y^{(c)} w_{\theta} \left( x - x^{(c)} \right)\\
220+
&= \left( y^{(c')} w_{\theta} \left( x - x^{(c')} \right) \right) + \sum_{c \neq c'} y^{(c)} w_{\theta} \left( x - x^{(c)} \right) \\
221+
&= 0 + \sum_{c \neq c'} y^{(c)} w_{\theta} \left( x - x^{(c)} \right)
222+
\end{align}
223+
$$
224+
225+
Full width equations work
226+
227+
```{math}
228+
:class: full-width
229+
230+
\begin{align}
231+
\mathrm{SetConv} \left( \{(x^{c},y^{c})\}_{c=1}^{C} \right)(x) \left( \{(x^{c},y^{c})\}_{c=1}^{C} \right)(x) \left( \{(x^{c},y^{c})\}_{c=1}^{C} \right)(x)
232+
&= \sum_{c=1}^{C} y^{(c)} w_{\theta} \left( x - x^{(c)} \right) \sum_{c=1}^{C} y^{(c)} w_{\theta} \left( x - x^{(c)} \right) \sum_{c=1}^{C} y^{(c)} w_{\theta} \left( x - x^{(c)} \right)\\
233+
&= \left( y^{(c')} w_{\theta} \left( x - x^{(c')} \right) \right) + \sum_{c \neq c'} y^{(c)} w_{\theta} \left( x - x^{(c)} \right) \\
234+
&= 0 + \sum_{c \neq c'} y^{(c)} w_{\theta} \left( x - x^{(c)} \right)
235+
\end{align}
236+
```
237+
214238
+++
215239

216240
### Margins

sphinx_book_theme/static/sphinx-book-theme.c88e0c127e963b57414b7cadb8a2d25b.css

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sphinx_book_theme/static/sphinx-book-theme.f6fc1694060034a26e788a4d7a24fc57.css

Lines changed: 0 additions & 5 deletions
This file was deleted.

sphinx_book_theme/theme.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[theme]
33
inherit = pydata_sphinx_theme
44
pygments_style = tango
5-
stylesheet = sphinx-book-theme.f6fc1694060034a26e788a4d7a24fc57.css
5+
stylesheet = sphinx-book-theme.c88e0c127e963b57414b7cadb8a2d25b.css
66

77
[options]
88
single_page = False

src/scss/_main.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ main.bd-content {
8181
font-size: 1.2em;
8282
}
8383

84+
div.math {
85+
overflow-x: auto;
86+
}
87+
8488
// Images
8589
img {
8690
display: block;

0 commit comments

Comments
 (0)