Melan

Maths and CodePen Embeds

A sample post showing KaTeX equations and an embedded CodePen.

1 min read

Posts can include equations, written in TeX, and live demos from CodePen. Both work with nothing more than Markdown.

Maths#

Wrap inline maths in single dollar signs: the area of a circle is A=πr2A = pi r^2, and Euler’s identity is eiπ+1=0e^{ipi} + 1 = 0.

Put display maths on its own lines between double dollar signs:

∫−∞∞e−x2 dx=πint_{-infty}^{infty} e^{-x^2} , dx = sqrt{pi}

Wide equations scroll sideways on small screens:

∑n=1∞1n2=π26f(x)=a0+∑n=1∞(ancos⁡nπxL+bnsin⁡nπxL)sum_{n=1}^{infty} rac{1}{n^2} = rac{pi^2}{6} qquad f(x) = a_0 + sum_{n=1}^{infty} left( a_n cos rac{n pi x}{L} + b_n sin rac{n pi x}{L} \right)

CodePen#

Paste a link to a pen on a line of its own and it becomes an embed that follows light and dark mode:

A CodePen link inside a sentence, like this one, stays a normal link.

© 2026 Melan

Powered by Melan