I have some troubles with my LaTeX homework. I should draw a venn diagram looking like this What I did so far looks like this I suppose you see my problem; I don't know how to insert
Code: Select all
$A \bigcap B
Any ideas?
Here is my code
Code: Select all
\documentclass{article}
\usepackage{tikz}
%\usetikzlibrary{shapes,backgrounds}
\begin{document}
\pagestyle{empty}
\def\firstcircle{(0,0) circle (1.5cm)}
\def\secondcircle{(55:2cm) circle (1.5cm)}
\def\thirdcircle{(0:2cm) circle (1.5cm)}
\begin{tikzpicture}[line width=0.25pt]
\begin{scope}
\fill[red] \secondcircle;
\fill[green] \firstcircle;
\fill[blue] \thirdcircle;
\end{scope}
\begin{scope}
\clip \firstcircle;
\fill [yellow]
\secondcircle;
\end{scope}
\begin{scope}
\clip \secondcircle;
\fill [magenta] \thirdcircle;
\end{scope}
\begin{scope}
\clip \firstcircle;
\fill [cyan] \thirdcircle;
\end{scope}
\begin{scope}
\clip \firstcircle;
\clip \secondcircle;
\fill [white] \thirdcircle;
\end{scope}
\draw \firstcircle node[text=white, below] {$B$};
\draw \secondcircle node [text=white,above] {$A$};
\draw \thirdcircle node [text=white,below] {$C$};
\end{tikzpicture}
\end{document}