I just wanted to know if there are any packages that build two or three intersecting sets, where you can put a number inside them, a capital letter on the set and with the universe set indicated a capital letter. Thank you.
See the example below.
Follow up 2023-10-16
I have these two MWE:
\documentclass[a4paper,12pt]{article}
\usepackage{mathtools,amssymb,venndiagram}
\begin{document}
\begin{venndiagram3sets}[labelOnlyA={1},labelOnlyB={2},labelOnlyC={3},
labelOnlyAB={4},labelOnlyAC={5},labelOnlyBC={6},labelABC={7},
labelNotABC={8}]
\end{venndiagram3sets}
\end{document}
The code with 2 sets not work well if I write labelOnlyAB={4}. In fact the 4 is missing in the A∩B. It is necessary to write labelAB={4} instead of labelOnlyAB={4}.
\documentclass[a4paper,12pt]{article}
\usepackage{mathtools,amssymb,venndiagram}
\begin{document}
\begin{venndiagram2sets}[labelOnlyA={5},labelOnlyB={7}, labelAB={4},labelNotAB={15}]
\end{venndiagram2sets}
\end{document}
How can I put the set
Uoutside the rectangle and upper right above the rectangle?





looks like nothing apart from TikZ.
– user202729 Oct 15 '23 at 12:12labelOnlyABis a 3-set only key as per the manual. You can use\setpostvennhook{\node[below right]at(venn bottom left){$U$};}to add further TikZ code to the diagram. – Qrrbrbirlbel Oct 16 '23 at 22:46\documentclass[a4paper,12pt]{article} \usepackage{mathtools,amssymb,venndiagram,tikz} \begin{document} \begin{venndiagram2sets}[labelOnlyA={5},labelOnlyB={7}, labelAB={4},labelNotAB={15}] \setpostvennhook{\node[above right]at(venn bottom right){$|U|=50$};} \end{venndiagram2sets} \end{document}I have not$|U|=50$at top right above the rectangle. – Sebastiano Oct 17 '23 at 07:48\setpostvennhook, i.e. relate tovenn top leftif I don't get it wrong. https://mirror.dogado.de/tex-archive/macros/latex/contrib/venndiagram/venndiagram.pdf . Results: see the example doc: https://ctan.mirror.norbert-ruehl.de/macros/latex/contrib/venndiagram/samples/venn-sample.pdf – MS-SPO Oct 17 '23 at 08:34venn bottom rightis obviously the bottom right corner,above right(=anchor = south west) just specifies the nodes placement in relation to theatplace. Usevenn top rightinstead. (Unfortunately, the rectangle is not a node, the package just defines coordinates for the four corners.) – Qrrbrbirlbel Oct 17 '23 at 08:47