Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

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

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

share|improve this question
    
Relevant: automatic line breaking for long equations using the breqn package. –  Ioannis Filippidis Feb 4 at 9:29

6 Answers 6

up vote 74 down vote accepted

Use split environment provided by amsmath package.

\begin{equation}
\begin{split}
F = \{F_{x} \in  F_{c} &: (|S| > |C|) \\
 &\quad \cap (\text{minPixels}  < |S| < \text{maxPixels}) \\
 &\quad \cap (|S_{\text{conected}}| > |S| - \epsilon) \}
\end{split}
\end{equation}
share|improve this answer
1  
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
6  
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
1  
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:

\begin{multline}
F = \{F_{x} \in  F_{c} : (|S| > |C|) \cap 
(minPixels  < |S| < maxPixels) \\ \cap 
(|S_{conected}| > |S| - \epsilon)
  \}
\end{multline}
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.

\begin{equation}
\begin{multlined}
F = \{F_{x} \in  F_{c} : (|S| > |C|) \\
\shoveleft[1cm]{\cap (\mathrm{minPixels}  < |S| < \mathrm{maxPixels})} \\
\cap (|S_{\mathrm{connected}}| > |S| - \epsilon) \}
\end{multlined}
\end{equation}
share|improve this answer

The aligned environment from amsmath is also a good option:

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

enter image description here

share|improve this answer
\begin{eqnarray}
  F = \{F_{x} \in  F_{c} : (|S| > |C|) \cap \nonumber \\
  (minPixels  < |S| < maxPixels) \cap \nonumber \\
  (|S_{conected}| > |S| - \epsilon)
  \\}
\end{eqnarray}
share|improve this answer
13  
Don't use {eqnarray}: eqnarray vs align –  clemens Mar 3 '13 at 12:50
    
Welcome to TeX.sx! –  Peter Jansson Mar 3 '13 at 13:06
2  
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

Use multline or split provided by amsmath package.

  • Use multline to split equations without alignment (first line left, last line right)
  • Use split to split equations with alignment

Here are examples:

enter image description here

The codes are as follows:

(i).Use equation:
\begin{equation}
1+2+3+4+8x+7=1+2+3+4+4x+35 \\
\Rightarrow x=7
\end{equation}

(ii).Use \emph{multline} to split equations without alignment:
\begin{multline}
1+2+3+4+8x+7=1+2+3+4+4x+35 \\
\Rightarrow x=7
\end{multline}

(iii).Use \emph{split} to split equations with alignment
\begin{equation}
\begin{split}
1+2+3+4+8x+7 & =1+2+3+4+4x+35 \\
& \Rightarrow x=7
\end{split}
\end{equation}

For more info, you can refer to User’s Guide for the amsmath Package.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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