Posts here can use LaTeX directly in markdown. Inline math like eiπ+1=0e^{i\pi} + 1 = 0 sits in the line, and display math gets its own block:

ex2dx=π \int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}

Everything is rendered to HTML when the site builds, so there is no JavaScript involved and nothing flashes on load. Here is a matrix, because why not:

A=[1234],detA=2 A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}, \qquad \det A = -2

Code

Code blocks are highlighted at build time too.

import numpy as np

def newton(f, df, x0, tol=1e-10, max_iter=50):
    x = x0
    for _ in range(max_iter):
        step = f(x) / df(x)
        x -= step
        if abs(step) < tol:
            return x
    raise RuntimeError("did not converge")

print(newton(lambda x: x**2 - 2, lambda x: 2*x, 1.0))

Blockquotes look like this. Good for pulling out the one line that matters.

And a table, for completeness:

MethodOrderCost per step
Bisection11 eval
Newton22 evals
Secant1.6181 eval