I wrote a 2017 post describing how I code Venn diagrams in LaTeX with TikZ. Venn diagrams in categorical logic tend to be different from their standard uses in mathematics. There are a few LaTeX packages for Venn diagrams, but, for some reason, I didn't think they could be used to produce the diagrams I needed for my critical thinking course. I should have looked at them a bit more carefully, it turns out that making the diagrams using the venndiagram
package is much easier than my method.
Venndiagram
, like my method, uses TikZ to make the diagram. The advantage, though, is that we don't have to dig into the details of TikZ for everything, that is already done for us. For example, here is the code for the diagram for an A-sentence using my previous method.
|
|
Here is the code for the same diagram with the venndiagram
package.
|
|
It produces this:
Here's the code for Disamis (IAI-3):
|
|
The resulting diagram looks like this:
There was no way that I could remember my all of the details of my original method, so I had an 84-line snippet that I inserted for each diagram. I would then comment and uncomment various lines to produce the diagram I needed.
Now, I just use this snippet for a 2-circle diagram:
|
|
I use this for a 3-circle diagram:
|
|
Both have enough detail that I can remember what to change to make a particular diagram. I've added some extra comments to explain what everything does. I Include the scale=1
only so that I can remember what to do when I want to change the size of the diagram. The only tricky part is when I have to place an x on the border of a particular circle, that requires a little bit of TikZ fiddling, hence the commented lines at the end of the snippet.