Referring to the post:
How to draw Venn diagrams (especially: complements) in LaTeX
using the suggested code:
\documentclass{letter}
\usepackage{tikz}
\def\firstcircle{(90:1.75cm) circle (2.5cm)}
\def\secondcircle{(210:1.75cm) circle (2.5cm)}
\def\thirdcircle{(330:1.75cm) circle (2.5cm)}
\begin{document}
\begin{tikzpicture}
\begin{scope}
\clip \secondcircle;
\fill[cyan] \thirdcircle;
\end{scope}
\begin{scope}
\clip \firstcircle;
\fill[cyan] \thirdcircle;
\end{scope}
\draw \firstcircle node[text=black,above] {$A$};
\draw \secondcircle node [text=black,below left] {$B$};
\draw \thirdcircle node [text=black,below right] {$C$};
\end{tikzpicture}
\end{document}
I could achieve the first Venn digram appears in the post. However, I would like to add a bigger box which includes all the other ones, and add a name to it (say "H"). Such an option appears as a third suggestion in the same post, here is the code:
\begin{tikzpicture}[fill=gray]
% left hand
\scope
\clip (-2,-2) rectangle (2,2)
(1,0) circle (1);
\fill (0,0) circle (1);
\endscope
% right hand
\scope
\clip (-2,-2) rectangle (2,2)
(0,0) circle (1);
\fill (1,0) circle (1);
\endscope
% outline
\draw (0,0) circle (1) (0,1) node [text=black,above] {$A$}
(1,0) circle (1) (1,1) node [text=black,above] {$B$}
(-2,-2) rectangle (3,2) node [text=black,above] {$H$};
\end{tikzpicture}
but I could not combine the codes in the right way to get the wished result.
Thank you for any help!


