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 Would like to know how to draw this diagram or similar. Thx. enter image description here

I have started to use LaTeX just a few weeks to try pass a .doc to .tex, but I don't know how do this image. I tried use one exemple to do that, but I could not adjust the size and add dashed line.

\usetikzlibrary{trees} % this is to allow the fork right path

\author{fernando_bcc }
\date{April 2014}


\begin{tikzpicture}[level.style={sibling distance=1mm}]
\tikzset{edge from parent/.style= 
            {thick, draw, edge from parent fork down},
         every tree node/.style=
            {draw,minimum width=0.8in,text width=1in,align=center,{sibling distance=1mm}}}

    [. Sistema 
            [.{Variante no tempo } ]
            [.{Invariante no tempo}
                [.{Linear} ]
                [.{Não Linear} 
                    [.{Estados contínuos} ]
                    [.{Estados discretos} 
                        [.{Dirigidos pelo tempo} ]
                        [.{Dirigidos por eventos} 
                            [.{Determinísticos} ]
                            [.{Não determinísticos}
                                [.{Tempo discretizado} ]
                                [.{Tempo contínuo} ]



share|improve this question
Welcome to TeX.SE. Which specific part are you having difficulty with? There should be several example on this site to get you started. – Peter Grill Apr 12 '14 at 23:36
Please post the code you've got so far so people have something to start with! Just posting an image is not really a reasonable question as it makes it harder to help and even to understand the context and question. All questions should include a complete small document demonstrating the issue or showing what efforts you've made so far. Without this, you have to hope the procrastinators take a liking to your question and want to while away some time! – cfr Apr 12 '14 at 23:39
Try having a check at link, pages 364 on... – MattAllegro Apr 13 '14 at 0:09
To draw the line, all you need to do is to place some names to designated nodes and use those names to draw the line. See my answer below. – Gonzalo Medina Apr 13 '14 at 0:25
up vote 10 down vote accepted

One option using the powerful forest package:



for tree={
  edge path={
    \noexpand\path[line width=1.5pt,\forestoption{edge}]
      (\forestOve{\forestove{@parent}}{name}.parent anchor) -- +(0,-16pt) -|   
      (\forestove{name}.child anchor)\forestoption{edge label};
  l sep=12pt,
  drop shadow
    [Variante no tempo]
    [Invariantes no tempo
      [N\~ao linear
        [Estados contínuos]
        [Estados discretos,name=discretos
          [Dirigidos pelo tempo,name=pelotempo]
          [Dirigidos por eventos
            [N\~ao determinísiticos
              [Tempo discretizado]
              [Tempo contínuo,name=continuo]
 ([xshift=-4pt]pelotempo.north west|-continuo.south) --
 ([xshift=-4pt,yshift=4pt]pelotempo.north west) --
 ([xshift=-2pt,yshift=4pt]discretos.west|-pelotempo.north) --
 ([xshift=-2pt,yshift=8pt]discretos.north west) --
 ([xshift=20pt,yshift=8pt]discretos.north east) --
 ([xshift=35pt]continuo.south east);


enter image description here

share|improve this answer
Thanks very much! – user1313455 Apr 13 '14 at 0:25
@user1313455 You're welcome! Don't forget that you can accept answers that you consider solved your problems by clicking the checkmark to their left. In case of doubt, please see How do you accept an answer?. – Gonzalo Medina Apr 13 '14 at 0:26
Does the documentation include any examples with the branches like this? (i.e. like with the standard tikz edge from parent fork down from the trees library?) I looked but I couldn't find anything. – cfr Apr 13 '14 at 0:32
@cfr No; there's no examples like this one. I took the relevant code from page 90 (lines 1873-1878) Section 10.4.2 Declaring options, where the code is documented. – Gonzalo Medina Apr 13 '14 at 0:44
Thanks. I've never looked at forest before and it wasn't obvious where that might be! I'll try to remember 'options' for next time! – cfr Apr 13 '14 at 1:01

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.