Gonzalo Medina's is the actual answer to the problem given, but here is another option:
Instead of using an \fbox
you could also the mdframed
package which in basic usage
\begin{mdframed}
If A and B are two events that are not mutually exclusive then:
\[ P(A \cup B) = P(A) + P(B) - P(A \cap B) \]
\end{mdframed}
produces a nice box:
but also allows you to get fancy should you so desire:
Notes:
- The style used here is only slightly modified from one of the examples in the documentation, but am sure you could pick better color choices. This one was just meant to illustrate a few of the options, but there are numerous others.
Code:
\documentclass{article}
\usepackage{xcolor}
\usepackage[framemethod=tikz]{mdframed}
\begin{document}
\begin{mdframed}
If A and B are two events that are not mutually exclusive then:
\[
P(A \cup B) = P(A) + P(B) - P(A \cap B)
\]
\end{mdframed}
\bigskip
\begin{mdframed}[
linecolor=red,linewidth=2pt,%
frametitlerule=true,%
apptotikzsetting={\tikzset{mdfframetitlebackground/.append style={%
shade,left color=white, right color=blue!20}}},
frametitlerulecolor=blue,
frametitlerulewidth=1pt, innertopmargin=\topskip,
frametitle={Non Mutually Exclusive Events},
outerlinewidth=1.25pt
]
% ----------
If A and B are two events that are not mutually exclusive then:
\[
P(A \cup B) = P(A) + P(B) - P(A \cap B)
\]
\end{mdframed}
\end{document}
\documentclass{article} \begin{document} If A and B are two events that are not mutually exclusive then: \[ P(A \cup B) = P(A) + P(B) - P(A \cap B) \] \end{document}
.