Latex学习笔记6:using the align environment

来源:互联网 发布:编程代码大全 编辑:程序博客网 时间:2024/05/23 20:25

程序:

\documentclass{article}\usepackage{amsmath}\usepackage{amssymb}\usepackage{graphicx}\begin{document}\title{Math: using align environment}\author{he}\maketitle%align for equation numbering%align* for no equation numbering% & means "line up here"% \\ means "break line"solve the equation $0 = 3x^3 + 3x^2 - 6x$.\begin{align}0 &= 3x^3 + 3x^2 - 6x \\&= 3(x^3 + x^2 + 2x)\\&= 3x(x^2 + x - 2)\\&= 3x(x + 2)(x - 1)\\&\therefore\\x &= 0, -2, 1\end{align}\end{document}

运行结果:


不想要出现后面的line numbering, 修改如下:

\documentclass{article}\usepackage{amsmath}\usepackage{amssymb}\usepackage{graphicx}\begin{document}\title{Math: using align environment}\author{he}\maketitle%align for equation numbering%align* for no equation numbering% & means "line up here"% \\ means "break line"solve the equation $0 = 3x^3 + 3x^2 - 6x$.\begin{align*}0 &= 3x^3 + 3x^2 - 6x \\&= 3(x^3 + x^2 + 2x)\\&= 3x(x^2 + x - 2)\\&= 3x(x + 2)(x - 1)\\&\therefore\\x &= 0, -2, 1\end{align*}\end{document}

运行结果如下:


0 0
原创粉丝点击