Markdown and LaTeX

Markdown and LaTeX

Everything fundamental renders out of the box — including typeset math. This note is the living cheatsheet.

Text

Bold, italic, strikethrough, and inline code. A link too. Use a hard break by ending a line with two spaces, or just let paragraphs flow.

Lists

  1. Ordered item
  2. Second item
    • Nested bullet
    • Another
  3. Done

And task lists:

Blockquote

Stay curious. The notes you keep today are the memory you’ll want tomorrow.

— someone who writes things down

Code

Inline const x = 1;. Fenced with a language tag:

// A tiny debouncefunction debounce(fn, ms = 200) {  let t;  return (...args) => {    clearTimeout(t);    t = setTimeout(() => fn(...args), ms);  };}
def fib(n):    a, b = 0, 1    for _ in range(n):        a, b = b, a + b    return a

Table

Symbol Meaning Example
code x + 1
bold strong emphasis hi
{ } a set {1, 2, 3}

LaTeX

Inline math: the quadratic formula x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}, and the golden ratio φ=1+52\varphi = \frac{1 + \sqrt{5}}{2}.

Display math:

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

And a matrix:

A=(abcd),det(A)=adbc A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}, \qquad \det(A) = ad - bc

Footnote

LaTeX is handled by KaTeX at build time.[1]


  1. There’s no JavaScript math engine needed on the client — it’s all server-rendered HTML. ↩︎