| 1 |
/** |
| 2 |
* Mathematics via MathJax. |
| 3 |
* |
| 4 |
* This is designed for MathJax v3 |
| 5 |
* ref: https://www.sphinx-doc.org/en/master/usage/extensions/math.html#module-sphinx.ext.mathjax |
| 6 |
*/ |
| 7 |
|
| 8 |
// Applies to all math elements |
| 9 |
span.math, |
| 10 |
div.math { |
| 11 |
align-items: center; |
| 12 |
display: flex; |
| 13 |
max-width: 100%; |
| 14 |
|
| 15 |
// This will be over-ridden for the y-direction and divs |
| 16 |
overflow: hidden; |
| 17 |
} |
| 18 |
|
| 19 |
// Inline-only |
| 20 |
span.math { |
| 21 |
display: inline-flex; |
| 22 |
align-items: baseline; |
| 23 |
} |
| 24 |
|
| 25 |
// Block-level only |
| 26 |
div.math { |
| 27 |
gap: 0.5em; |
| 28 |
|
| 29 |
// So that the eqno shows up after the equation |
| 30 |
flex-direction: row-reverse; |
| 31 |
|
| 32 |
// The equation number / link |
| 33 |
span.eqno a.headerlink { |
| 34 |
position: relative; |
| 35 |
font-size: 1em; |
| 36 |
} |
| 37 |
|
| 38 |
// The math container |
| 39 |
mjx-container { |
| 40 |
flex-grow: 1; |
| 41 |
padding-bottom: 0.2rem; |
| 42 |
overflow: auto; |
| 43 |
|
| 44 |
// Set height to 0 so that it does not cause scrollbars to appear |
| 45 |
// ref: https://github.com/mathjax/MathJax/issues/2521 |
| 46 |
mjx-assistive-mml { |
| 47 |
height: 0; |
| 48 |
} |
| 49 |
} |
| 50 |
} |