Web Notes
2016.08.20
Using Liquid in Jekyll - Live with Demos
Liquid is a simple template language that Jekyll uses to process pages for your site. With Liquid you can output complex contents without additional plugins.
In markdown notes, it’s easy to insert simple mathematical formulas with plain . However, I’m always forget some basic characters for equations. So, let’s take a short review basic on the note math for undergrads1. Note that the render engine is on this web page.
plain | output |
---|---|
x^2 | |
x_{i, j} | |
\sqrt{2}, \sqrt[n]{3} | |
frac{2}{3}, 2/3 |
Use \mathcal{A}
:
plain | output | plain | output |
---|---|---|---|
\alpha | \xi, \Xi | ||
\beta | o | ||
\gamma, \Gamma | \pi, \Pi | ||
\delta, \Delta | \varpi | ||
\epsilon | \rho | ||
\varepsilon | \varrho | ||
\zeta | \sigma, \Sigma | ||
\eta | \varsigma | ||
\theta, \Theta | \tau | ||
\vartheta | \upsilon, \Upsilon | ||
\iota | \phi, \Phi | ||
\kappa | \varphi | ||
\lambda, \Lambda | \chi | ||
\mu | \psi, \Psi | ||
\nu | \omega, \Omega |
plain | plain | plain | |||
---|---|---|---|---|---|
\cup | \mathbb{R} | \forall | |||
\cap | \mathbb{Z} | \exists | |||
\subset | \mathbb{Q} | \neg | |||
\subseteq | \mathbb{N} | \vee | |||
\supset | \mathbb{C} | \wedge | |||
\supseteq | \varnothing | \vdash | |||
\in | \emptyset | \models | |||
\ni | \aleph | \Rightarrow | |||
\notin | \setminus | \nRightarrow | |||
\not\in | \equiv |
Negate an operator, as in , with \not\subset
. Get the set complement with A^{\mathsf{c}}
, get with \A^{\complement}
, or get with \bar{A}
.
plain | plain | plain | |||
---|---|---|---|---|---|
f' | \dot{a} | \tilde{x} | |||
f'' | \ddot{a} | \bar{x} | |||
\Sigma^{*} | \hat{x} | \vec{x} |
If the decorated letter is or then some decorations need \imath
or \jmath
, as in vec{\imath}
. If you need boldface for vectors: \boldsymbol{x}
.
Entering \overline{x+y}
produces , and \widehat{x+y}
gives .
Use low dots in a list , entered as \{0,1,2\,\ldots\}
. Use entered dots in a su or product , entered as 1+\cdots+100
. You can also get vertical dots \vdots
and diagonal dots \ddots
.
Enter \tan{x}
, with a backslash, instead of tan{x}
. These get the same treatment:
plain | plain | plain | |||
---|---|---|---|---|---|
\sin | \sinh | \arcsin | |||
\cos | \cosh | \arccos | |||
\tan | \tanh | \arctan | |||
\sec | \coth | \min | |||
\csc | \det | \max | |||
\cot | \dim | \inf | |||
\exp | \ker | \sup | |||
\log | \deg | \liminf | |||
\ln | \arg | \limsup | |||
\lg | \gcd | \lim |
plain | plain | plain | |||
---|---|---|---|---|---|
< | \angle | \cdot | |||
\leq | \measuredangle | \pm | |||
> | \ell | \mp | |||
\geq | \parallel | \times | |||
\neq | 45^{\circ} | \div | |||
\ll | \cong | \ast | |||
\gg | \ncong | \mid | |||
\approx | \sim | \nmid | |||
\asymp | \simeq | n! | |||
\equiv | \nsim | \partial | |||
\prec | \oplus | \nabla | |||
\preceq | \ominus | \hbar | |||
\succ | \odot | \circ | |||
\succeq | \otimes | \star | |||
\propto | \oslash | \surd | |||
\doteq | \upharpoonright | \checkmark |
The summation using \sum_{j=0}^3 j^2
and the integral with \int_{x=0}^3 x^2\,dx
.
These do the same:
plain | plain | plain | |||
---|---|---|---|---|---|
\int | \iiint | \bigcup | |||
\iint | \oint | \bigcap |
plain | plain | ||
---|---|---|---|
\rightarrow, \to | \mapsto | ||
\nrightarrow | \longmapsto | ||
\longrightarrow | \leftarrow | ||
\Rightarrow | \leftrightarrow | ||
\nRightarrow | \downarrow | ||
\Longrightarrow | \uparrow | ||
\leadsto | \updownarrow |
The right arrows in the first column have matching left arrows, such as \nleftarrow
, and there are some other matches for down arrows, etc.
plain | plain | plain | |||
---|---|---|---|---|---|
() | \langle\rangle | | | | |||
[] | \lfloor\rfloor | \| \| | |||
{} | \lceil\rceil |
They will grow with the enclosed formula using \left
and \right
.
\left\langle i, 2^{2^i} \right\rangle
Every \left
must match a \right
and they must end on the same line in the output. For a one-sided fence put a period \left.
or \right.
on the other side.
\left.\frac{df}{dx}\right|_{x_0}
Fix the size with \big
, \Big
, \bigg
, or \Bigg
.
\Big[\sum_{k=0}^n e^{k^2}\Big]
Make an array of mathematical text as you make a table of plain text.
\begin{array}{rcl}
0 &\leftrightarrow &0 \\
1 &\leftrightarrow &1 \\
2 &\leftrightarrow &4 \\
\vdots & &\vdots
\end{array}
Definition by cases is an array with two columns.
f_n=
\begin{cases}
a &\text{if \(n=0\)} \\
r\cdot f_{n-1} &\text{else}
\end{cases}
A matrix is another array variant. With this abbreviation you need not specify column alignments.
\begin{pmatrix}
a &b \\
c &d
\end{pmatrix}
For the determinant use |A|
inline and vmatrix
in display.
plain | plain | ||
---|---|---|---|
\rightarrow\,\leftarrow | \rightarrow\quad\leftarrow | ||
\rightarrow\:\leftarrow | \rightarrow\qquad\leftarrow | ||
\rightarrow\;\leftarrow | \rightarrow\!\leftarrow |
The left column spaces are in ratio . The last in the right column is a negative space, opposite to \,
. Get arbitrary spaces as in \hspace{0.5cm}
.
f\colon\mathbb{R}\to\mathbb{R}
9.8~\text{m}/\text{s}^2
\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}
int x^2\,dx=x^3/3+C
\nabla=\boldsymbol{i}\frac{d}{dx}+\boldsymbol{j}\frac{d}{dy}+\boldsymbol{k}\frac{d}{dz}
There are four modulo forms: is from m\bmod n
, and is from a\equiv b\pmod m
, and is from a\equiv b\mod m
, and is from a\equiv b\pod m
.
For combinations the binomial symbol is from \binom{n}{k}
. This resizes to be bigger in a display.
For permutations use from n^{\underline{r}}
.
\sigma^2=\sqrt{\sum (x_i-\mu)^2/N}
E(x)=\mu_X=\sum (x_i-P(x_i))
The probability density of the normal distribution comes from this:
\frac{1}{\sqrt{2\sigma^2\pi}}\,e^{-\frac{(x-\mu)^2}{2\sigma^2}}
See more comprehensive symbols list at http://mirror.ctan.org/info/symbols/comprehensive.
Jim Hefferon, Saint Michael’s College, VT USA 2017-Jan-10 ↩
Frank Lin
Web Notes
2016.08.20
Liquid is a simple template language that Jekyll uses to process pages for your site. With Liquid you can output complex contents without additional plugins.
Tutorials
2020.01.09
IKEv2, or Internet Key Exchange v2, is a protocol that allows for direct IPSec tunnelling between networks. It is developed by Microsoft and Cisco (primarily) for mobile users, and introduced as an updated version of IKEv1 in 2005. The IKEv2 MOBIKE (Mobility and Multihoming) protocol allows the client to main secure connection despite network switches, such as when leaving a WiFi area for a mobile data area. IKEv2 works on most platforms, and natively supported on some platforms (OS X 10.11+, iOS 9.1+, and Windows 10) with no additional applications necessary.
C Notes
2017.04.24
Understand the common sorting algorithms, just because recent take CS50 course.