Articles on: Writing

Can I write a LaTeX equation over multiple lines? Using the multiline, aligned packages.

Sometimes a long equation needs to be broken over multiple lines, especially if using a double column export style.

For example, this equation would most likely span over two columns:

F = \{F_{x} \in  F_{c} : (|S| > |C|) \cap 
(minPixels  < |S| < maxPixels) \cap 
(|S_{conected}| > |S| - \epsilon) 

To achieve correct break and alignment of the above equation try the code below. (Note: new lines (\\) do not work in equation environments.)

F ={} & \{F_{x} \in  F_{c} : (|S| > |C|) \\
      & \cap (\mathrm{minPixels}  < |S| < \mathrm{maxPixels}) \\
      & \cap (|S_{\mathrm{conected}}| > |S| - \epsilon)\}

will produce:

Further reading

More LaTeX equation examples (fork it!)
LaTeX cheatsheet

Updated on: 08/07/2018