Insert math formula in Jupyter notebook

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
  • yx ∂ 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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值