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

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


share|improve this question
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 Jun 6 '11 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 Jun 6 '11 at 6:17
up vote 2 down vote accepted

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);
share|improve this answer

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
share|improve this answer
Much as it loathes me to say it, not everything has to be done using TikZ! Nice solution. – Loop Space Jun 6 '11 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}}
share|improve this answer

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.