How to Break Long Equations in LaTeX

LaTeX is a powerful engine for the creation of structured documents. It is frequently used in the technical fields to compose books, articles, technical manual, and other related material.

One of the areas in which LaTeX shines is the creation of documents containing equations. For example, a large number of mathematical articles are written in LaTeX.LaTeX is extremely powerful in handling such equations because it has a computer language dedicated to displaying such equations.

Breaking Equations

One of the problems that can happen when typesetting equations in LaTeX is that equation can be come too long and hard to break. For example, in fields such as Engineering, Physics, and other sciences, it is common to work with large equations.

When such an occasion happens, it is necessary to use some of the equation commands available to LaTeX users, in order to make the equations more manageable. Here are a few options available for LaTeX users:

Convert a common equation into a multiline equation: this is possible using the amsmath package. This is a simple example of how to do this:

% ....
X + Y \\
= Z + W 

The characters \\ are used here to separate the lines of the equation.

Another option is to use the eqnarray* environment, which is standard in LaTeX. With this environment one can determine the location of aligned operators. Typically this is used to hold the position of equal signs. For example

\cos 2\theta &=& \cos^2 \theta - \sin^2 \theta \\
             &=& 2 \cos^2 \theta - 1.

Use the breqn package: this package was create by AMS to provide a simpler way to break equations without disrupting the flow of exposition by the writer. This solution is a little more advanced however, since it requires the use of an external package. The breqn package is free, and its documentation is available online.

Tags: equations, breaking, latex, equations
Article created on 2011-02-18 10:57:40

Post a comment