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*}


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM