LaTeX

Configuration

I prefer to configure formular delimiters with the way using brackets:

inline: \(...\)
display: \[...\]
display + equation number: \[...\] (1)

For vscode, install extension Markdown+Math, then change Configuration from dollars into brackets. For mathJax, it’s provided in the default configuration.

Good memory is not as bad as a pen.

Permutation

A_n^n=n\times(n-1)\times(n-2)\times...\times2\times1

A_n^m=n\times(n-1)\times(n-2)\times...\times(n-m+1) = \frac{n!}{(n-m)!}

Combination

C_n^m=\frac{A_n^m}{A_m^m} = \frac{n!}{m!(n-m)!}

C_n^m=C_n^{n-m}

C_{n+1}^{r+1} = C_n^r + C_n^{r+1}

Binomial theorem

(a+b)^n = \sum_{i=0}^n{{C_n^i}a^{n-i}b^i} \tag 1

2^n =\sum_{i=0}^n{{C_n^i}} = C_n^0 + C_n^1 + C_n^2 + ... + C_n^n

VSCode Plugin

https://marketplace.visualstudio.com/items?itemName=goessner.mdmath

Hugo

see mathjax_support.html

and replace cmd {{ replaceRE "\\[ (.*) \\]" "\[ $1 \]" .Content | safeHTML }} to fix markdown escape backslash problem.

  • problem to be solved

equation number problem

echo "Hello World"

\begin{equation} E=m \end{equation}

\begin{equation}
E=m
\end{equation}

Reference