# How to get a pigeon to illustrate the pigeonhole principle?

I saw on the internet the following image, illustrating the pigeonhole principle:

Using TikZ, is it possible to make an image like that? I can only create the board, but I can't do the pigeon. Here is my MWE:

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
\draw (0,0) rectangle (6,6);
\draw (0,2)--(6,2);
\draw (0,4)--(6,4);
\draw (2,0)--(0,6);
\draw (4,0)--(4,6);
\end{tikzpicture}

\end{document}

• Can't you just use an external image for the pigeon with \includegraphics? There doesn't seem much reason to do this bit in TikZ. (That is, if you don't like the Egyptian dove - my thought was also the hieroglyphs packages.) – cfr Aug 12 '16 at 11:39
• Or you could use something like Inkscape to export TikZ code for the pigeon and turn it into a pic. (But the code does not tend to be very pretty or intelligible!) – cfr Aug 12 '16 at 11:42

## 3 Answers

\documentclass[pstricks,margin=5mm]{standalone}
\usepackage{pst-fun}
\begin{document}
\pspicture[dimen=m](12,12)
\multirput(0,0)(4,0){3}{\multirput(0,0)(0,4){3}{\psframe(4,4)\rput(0,1){\psBird}}}
\endpspicture
\end{document}


• In what country or habitat do you see pigeons colored like that? – murray Nov 17 '17 at 15:50
• @murray: In PSTricks world. :-) – Artificial Odorless Armpit Nov 17 '17 at 18:45

There are some hieroglyph packages for LaTeX, which define all kinds of symbols, e.g. ancient Egyptians walking around, dung beetles, or African birds. Among these is the package phaistos which defines \HPdove. Strictly speaking it is a dove, but honestly, who can tell the difference from such a pictogram?

Thanks to @cfr for reminding me about ethics regarding animals in captivity. I increased the spacing around the bird a little in the hope to meet the legal standards.

\documentclass{article}
\usepackage{phaistos}
\begin{document}
\renewcommand\arraystretch{2}
\begin{tabular}{|c|c|c|}
\hline
\PHdove & \PHdove & \PHdove \\
\hline
\PHdove & \PHdove & \PHdove \\
\hline
\PHdove & \PHdove & \PHdove \\
\hline
\end{tabular}
\end{document}


The Phaistos font is even available in OpenType and thus usable with Xe/LuaLaTeX. For some reason the dove symbol is mirrored and smaller than in the Type 1 version.

What I find most convincing in this approach is that Unicode actually defines this symbol. Therefore it is as easy as hitting the 𐇯 key on your keyboard!

\documentclass{article}
\usepackage{fontspec}
\newfontfamily\phaistos{Phaistos}
%\def\PHdove{{\phaistos\symbol{"101EF}}}
\def\PHdove{{\phaistos 𐇯}}
\begin{document}
\begin{tabular}{|c|c|c|}
\hline
\PHdove & \PHdove & \PHdove \\
\hline
\PHdove & \PHdove & \PHdove \\
\hline
\PHdove & \PHdove & \PHdove \\
\hline
\end{tabular}
\end{document}


• (+1) The hieroglyphs packages have surprisingly useful things in them (surprising to me, that is). Could the type 1 dove get a little more head room, do you think? He or she looks most uncomfortable! – cfr Aug 12 '16 at 11:41
• @cfr See updated answer. – Henri Menke Aug 12 '16 at 11:51
• That's much better - thank you! (I can't vote again, unfortunately.) – cfr Aug 12 '16 at 11:56

There are two doves (a peaceful and a Minoan one) in unicode:

% arara: lualatex

\documentclass{article}
\usepackage{fontspec}

\begin{document}
{\setmainfont{Symbola}
\symbol{"1F54A}%
\symbol{"101EF}}%
{\setmainfont{EversonMono}
\symbol{"101EF}}%
{\setmainfont{EversonMono-Bold}
\symbol{"101EF}}%
\end{document}


Please turn and order them as you please.

• Maybe best not to set the document's main font to produce doves? – cfr Aug 12 '16 at 11:57
• @cfr I have added some brackets. Typically, I would wrap those in custom command of course. But this is more a minimal-effort-answer to a minimal-effort-question. – LaRiFaRi Aug 12 '16 at 12:08
• Does that work? Interesting. – cfr Aug 12 '16 at 15:41
• @cfr You mean the braces? They should. I hope. – LaRiFaRi Aug 14 '16 at 7:55