TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I have a long equation but long enough to occupy two lines. I want to break it to improve readability. How can I break it?

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

I wan to break it in 3 lines after \cap. But \\ or \n didn't work

share|improve this question

marked as duplicate by Zarko, Werner, Paul Gaborit, Herr K., Christian Hupfer Dec 29 '15 at 23:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Relevant: automatic line breaking for long equations using the breqn package. – Ioannis Filippidis Feb 4 '15 at 9:29
You might want to take a look at this: gocomics.com/strangebrew/2016/04/15 – QuantumMechanic Apr 16 at 1:54
up vote 106 down vote accepted

Use split environment provided by amsmath package.

F = \{F_{x} \in  F_{c} &: (|S| > |C|) \\
 &\quad \cap (\text{minPixels}  < |S| < \text{maxPixels}) \\
 &\quad \cap (|S_{\text{conected}}| > |S| - \epsilon) \}
share|improve this answer
And it would look even nicer with a \mathrm{minPixels} and \mathrm{maxPixels} and \mathrm{connected}. – Bruno Le Floch Jan 14 '11 at 12:12
@Bruno: I agree. I edited the answer to use \text. – Leo Liu Jan 14 '11 at 15:44
Be aware that \text inherits formatting from the surrounding text (which might be italic in a theorem environment). – Caramdir Jan 14 '11 at 16:58
When using \right( and \left) or similar, one should be careful. The \left. and \right. should be used in order to avoid splitting of brackets pairs. For example a line should have the form `\left( \ldots \right. \` when it involves this kind of brackets. – Dror Jan 9 '12 at 11:15

For simple multi-line equations without alignment, use the multline environment:

F = \{F_{x} \in  F_{c} : (|S| > |C|) \cap 
(minPixels  < |S| < maxPixels) \\ \cap 
(|S_{conected}| > |S| - \epsilon)
share|improve this answer
But you would want alignment here, wouldn't you? – Marc van Dongen Jan 2 '13 at 8:41

The mathtools package provides the multlined environment.

F = \{F_{x} \in  F_{c} : (|S| > |C|) \\
\shoveleft[1cm]{\cap (\mathrm{minPixels}  < |S| < \mathrm{maxPixels})} \\
\cap (|S_{\mathrm{connected}}| > |S| - \epsilon) \}
share|improve this answer
I checked the latest version of the mathtools package (1.17) and it has no such environment. Perhaps it's been removed since you posted your answer. – Psychonaut Nov 7 '15 at 20:39
@Psychonaut It does indeed have that environment, and has had that all along. Just make sure you are typing multlined (mult without i, i.e. not multilined). – hooy Mar 22 at 13:43

The aligned environment from amsmath is also a good option:

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

enter image description here

share|improve this answer
What does the empty {} do? – Tyler Crompton Jul 11 at 1:23
@TylerCrompton - The empty {} works as a math atom to keep the correct spacing around the = symbol, because = is a binary operator just like the + and the - symbols. When you type $-5$ and $x-5$, the first - is a unary operator and is close to the 5, but the second - is a binary operator with larger and equal distances from both x and 5--the same logic holds here. – AboAmmar Jul 12 at 12:54
  F = \{F_{x} \in  F_{c} : (|S| > |C|) \cap \nonumber \\
  (minPixels  < |S| < maxPixels) \cap \nonumber \\
  (|S_{conected}| > |S| - \epsilon)
share|improve this answer
Don't use {eqnarray}: eqnarray vs align – clemens Mar 3 '13 at 12:50
Isn't using eqnarray a bit pointless if no alignment ponts are employed? (The fact eqnarray is badly deprecated is another strike against it.) – Mico Nov 18 '14 at 7:37

protected by Community Jul 22 '15 at 12:04

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.