【系列】Latex-4

在当前行文本中输入数学公式:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
    this formula : $f(x) = x^2$ is an example.
\end{document}

输入多个公式,并对齐公式:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
    \begin{equation*}
        1 = 3 -2
    \end{equation*}
    
    \begin{equation*}
        3 = 2 + 1
    \end{equation*}
    
    \begin{align*}
        1 + 2 & = 3\\
            1 & = 3-2 
    \end{align*}
    
\end{document}

幂函数,普通函数,积分函数等:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

    \begin{align*}
        f(x) & = x ^ 2\\
        g(x) & = \frac{1}{x} \\
        F(x) & = \int^a_b \frac{1}{3}x^3  \\
        h(x) & = \frac{1}{\sqrt{x}} \\
        a(x) & = \int^c_d
    \end{align*}
    
\end{document}

输入矩阵:

\documentclass{article}
\usepackage{amsmath}
\begin{document}

    \begin{equation}       %开始数学环境
        \left(                 %左括号
        \begin{array}{ccc}   %该矩阵一共3列,每一列都居中放置
            a11 & a12 & a13\\  %第一行元素
            a21 & a22 & a23\\  %第二行元素
        \end{array}
        \right)                 %右括号
    \end{equation}

    $\left(
    \begin{array}{ccc}
        1 & 2 & 3 \\
        4 & 5 & 6 \\
        7 & 8 & 9 \\
    \end{array}
    \right)$

    $\left[
    \begin{array}{cc}
        1 & 0\\
        0 & 1\\
    \end{array}
    \right]$
    
\end{document}

输入括号:

    $\left(
        \frac{1}{\sqrt{x}}
    \right)$

总结:

1. Latex是一个强大的输入数学公式的工具

2. 使用$...$可以在一行中输入公式

3. align环境可以按照&对齐公式

4. 多个公式可以使用\\分开

5. 使用array环境可以输入矩阵

6. 使用\left和\right命令可以得到可扩放的括号

引用:

http://www.latex-tutorial.com/tutorials/beginners/lesson-4/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值