Math
Math can be written directly in MDX. Use it near the prose and executable cells that depend on the notation so readers do not have to jump between pages.
Inline Math
Section titled “Inline Math”Inline math uses single dollar signs. In the logistic map, the state is and the parameter is .
Subscripts and superscripts also work together: .
Block Math
Section titled “Block Math”Block math uses double dollar signs:
Matrix
Section titled “Matrix”Long Equations
Section titled “Long Equations”A display equation wider than the page scrolls horizontally inside itself, so the rest of the page keeps its width. The equation can be focused with the keyboard and scrolled with the arrow keys.
Aligned Equations
Section titled “Aligned Equations”With a Code Cell
Section titled “With a Code Cell”Use an executable cell when readers should verify or vary a formula.
Python + Pyodide
Calculate a quadratic with Python
Cell actions
y = x**2 + 2*x + 1
print(f"f({x}) = {y}")Run the cell to show its output.