LaTeX技巧207:使用align环境输入多行公式的技巧
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环境输入多行公式的技巧的更多相关文章
- LaTeX技巧206:使用gather输入多行公式的技巧
上文中提到了几个输入多行公式的环境,gather也是其中之一,gather输入的好处是每一行,他都会按照前文的编号计数器进行向下计数,这样保证了公式编号的连贯性.所以,当我们输入公式的每一行公式需要独 ...
- LaTeX技巧205:使用split输入多行公式技巧
我们在输入多行公式的时候,split,array,multiline,align,aligned等等都是我们可以选用的环境,这里介绍split的使用方法.演示效果图: 演示代码:\documentcl ...
- Python - 集成开发环境Pycharm的使用方法和技巧
PyCharm HomePage:PyCharm 我的Pycharm,我做主 Getting Started with PyCharm Pycharm使用技巧 Documentation & ...
- MathType输入矩阵和行列式的技巧
高等代数里,经常要使用到矩阵和行列式,尤其是在写论文时,如何编辑矩阵和行列式呢?比较好的方法就是使用专业的公式编辑器MathType进行编辑,下面就一起来学习具体的编辑技巧. 具体步骤如下: 步骤一 ...
- Android开发技巧:像QQ一样输入表情图像
EditText和TextView一样,也可以进行图文混排.所不同的是,TextView只用于显示图文混排效果,而EditText不仅可显示, 也可混合输入文字和图像,让我们先回顾一下图5.2所示的 ...
- ruby中输入命令行编译sass(ruby小白)
Ruby(或cmd中)输入命令行编译sass步骤如下: (1)举例而言:首先在F盘下建立一个总文件夹,比如test文件夹:其次在该文件夹下建立html,images,js,sass等文件夹. (2)在 ...
- linux 命令行 光标移动技巧
linux 命令行 光标移动技巧 看一个真正的专家操作命令行绝对是一种很好的体验-光标在单词之间来回穿梭,命令行不同的滚动.在这里强烈建立适应GUI节目的开发者尝试一下在提示符下面工作.但是事情也不是 ...
- Verilog学习笔记简单功能实现(七)...............接口设计(并行输入串行输出)
利用状态机实现比较复杂的接口设计: 这是一个将并行数据转换为串行输出的变换器,利用双向总线输出.这是由EEPROM读写器的缩减得到的,首先对I2C总线特征介绍: I2C总线(inter integra ...
- iOS系统提供开发环境下命令行编译工具:xcodebuild
iOS系统提供开发环境下命令行编译工具:xcodebuild[3] xcodebuild 在介绍xcodebuild之前,需要先弄清楚一些在XCode环境下的一些概念[4]: Workspace:简单 ...
随机推荐
- 【AtCoder】AGC028 (A-E)题解
A - Two Abbreviations 如果有最小答案的话这个答案一定是N和M的lcm 我们考虑一下什么情况下 \(k \frac{L}{N} = h \frac{L}{M}\)且\(k,g\)互 ...
- 关于函数getline()(简单注意事项,不懂你怼我!!!)
关于getline()函数好使但是有毒: 有两种操作需要进行特殊处理: First: #include <iostream>#include <cstring>#include ...
- Web Service(二):cxf 实现
1. cxf简介 Web Services 的一种实现方式. Apache CXF = Celtix + XFire,后更名为 Apache CXF ,简称为 CXF. CXF 继承了 Celtix ...
- [同步脚本]mysql-elasticsearch同步
公司项目搜索部分用的elasticsearch,那么这两个之间的数据同步就是一个问题. 网上找了几个包,但都有各自的缺点,最后决定还是自己写一个脚本,大致思路如下: 1.在死循环中不断的select指 ...
- curl请求指定host ip(指定域名解析的内网某ip)
域名www.test.com解析内部多台ip $httpHeader = array('Host: www.test.com');$url = "10.17.2.245/xxx/xxx/t. ...
- android tesseract-ocr实例教程(包含中文识别)(附源码)
(转载请注明出处:http://blog.csdn.net/buptgshengod) 1.介绍 快过年了,博主的新应用-屏幕取词之了老花镜的编码工作也在紧锣密鼓的进行中.下面分享一下这个应用 ...
- Windows 7重启后USB 3.0无法使用的问题解决
1.首先对主板USB3.0驱动程序进行重新安装 2.如果驱动程序重装后还是无法解决无法使用USB3.0设备的话,在win7桌面上找到“计算机”图标并鼠标右键,选择“管理”选项,找到设备管理器,然后找到 ...
- Android签名详解
1.什么是签名? 如果这个问题不是放在Android开发中来问,如果是放在一个普通的版块,我想大家都知道签名的含义.可往往就是将一些生活中常用的术语放在计算机这种专业领域,大家就开始迷惑了. ...
- HDU 4786 Fibonacci Tree (2013成都1006题)
Fibonacci Tree Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)To ...
- How to tell if a file is an EXE or a DLL?
How to tell if a file is an EXE or a DLL? void DumpFile(LPWSTR filename) { HANDLE hFile = CreateFile ...