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”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.