align是输入多行公式中最好用的环境,仅仅是个人浅见,因为他的对齐非常灵活,如果大家需要非常灵巧的对齐方式的多行公式,建议使用align环境,对应的也还有align*和aligned等等类似的环境,这里不再详述。下文提供代码,尽展其风姿绰约。
演示效果图:


演示代码:
\documentclass{article}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{266.0pt}
\usepackage{CJK}
\usepackage{amsmath}

\begin{CJK}{GBK}{song}
\begin{document}

\begin{align}
  (a + b)^3  &= (a + b) (a + b)^2        \\
             &= (a + b)(a^2 + 2ab + b^2) \\
             &= a^3 + 3a^2b + 3ab^2 + b^3
\end{align}
\begin{align}
  x^2  + y^2 & = 1                       \\
  x          & = \sqrt{1-y^2}
\end{align}
This example has two column-pairs.
\begin{align}    \text{Compare }
  x^2 + y^2 &= 1               &
  x^3 + y^3 &= 1               \\
  x         &= \sqrt   {1-y^2} &
  x         &= \sqrt[3]{1-y^3}
\end{align}
This example has three column-pairs.
\begin{align}
    x    &= y      & X  &= Y  &
      a  &= b+c               \\
    x'   &= y'     & X' &= Y' &
      a' &= b                 \\
  x + x' &= y + y'            &
  X + X' &= Y + Y' & a'b &= c'b
\end{align}

This example has two column-pairs.
\begin{flalign}  \text{Compare }
  x^2 + y^2 &= 1               &
  x^3 + y^3 &= 1               \\
  x         &= \sqrt   {1-y^2} &
  x         &= \sqrt[3]{1-y^3}
\end{flalign}
This example has three column-pairs.
\begin{flalign}
    x    &= y      & X  &= Y  &
      a  &= b+c               \\
    x'   &= y'     & X' &= Y' &
      a' &= b                 \\
  x + x' &= y + y'            &
  X + X' &= Y + Y' & a'b &= c'b
\end{flalign}

This example has two column-pairs.
\renewcommand\minalignsep{0pt}
\begin{align}    \text{Compare }
  x^2 + y^2 &= 1               &
  x^3 + y^3 &= 1              \\
  x         &= \sqrt   {1-y^2} &
  x         &= \sqrt[3]{1-y^3}
\end{align}
This example has three column-pairs.
\renewcommand\minalignsep{15pt}
\begin{flalign}
    x    &= y      & X  &= Y  &
      a  &= b+c              \\
    x'   &= y'     & X' &= Y' &
      a' &= b                \\
  x + x' &= y + y'            &
  X + X' &= Y + Y' & a'b &= c'b
\end{flalign}

\renewcommand\minalignsep{2em}
\begin{align}
  x      &= y      && \text{by hypothesis} \\
      x' &= y'     && \text{by definition} \\
  x + x' &= y + y' && \text{by Axiom 1}
\end{align}

\begin{equation}
\begin{aligned}
  x^2 + y^2  &= 1               \\
  x          &= \sqrt{1-y^2}    \\
 \text{and also }y &= \sqrt{1-x^2}
\end{aligned}               \qquad
\begin{gathered}
 (a + b)^2 = a^2 + 2ab + b^2    \\
 (a + b) \cdot (a - b) = a^2 - b^2
\end{gathered}      \end{equation}

\begin{equation}
\begin{aligned}[b]
  x^2 + y^2  &= 1               \\
  x          &= \sqrt{1-y^2}    \\
 \text{and also }y &= \sqrt{1-x^2}
\end{aligned}               \qquad
\begin{gathered}[t]
 (a + b)^2 = a^2 + 2ab + b^2    \\
 (a + b) \cdot (a - b) = a^2 - b^2
\end{gathered}
\end{equation}
\newenvironment{rcase}
    {\left.\begin{aligned}}
    {\end{aligned}\right\rbrace}

\begin{equation*}
  \begin{rcase}
    B' &= -\partial\times E          \\
    E' &=  \partial\times B - 4\pi j \,
  \end{rcase}
  \quad \text {Maxwell's equations}
\end{equation*}

\begin{equation} \begin{aligned}
  V_j &= v_j                      &
  X_i &= x_i - q_i x_j            &
      &= u_j + \sum_{i\ne j} q_i \\
  V_i &= v_i - q_i v_j            &
  X_j &= x_j                      &
  U_i &= u_i
\end{aligned} \end{equation}

\begin{align}
  A_1 &= N_0 (\lambda ; \Omega')
         -  \phi ( \lambda ; \Omega')   \\
  A_2 &= \phi (\lambda ; \Omega')
            \phi (\lambda ; \Omega)     \\
\intertext{and finally}
  A_3 &= \mathcal{N} (\lambda ; \omega)
\end{align}
\end{CJK}
\end{document}

from: http://blog.sina.com.cn/s/blog_5e16f1770100gror.html

LaTeX技巧207:使用align环境输入多行公式的技巧的更多相关文章

  1. LaTeX技巧206:使用gather输入多行公式的技巧

    上文中提到了几个输入多行公式的环境,gather也是其中之一,gather输入的好处是每一行,他都会按照前文的编号计数器进行向下计数,这样保证了公式编号的连贯性.所以,当我们输入公式的每一行公式需要独 ...

  2. LaTeX技巧205:使用split输入多行公式技巧

    我们在输入多行公式的时候,split,array,multiline,align,aligned等等都是我们可以选用的环境,这里介绍split的使用方法.演示效果图: 演示代码:\documentcl ...

  3. Python - 集成开发环境Pycharm的使用方法和技巧

    PyCharm HomePage:PyCharm 我的Pycharm,我做主 Getting Started with PyCharm Pycharm使用技巧 Documentation & ...

  4. MathType输入矩阵和行列式的技巧

    高等代数里,经常要使用到矩阵和行列式,尤其是在写论文时,如何编辑矩阵和行列式呢?比较好的方法就是使用专业的公式编辑器MathType进行编辑,下面就一起来学习具体的编辑技巧. 具体步骤如下: 步骤一 ...

  5. Android开发技巧:像QQ一样输入表情图像

     EditText和TextView一样,也可以进行图文混排.所不同的是,TextView只用于显示图文混排效果,而EditText不仅可显示, 也可混合输入文字和图像,让我们先回顾一下图5.2所示的 ...

  6. ruby中输入命令行编译sass(ruby小白)

    Ruby(或cmd中)输入命令行编译sass步骤如下: (1)举例而言:首先在F盘下建立一个总文件夹,比如test文件夹:其次在该文件夹下建立html,images,js,sass等文件夹. (2)在 ...

  7. linux 命令行 光标移动技巧

    linux 命令行 光标移动技巧 看一个真正的专家操作命令行绝对是一种很好的体验-光标在单词之间来回穿梭,命令行不同的滚动.在这里强烈建立适应GUI节目的开发者尝试一下在提示符下面工作.但是事情也不是 ...

  8. Verilog学习笔记简单功能实现(七)...............接口设计(并行输入串行输出)

    利用状态机实现比较复杂的接口设计: 这是一个将并行数据转换为串行输出的变换器,利用双向总线输出.这是由EEPROM读写器的缩减得到的,首先对I2C总线特征介绍: I2C总线(inter integra ...

  9. iOS系统提供开发环境下命令行编译工具:xcodebuild

    iOS系统提供开发环境下命令行编译工具:xcodebuild[3] xcodebuild 在介绍xcodebuild之前,需要先弄清楚一些在XCode环境下的一些概念[4]: Workspace:简单 ...

随机推荐

  1. js文件的版本控制

    使用grunt完成requirejs的合并压缩和js文件的版本控制   最近有一个项目使用了 requirejs 来解决前端的模块化,但是随着页面和模块的越来越多,我发现我快要hold不住这些可爱的j ...

  2. 【LOJ】#2549. 「JSOI2018」战争

    题解 仔细分析了一下,如果写个凸包+每次暴力半平面交可以得到70分,正解有点懵啊 然后用到了一个非常结论,但是大概出题人觉得江苏神仙一个个都可以手证的结论吧.. Minkowski sum 两个凸包分 ...

  3. PHP 导出简单文本内容(word txt等)

    PHP导出word文件,简单拓展可导出其他文本类文件 /** * PHP 导出简单文本内容(word txt等) * @param $content mixed 导出内容 (文本string / ht ...

  4. Mysql Lock wait timeout exceeded; try restarting transaction的问题

    今天在后台跑任务的时候,发现了数据库报错1205 - Lock wait timeout exceeded; try restarting transaction.问题原因是因为表的事务锁,以下是解决 ...

  5. Java日志记录--log4j and logback

    问题的引入: 把所有的信息打印在控制台上不行吗? 01.控制台有行数限制: 02.System.out.println()影响系统性能: 03.如果我们需要对一些用户的行为习惯进行分析,我们找不到用户 ...

  6. HDU 5840 This world need more Zhu 树链剖分+暴力

    This world need more Zhu 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5840 Description As we all ...

  7. 【面试虐菜】—— JAVA面试题(2)

    前篇推荐:http://www.cnblogs.com/xing901022/p/3975626.html 1 String = 与 new 的不同 使用“=”赋值不一定每次都创建一个新的字符串,而是 ...

  8. slf4j 和 log4j合用的(Maven)配置

    简述: 添加logger的日志输出,下面是配置信息供备忘   步骤: 1. 在Maven的porn.xml 文件中添加dependency如下 <dependency> <group ...

  9. spring-boot 速成(10) -【个人邮箱/企业邮箱】发送邮件

    发邮件是一个很常见的功能,代码本身并不复杂,有坑的地方主要在于各家邮件厂家的设置,下面以qq个人邮箱以及腾讯企业邮箱为例,讲解如何用spring-boot发送邮件: 一.添加依赖项 compile ' ...

  10. STM32 USART 波特率计算

    The baud rate for the receiver and transmitter (Rx and Tx) are both set to the same value as program ...