From the WikiPublisher

Wikipublisher: Aligned Equations

The LATEX Equations page illustrates inline mathematics and simple equations. This page illustrates how to group and align several equations. It uses the existing {$ ... $} equation markup.

In 2.2, the rule for evaluating character entities moved nearer the start of the evaluation sequence. This caused equation markup to evaluate before equation array markup, instead of after, so the arrays were interpreted as individual equations.

The simplest unnumbered form just aligns to the relation symbol:

(a + b)^3 &= (a + b) (a + b)^2 \\
                  &= (a + b) (a^2 + 2ab + b^2) \\
                  &= a^3 + 3a^2b + 3ab^2 + b^3

Here is a group of aligned equations, with numbering (automatically set flush right):

1+1 &= 2 \\
 4   &= 2 \cdot 2 \nonumber \\
 a + b &\le c \\
 d + e &>   f \\
 \sin x &= x -\frac{x^{3}}{3!} + \frac{x^{5}}{5!} - \frac{x^{7}}{7!} +{} \nonumber \\
 &  {}+ \frac{x^{9}}{9!} - {}\cdots

Here is an unnumbered group of aligned equations (automatically centred):

x^2 + y^2 &= 1 \\
                x &= \sqrt{1-y^2}

Here is an unnumbered group of aligned equations, with 2 alignment positions, plus an intermediate line of text:

x       &= y        && \text{by hypothesis} \\
       x' &= y'        && \text{by extension}  \\
 & \intertext{And finally:} \\
 x + x' &= y + y' && \text{by Axiom 1}

As of Wikipublisher version 2.2.7, the markup lets authors define a subequation set. Note that in the web page view, it continues the numbering where the previous equation left off. However, if an author adds a new numbered equation above this one, the image numbering does not change, as the image is generated once and stored.

(5)f &= g  \\
    f' &= g' \\
  \mathcal{L}f &= \mathcal{L}g

References to aligned subequations are supported and it correctly counts the preceding aligned equation numbers: Equation (5) shows this.

In line with recommended LATEX practice [1], the recipe wraps the equations in the align environment, rather than using eqnarray.

Copyright © 2005–2017 the Wikipublisher wiki and its authors

Links

  1. www.tug.org/pracjourn/2006-4/madsen

Retrieved from http://www.wikipublisher.org/wiki/Wikipublisher/AlignedEquations

Page last modified on 07 January 2016 at 03:08 PM