发布时间:2010-01-07 21:32:15
文章类别:数学公式
原文地址:http://blog.sina.com.cn/s/blog_5e16f1770100gror.html

QQ群:91940767/145316219/141877998/80300084/194770436
淘宝店:http://latexstudio.taobao.com
技巧续篇:http://latexstudio.net/
常见数学公式问题集下载

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

LaTeX技巧207:使用align环境输入多行公式的技巧
LaTeX技巧207:使用align环境输入多行公式的技巧

LaTeX技巧207:使用align环境输入多行公式的技巧
LaTeX技巧207:使用align环境输入多行公式的技巧

演示代码:
\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}


点赞(0)

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部