My blog is using Kramdown markdown converter. Since Kramdown supports MathJax, you can do PNG rendering using Latex syntax. In plain words, you can put fancy math expressions like this in your blog using LaTex syntax.

How to enable MathJax

  1. Put following tag in your HTML file.<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> In my case I put it in index.html and _layouts/default.thml.
  2. In index.html, change { post.content | strip_html | truncatewords: 50 } to { post.content | truncatewords: 50 }
  3. This step might be necessary if it does not work yet: add mathjax: true under # Build settings in your _config.yml file.

Reference

Examples

Symbols Frequently Used in Proofs

$$ A\,\alpha\,B\,\beta\,\Gamma\,\gamma\,E\,\epsilon\,\Pi\,\pi\,\Sigma\,\sigma $$

Note 1. Unlike conventional LaTex, we should use normal alphabet when possible, like .

Note 2. \, means a space.

$$ \exists,\forall,\neg,\lor,\land,\to,\leftrightarrow,\implies,\iff,\therefore,\because $$


Set theory

$$ \emptyset,\mathbb{N},\mathbb{Z},\mathbb{Q},\mathbb{R} $$


$$\{2, 4, 6, 8\dots\}$$


$$\{x \mid x \text{ is positive and even}\}$$


$$ \subset, \supset, \not \subset, \not \supset, \subseteq,\supseteq,\nsubseteq,\nsupseteq $$


$$(A \cup B) \cap C \in D \subset E$$


$$\bigcup_{i=1}^{\infty} F_{i}$$


$$(F\circ G)(x)\,means\,x \overset{F\circ G}{\mapsto} y $$


Algebra

$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$


$$ \cos(θ+φ)=\cos(θ)\cos(φ)−\sin(θ)\sin(φ) $$


$$ \sigma = \sqrt{ \frac{1}{N} \sum_{i=1}^N (x_i -\mu)^2} $$


$$ \mathbf{X} = \mathbf{Z} \mathbf{P^\mathsf{T}} $$


$$ \mathbf{X}\_{n,p} = \mathbf{A}\_{n,k} \mathbf{B}\_{k,p} $$


$$ \mathsf{Data = PCs} \times \mathsf{Loadings} $$


$$ E = \frac{mc^2}{\sqrt{1-\frac{v^2}{c^2}}} $$


$$
\begin{align*}
  & \phi(x,y) = \phi \left(\sum_{i=1}^n x_ie_i, \sum_{j=1}^n y_je_j \right)
  = \sum_{i=1}^n \sum_{j=1}^n x_i y_j \phi(e_i, e_j) = \\
  & (x_1, \ldots, x_n) \left( \begin{array}{ccc}
      \phi(e_1, e_1) & \cdots & \phi(e_1, e_n) \\
      \vdots & \ddots & \vdots \\
      \phi(e_n, e_1) & \cdots & \phi(e_n, e_n)
    \end{array} \right)
  \left( \begin{array}{c}
      y_1 \\
      \vdots \\
      y_n
    \end{array} \right)
\end{align*}
$$


Calculus

$$ f(a) = \frac{1}{2\pi i} \oint\frac{f(z)}{z-a}dz $$


$$ \int_D ({\nabla\cdot} F)dV=\int_{\partial D} F\cdot ndS $$


$$ \vec{\nabla} \times \vec{F} = \left( \frac{\partial F_z}{\partial y} - \frac{\partial F_y}{\partial z} \right) \mathbf{i} + \left( \frac{\partial F_x}{\partial z} - \frac{\partial F_z}{\partial x} \right) \mathbf{j} + \left( \frac{\partial F_y}{\partial x} - \frac{\partial F_x}{\partial y} \right) \mathbf{k} $$


$$ (\nabla_X Y)^k = X^i (\nabla_i Y)^k = X^i \left( \frac{\partial Y^k}{\partial x^i} + \Gamma_{im}^k Y^m \right) $$


$$ \int_D ({\nabla\cdot} F)dV=\int_{\partial D} F\cdot nd S $$


Embedded in sentence

When , there are two solutions to and they are

When $$a \ne 0$$, there are two solutions to $$ax^2 + bx + c = 0$$
and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$