TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to use TikZ to typeset some graphs like this one:

graph with interesting vertices

(Sorry for the crappy camera-phone pic)

I am familiar with \node, \path and edge, as well as with getting different arrowhead styles.

The bit that's tripping me up is getting the vertices of the graph to be these little triangular number diagrams. This one is relatively simple (the number diagrams are only 2x2), but I have others where the diagrams are 3x3 and bigger.

Would it be best to use an array environment inside each \node? Is that even possible?

Or is there a better way? Thanks!

share|improve this question
It is certainly possible to use array in a node. That sounds like a good idea for this graph. If you try this and have trouble, I suggest posting a MWE. – Chris Chudzicki Nov 10 '13 at 17:55

The new graph drawing library in the CVS version of pgf can do this quite nicely. Exploiting the align key, and setting it to right means the node contents in this specific case can be given quite simply.

However, it does needs luatex to compile.




\begin{tikzpicture}[>=stealth, every node/.style={align=right}]

\graph [layered layout,grow=up, level distance=0.5in, sibling distance=0.5in]
        "00\\0" -> "01\\0" -> {"01\\1", "11\\0"} -> "11\\1"



enter image description here

share|improve this answer
That's neat, and impressive. I may look into updating my system to try and use these new features. I appreciate your time. – Harold Nov 10 '13 at 19:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.