latex之上下标

 1、行内公式

我是对行内公式的测试$f(x)=1+x+x^2$

2、行间公式

  • 单行不编号
    \begin{equation}
      \int_0^1(1+x)dx
    \end{equation}

    结果为:

  • 单行编号
    \begin{equation}\label{}
        \int_0^1(1+x)dx
    \end{equation}
    或者:
    \[
    \int_0^1(1+x)dx
    \]

  • 多行编号
    \begin{equation}\label{}
       \begin{cases}
        f(x)=1+x+x^2\\
        g(x)=a_nx^n+a_{n-1}x^{n-1}+...+a_1x^1
       \end{cases}
    \end{equation}

    \begin{equation}\label{}
       \begin{split}
        f(x)=\cos(x+y)+\sin(x+y)=\cos x \cos y- \sin x \sin y \\
        +\sin x \cos y+\cos x \sin y
       \end{split}
    \end{equation}

    \begin{equation}\label{...}
    D(x) =
    \begin{cases}
    1, & \text{if } x \in \mathbb{Q};\\
    0, & \text{if } x \in \mathbb{R}\setminus\mathbb{Q}.
    \end{cases}
    \end{equation}

  • 多行不编号:
    \begin{equation}
    ...
    \end{equation}
    改成
    \begin{equation*}
    ...
    \end{equation*}
    或者使用:
    \begin{align*}
    ...
    \end{align*}

猜你喜欢

转载自www.cnblogs.com/gaoyixue/p/10632696.html