latex一些有用的写法

编辑博文的时候总是忘语法,然后到网上查……
干脆记一下!

1.编辑漂亮的函数上下标

\(\sum\limits_{i=1}^n\)

对于原有的函数:$\sum\limits_{i=1}^n$

\(\mathop{\min}\limits_{i=1}^n\)

对于原未有的函数:$\mathop{\min}\limits_{i=1}^n$

2.大括号

\(\lbrace \rbrace\)

$\lbrace \rbrace$

3.公式对齐

\[\begin{equation*} \begin{aligned} 1+1&=2 \\ &=2+0 \end{aligned} \end{equation*} \]

$$
\begin{equation*}
\begin{aligned}
1+1&=2 \\
&=2+0
\end{aligned}
\end{equation*}
$$
其中\\为换行

4.分段函数

\( \begin{equation} a^b\equiv \begin{cases} a^{b\% \phi(p)}& gcd(a,p)=1\\ a^b& b<\phi(p)\\ a^{b\% \phi(p)+\phi(p)}& gcd(a,p) \neq 1,b\geq \phi(p) \end{cases} \ \ (mod\ p) \end{equation} \)

$
\begin{equation}
a^b\equiv
\begin{cases}
a^{b\% \phi(p)}& gcd(a,p)=1\\
a^b& b<\phi(p)\\
a^{b\% \phi(p)+\phi(p)}& gcd(a,p) \neq 1,b\geq \phi(p)
\end{cases}
\ \ (mod\ p)
\end{equation}
$
posted @ 2018-08-24 22:15  秋千旁的蜂蝶~  阅读(250)  评论(0编辑  收藏  举报