special character
1 $
- represent formula boundary, that is begin or end formula
- $$ — one formula a single line
- example:
ex1: $f(x)=3x+7$, equal to f(x)=3x+7 f ( x ) = 3 x + 7
ex2: $$f(x)=3x+7$$f(x)=3x+7 f ( x ) = 3 x + 7
2 ^ , _
- ^ — superscript
- _ — subscript
if super or sub script more than one character, use { } to enclose it - example:
ex1: $$\sum_{i=1}^n a_i = 0 $$ ; \ is escape character
∑i=1nai=0 ∑ i = 1 n a i = 0
ex2: $$f(x)=x^{x^x}$$f(x)=xxx f ( x ) = x x x
3 \
- escape character
special word
4 \left \right
- left and right must appear at the same time
- why need \left \right, show me the example:
- $$(\frac{1}{2})$$
(12) ( 1 2 )
- $$\left(\frac{1}{3}\right)$$
(12) ( 1 2 )
- as you can see \left( more bigger than (, and show more beauty
- how to write segment funciton
4 \frac{numerator}{denominator}
- $$\frac{1}{2}$$
12 1 2
5 \partial
- ∂y∂x ∂ y ∂ x
6 \mathbf \textbf
- bold font
- $\textbf {bold font}$
bold font bold font
- $\mathbf {bold font}$
boldfont b o l d f o n t
7 \mbox
- insert text in eqution
- ex: $\mbox{this is text:} f(x)=3x$
this is text: f(x)=3x this is text: f ( x ) = 3 x
8 \lgroup \rgroup
- ex: $\lgroup$
⟮ ⟮
9 \begin{equation} \end{equation }
- ex:
\begin{equation*}
f(x) = \left \{\begin{aligned}&1 \mbox { if true}\\&0 \mbox{ if false}\end{aligned}\right .
\end{equation*}
f(x)={1 if true0 if false
f
(
x
)
=
{
1
if true
0
if false
Reference
[1] LaTex grammer
[2] csdn-Jupyer equation
[3] LaTex summary
[4] LaTex common symbols
Appendix
1 how to insert sum, prod integral etc
- $\sum$ —
∑
∑
- $\int$ —
∫
∫
- $\prod$ —
∏
∏
- $\iint$ —
∬
∬
2 how to run shell command
- !
- ex: !ls
- jupyter tips