Adding Math Support

I’ve added support for mathematical formulas using LaTeX syntax (powered by remark-math and rehype-katex).

This allows to write inline math like E=mc2E=mc^2 or block math for more complex equations.

How to use it

Inline Math

Wrap your formula in single dollar signs $:

The mass-energy equivalence is $E=mc^2$

Result: The mass-energy equivalence is E=mc2E=mc^2

Block Math

Wrap your formula in double dollar signs $$:

$$
f(x) = \int_{-\infty}^\infty
    \hat f(\xi)\,e^{2 \pi i \xi x}
    \,d\xi
$$

Result:

f(x)=βˆ«βˆ’βˆžβˆžf^(ΞΎ) e2Ο€iΞΎx dΞΎf(x) = \int_{-\infty}^\infty \hat f(\xi)\,e^{2 \pi i \xi x} \,d\xi

This will be super useful for future posts about algorithms, complexity analysis (Big O notation), and performance metrics!

Common Symbols Cheat Sheet

Here are some common symbols you might need:

CategorySymbol NameLaTeX SyntaxRendered Example
ComplexityBig O / Omega / ThetaO(n), \Omega(n), \Theta(n)O(n),Ω(n),Θ(n)O(n), \Omega(n), \Theta(n)
Greek (Stats)Alpha, Beta, Delta\alpha, \beta, \DeltaΞ±,Ξ²,Ξ”\alpha, \beta, \Delta
Greek (Stats)Mu, Sigma, Theta\mu, \sigma, \thetaΞΌ,Οƒ,ΞΈ\mu, \sigma, \theta
ArithmeticFractions\frac{n}{2}n2\frac{n}{2}
ArithmeticSquare Root\sqrt{n}n\sqrt{n}
AlgebraExponents / Subsn^2, x_in2,xin^2, x_i
CalculusSummation\sum_{i=0}^n iβˆ‘i=0ni\sum_{i=0}^n i
CalculusIntegration\int_{a}^{b} x dx∫abxdx\int_{a}^{b} x dx
CalculusPartial Derivative\frac{\partial y}{\partial x}βˆ‚yβˆ‚x\frac{\partial y}{\partial x}
ComparisonInequality / Approx\leq, \geq, \approx, \neq≀,β‰₯,β‰ˆ,β‰ \leq, \geq, \approx, \neq
LogicAND, OR, NOT\wedge, \vee, \neg∧,∨,¬\wedge, \vee, \neg
LogicQuantifiers\forall, \existsβˆ€,βˆƒ\forall, \exists
SetsMembership / Subset\in, \subset, \emptyset∈,βŠ‚,βˆ…\in, \subset, \emptyset
SetsUnion / Intersect\cup, \capβˆͺ,∩\cup, \cap
ArrowsImplies / Mapping\to, \Rightarrow, \iffβ†’,β‡’,β€…β€ŠβŸΊβ€…β€Š\to, \Rightarrow, \iff
Matrices2x2 Matrix\begin{bmatrix} a & b \\ c & d \end{bmatrix}[abcd]\begin{bmatrix} a & b \\ c & d \end{bmatrix}
MiscInfinity / Dots\infty, \dots, \cdots∞,…,β‹―\infty, \dots, \cdots
TextRoman Text\text{efficiency}efficiency\text{efficiency}

Common Algorithm & ML Snippets

ConceptLaTeX SnippetRendered
Master TheoremT(n) = aT\left(\frac{n}{b}\right) + f(n)T(n)=aT(nb)+f(n)T(n) = aT\left(\frac{n}{b}\right) + f(n)
Bayes’ TheoremP(A \mid B) = \frac{P(B \mid A)P(A)}{P(B)}P(A∣B)=P(B∣A)P(A)P(B)P(A \mid B) = \frac{P(B \mid A)P(A)}{P(B)}
Sigmoid FunctionS(x) = \frac{1}{1 + e^{-x}}S(x)=11+eβˆ’xS(x) = \frac{1}{1 + e^{-x}}
Euclidean Distanced = \sqrt{\sum_{i=1}^n (q_i - p_i)^2}d=βˆ‘i=1n(qiβˆ’pi)2d = \sqrt{\sum_{i=1}^n (q_i - p_i)^2}
Gradient Descent\theta_{j} := \theta_{j} - \alpha \frac{\partial}{\partial \theta_{j}} J(\theta)ΞΈj:=ΞΈjβˆ’Ξ±βˆ‚βˆ‚ΞΈjJ(ΞΈ)\theta_{j} := \theta_{j} - \alpha \frac{\partial}{\partial \theta_{j}} J(\theta)

For a full list, check out the KaTeX Support Table.

Comments

Β© 2025 Threads of Thought. Built with Astro.