`$$`

, like `$$ E = mc^2 $$`

. If you leave it inside a paragraph, it will produce an inline expression, just like \(E = mc^2\).
To use display mode, again surround your expression with `$$`

and place it as a separate paragraph. Here is an example:

You can also use `\begin{equation}...\end{equation}`

instead of `$$`

for display mode math.
MathJax will automatically number equations:

\begin{equation} \label{eq:cauchy-schwarz} \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) \end{equation}

and by adding `\label{...}`

inside the equation environment, we can now refer to the equation using `\eqref`

.

Note that MathJax 3 is a major re-write of MathJax that brought a significant improvement to the loading and rendering speed, which is now on par with KaTeX.

]]>{% highlight c++ linenos %}

code code code

{% endhighlight %}

The keyword `linenos`

triggers display of line numbers.
Produces something like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

int main(int argc, char const \*argv[])
{
string myString;
cout << "input a string: ";
getline(cin, myString);
int length = myString.length();
char charArray = new char * [length];
charArray = myString;
for(int i = 0; i < length; ++i){
cout << charArray[i] << " ";
}
return 0;
}

Images can be made zoomable.
Simply add `data-zoomable`

to `<img>`

tags that you want to make zoomable.

The rest of the images in this post are all zoomable, arranged into different mini-galleries.