Here's an image of what I am trying to draw:


  • 2
    Have you tried anything? If so, you should post a small document that shows your attempt. This shouldn't be to hard, and TikZ is well documented.
    – Alan Munn
    Commented Jun 6, 2011 at 4:39
  • The title seems to indicate you want help, but your post gives the impression you want someone to do it for you. Which one is it?
    – Vivi
    Commented Jun 6, 2011 at 6:17

3 Answers 3


This could probably be done more elegantly.

  \node (posint) [box] {positive integer};
  \node (negint) [box,right=of posint] {negative integer};

  \draw [decorate,thick]
    ($(negint.south east) + (0,-.3)$) -- node (mida) {} ($(posint.south west)  + (0,-.3)$);

  \node (int) [box,below=.4cm of mida] {integer};
  \node (frac) [box,right=of int] {fractional number};

  \draw [decorate,thick]
    ($(frac.south east) + (0,-.3)$) -- node (midb) {} ($(int.south west)  + (0,-.3)$);

  \node (rational) [box,below=.4cm of midb] {rational number};

  \draw [->] (posint) -- (negint);
  \draw [->] (int) -- (frac);

This doesn't use pgf, sorry.

\newcommand{\mytopstrut}{\vbox to 3ex{}}
\newcommand{\mybotstrut}{\vtop to 2ex{}}
\myline{\dblbox{positive integer}{negative integer}\mybotstrut}{
  \hspace{11.5em}\myline{\dblbox{integer}{fractional number}\mybotstrut\mytopstrut}{
    \fbox{rational number}\mytopstrut
  • Much as it loathes me to say it, not everything has to be done using TikZ! Nice solution. Commented Jun 6, 2011 at 18:55

Egreg did what I had in mind to do. I need a mobile TeX :-)
Oh well, this one's in eplain, so hopefully there is enough difference:

\input eplain
\def\To{\hbox to 3em{\rightarrowfill}}
$$ \displaylines{
  \underbrace{\mybox{positive integer}\To\mybox{negative integer}}\cr
  \hfil\underbrace{\mybox{integer}\To\mybox{fractional number}}\cr
  \hfil\mybox{rational number}}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .