Take the 2-minute tour ×

I'm trying to make a simple directory tree representation in LaTeX. Something like:

 +-- ham
 +-- eggs
     +-- more spam
     +-- dead parrots

The tree won't be that long (say, 10--15 entries or so), with three or so levels, and is a one-off thing. So, quick-and-dirty solutions are welcome. When recommending tikz1, please note that I have almost no experience with it, so I'd appreciate a clean simple solution, even if it doesn't look quite perfect.

1 On Tex.SE tikz is almost like the jquery recurring joke on StackOverflow..

Edit: As per Thorsten's suggestion, dirtree is a nice and easy-to-use solution. The example from above could be written as:

.1 spam.
.2 ham.
.2 eggs.
.3 more spam.
.3 dead parrots.
share|improve this question
add comment

1 Answer

up vote 18 down vote accepted

The dirtree package is your friend.

share|improve this answer
Unfortunately dirtree is in conflict with algorithmic and pseudocode. So it's useless in many cases. –  user6052 Jun 9 '11 at 12:11
add comment

Your Answer


