2.2 Formulae

[→ B.7]

There are three types of formulae.

The first is the normal math mode of LaTeX: b i b j = k = 1 d h i j k b k subscript 𝑏 𝑖 subscript 𝑏 𝑗 superscript subscript 𝑘 1 𝑑 subscript 𝑖 𝑗 𝑘 subscript 𝑏 𝑘 b_{i}\cdot b_{j}=\sum_{k=1}^{d}h_{ijk}b_{k} . Then there are displayed formulae:

\[ \Longrightarrow \quad \left(\sum_{i=1}^d x_i b_i \right) \cdot \left(\sum_{j=1}^d y_j b_j \right) = \sum_{k=1}^d \left( \sum_{i,j} x_i y_j h_{ijk} \right) b_k \]

If possible, use the Alt element to specify a better readable text version of such a formula as in the following example:


         d                d                 d   
       -----            -----             -----  -----                 
        \                \                 \      \                    
 ==> (   )  x_i b_i )(    )  y_j b_j ) =    )  (   )  x_i y_j h_ijk ) b_k
        /                /                 /      /                    
       -----            -----             -----  -----                
       i = 1            j = 1             k = 1   i,j                

For small formulae without "difficult" parts use the M element: b i subscript 𝑏 𝑖 b_{i} , x 2 superscript 𝑥 2 x^{2} , x 2 + 2 x + 1 = ( x + 1 ) 2 superscript 𝑥 2 2 𝑥 1 superscript 𝑥 1 2 x^{2}+2x+1=(x+1)^{2} . Note that here whitespace matters for text (or HTML) output.

Here are two formulae containing less than characters which are special characters for XML: a & l t ; b & l t ; c & l t ; d 𝑎 & 𝑙 𝑡 𝑏 & 𝑙 𝑡 𝑐 & 𝑙 𝑡 𝑑 a<b<c<d and e & l t ; f 𝑒 & 𝑙 𝑡 𝑓 e<f .

Using the Mode attribute of a Display element formulae like

\[a \longrightarrow a \bmod m\prime\]

can also be displayed nicely in text and HTML output.