Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [trees]

{trees} is for questions about drawing or constructing tree {diagrams} (for example, family trees).

-1
votes
1answer
669 views

How can i build the tree diagram? [closed]

I want as in the picture
2
votes
1answer
53 views

Linking top of tree to one node

having got very useful help to my posts here and here I have been able to find a number of documents on drawing trees. However it is taking me time to link all the nodes at the top of the tree (at the ...
9
votes
2answers
447 views

Drawing Unrooted Tree

I would like to draw unrooted trees like: I can create one using the following code: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node at (0,3) {$T_1$}; \draw (-...
2
votes
1answer
127 views

Labels on node links in tikz

While @cfr provided an excellent solution to my post here, I have a problem when I insert the code in my main document, though it works fine as a standalone document. It gives me the error: ! Illegal ...
5
votes
1answer
1k views

Drawing phylogenetic tree

I am trying to generate a tree like: Here is my code so far: \documentclass{article} \usepackage{tikz-qtree} \begin{document} \begin{tikzpicture}[every tree node/.style={font=\huge}, level ...
1
vote
1answer
563 views

How do I put labels on a tree diagram in tikz?

I am requesting help with a tree diagram in latex. I am preparing a handout on a mathematics course. In the handout I have a tree diagram which I modified from here: How can I reproduce this simple ...
0
votes
0answers
201 views

How to generate family tree for infinite generations in latex?

Most of the templates i have found so far family tree is for finite generation, How can we code for infinite generation family tree, our family tree generation may be 4, 5, 6, 7 etc. Tnaking you in ...
0
votes
0answers
211 views

Scheme Proof Tree

I'm currently working on making proof trees for regular expressions in scheme. The suggested way of writing these in the course I'm taking is the following, which I've manually typed into TeX. This ...
6
votes
2answers
213 views

Tight fit in horizontal diagram generated with forest

I use the forest package to create a diagram similar to the one below. Is there any chance to reduce the distance between B5 and B6? I would prefer, if B6 and its subtree could be moved up. I have ...
3
votes
1answer
536 views

Forest: Adjust tree edge path

I want to draw a tree like the one shown in this thread. However, the text in my nodes may be long and lead to line breaks. Then, the anchor=150 option from the thread messes up the horizontal ...
7
votes
1answer
300 views

Table of content as right side growing tree

How to prepare table of contents as follows: \documentclass{article} \usepackage{tikz} \usepackage{tikz-qtree} \begin{document} \begin{tikzpicture} \tikzset{grow'=right,level distance=32pt} \...
2
votes
1answer
476 views

Make directory tree with folders and files along with comments in Tikz

I borrowed the following code from answer of @cfr. I want to add comments to the right of folders and files. Any help will be highly appreciated. Thanks \documentclass[border=10pt,multi,tikz]{...
2
votes
1answer
447 views

Forest tree with labelled edges and no nodes on the ends

... one upon the time ... :) I draw this tree by CorelDraw! for presenting convolution coding rules, which I like now to redraw and modernize with help of forest package. I stuck at followings: ...
2
votes
1answer
357 views

How to add text next to nodes and prune (cut) parts of a tree?

I am having problems with how to align text next to nodes and also how to prune a tree. So far I have the following code and please ignore mistakes, I am not familiar with TikZ or LaTeX. \usepackage{...
1
vote
1answer
672 views

Horizontal Tree Diagram on 4 levels

I am adapting the answer here to create a tree Diagram on 4 levels. I want to create the UML Diagram Types diagram in Latex like this: My code: %https://tex.stackexchange.com/questions/50418/tools-...
1
vote
1answer
172 views

How can a diagram be created to allow collapsing and expanding of nodes

I want to create an interactive diagram in LaTeX. Right now I am using a Microsoft PowerPoint smart are tool, but it is missing functionality. I want to create a hierarchy tree that displays up to ...
4
votes
1answer
395 views

Time axis for forest phylogenetic tree

I am making a phylogenetic tree with forest, using this question and answer as a guide. I would like to have a vertical axis for time, as shown in the image below but I have two related problems ...
3
votes
2answers
559 views

drawing complex tree with tikz

Please how can I draw this tree with TikZ please? My problem is how to join two children and create a new node with labels? The current code is \documentclass[a4paper,openany,11pt,oneside]{book} \...
1
vote
1answer
74 views

Morpheme trees, double lined head-branches

Does anyone know how to make a branch in a tree (tikz, qtree, forest...any would work) show up as a double line? I have seen them used to indicate the headed-ness of a node in both syntax and in ...
0
votes
1answer
533 views

Which is the best package for drawing rooted trees and how do you use it? [closed]

Which package is easy to use: forest, qtree or some other package, for drawing rooted trees like in the picture below? (I need to be able to draw the trees, draw trees with cuts, use the trees in ...
1
vote
0answers
168 views

Is there a standard way to represent the file tree in a rather elaborate code?

I've got a program which is split into some files located in two main folders, src and include, with the header .h files in the include folder while .cpp and .cu files in the other. Here is a little ...
5
votes
2answers
211 views

Is it possible to create a list with lines connecting elements in the same level?

I'm trying to replicate the following in LaTex: Is there a package that can do it, or a simple way to do it? I've searched around, but couldn't find anything the made exactly this (probably due to ...
3
votes
1answer
285 views

Position a tikz tree based on interior node

How can I position a tikz tree based on an interior node, i.e. instead of defining the position of the root, defining the position of an interior node? For example, consider the following code. \...
3
votes
3answers
459 views

Make large decorated tree diagrams / Multi-line Forest diagrams

I'm looking after a way to create tree diagrams for file format specifications like in the Minecraft Wiki. I tried creating it with Forest and this is what I have at the moment. This solution works ...
0
votes
1answer
51 views

Bad positioning in tree

I wanted to use forest to build a tree, but I need each node to be the same layout as when using state from \usetikzlibrary{automata}, so I had to create the tree with the normal nodes in tikz. \...
2
votes
2answers
254 views

Why aren't my trees working without line break?

I am using the packages linguex, parsetree, and avm to make an example containing a table with two phrase structure trees. I'd like to have the table start on the same line as the example number. But ...
4
votes
3answers
481 views

Label Imperfect Information dashed line in tree

I am trying to add two labels, one over each of the two dash lines. Each time I add some variation in code at the place I created the lines, the corresponding label shows up at the top of the figure. ...
-1
votes
1answer
101 views

Change Tree size in Document

I want to change the size of the tree in my document.... But I'm totally new with trees and I don't know how to scale it. This is my code (with the tree from this answer: \documentclass[a4paper, ...
3
votes
1answer
2k views

How to build an organization chart

Hey Guys i want to build an organization chart like in the following picture but i dont know how to start. I read about the package tikz.... \documentclass[border=10pt]{standalone} \usepackage{tikz}...
6
votes
1answer
225 views

How can I upgrade Forest code for={Lu}{} so that my diagram compiles with current Forest?

I created the following diagram using Forest version 1: \documentclass[tikz,border=10pt]{standalone} \usepackage{forest-1}% forest v.1 \begin{document} \begin{forest} for tree={ font=\...
4
votes
2answers
592 views

Align all leaf nodes in tikz-qtree

I am trying to reproduce this graph: I've read in tikz-qtree documentation that I need to compute the size from the root as a multiple of level distance, but I can get it to work. So far I have: \...
2
votes
1answer
656 views

Growing Trees with Forest package

Is it possible to use the forest package grow a tree so that the children are stacked vertically, like this: I ended up doing this: If the parent is A and has three children B C D, and I want to ...
4
votes
1answer
2k views

Undefined control sequence. \usetikzlibrary for creating a tree

I'm trying to create a binary tree using TeXstudio. I used the instructions listed in this question: Drawing binary trees with LaTeX labels When I compile it, I got this error: I checked if I have ...
4
votes
2answers
317 views

Drawing picture with TikZ

I am asking myself if I can create a picture like the one presented hereunder with TikZ: Edit: This is what I have tried so far. I really want to include brackets as in the original tree shown above. ...
0
votes
1answer
385 views

Using the package tikz to create a diagram

I have been trying for ages without and prevail to design this diagram. It is my first time trying to use this package. Could someone help me please with this? Thanks :) This is what I have so far: \...
5
votes
2answers
799 views

Resizing qtree to fit pagewidth

I'm trying to learn qtree but I still couldn't figure out how to resize to fit the page width. I would like to avoid cutting the tree. Here is my MWE: \documentclass[a4paper]{article} \usepackage[...
1
vote
0answers
20 views

Unrecognized Command in pst-asr? [duplicate]

I'm trying to do autosegmental representation using pst-asr, but I am getting an unrecognized command error on \asr. All I've done is use the sample code from the documentation, but it still won't ...
2
votes
2answers
115 views

wiggly lines in syntactic trees

in reference to this post, I have a follow-up question. What I need to do is basically something like the following: That's my attempt: \documentclass[12pt]{article} \usepackage[linguistics]{forest}...
2
votes
1answer
258 views

Animation of growing tree with forest package

I would like to "animate" a growing tree. This means that the nodes and edges in trees (a)-(c) should be aligned like the final tree. Unfortunately I couldn't figure out how to do this with the ...
4
votes
2answers
480 views

Drawing a k-ary tree using TikZ without overlap

I'm trying to draw a k-ary tree using tikz. Unfortunately I couldn't manage to avoid the nodes from overlapping. I also tried setting level/.style={sibling distance=30mm/#1}, growth parent anchor=...
6
votes
3answers
997 views

Draw lines on top of tikz forest

I am trying to illustrate DFS with tikz like http://www.cse.unsw.edu.au/~billw/Justsearch1.gif does. I have come up with \documentclass[border=10pt]{standalone} \usepackage{forest} \begin{document}...
1
vote
2answers
288 views

How do I draw Phrase Structure Trees in the Style of Heim & Kratzer (1998)?

I'm trying to figure out how to draw simple syntactic trees like the ones here, found in Heim & Kratzer's "Semantics & Generative Grammar." I do not want to include labels such as NP, VP, etc.,...
3
votes
2answers
2k views

Forest trees fitting on page

My forest looks like this but it does not fit on a page, this is my first time using this package. I am looking for suggestions to fit this into a page, hopefully they will not be too intensive ...
2
votes
3answers
483 views

Tikz forest alignment issue

What do I need to change in the following code, in order to bring A at the same level as B? I need the branches where I have placed them, as I have space problem, and don't want them overlapping, but ...
1
vote
1answer
132 views

How to align the second level of tree diagram?

How can I fix this? \documentclass[margin=5mm]{standalone} \usepackage[utf8]{inputenc} \usepackage[edges]{forest} \begin{document} \begin{forest} for tree={ l sep=1cm, child ...
3
votes
1answer
2k views

How can I reproduce this simple tree diagram?

I would like to create this simple tree diagram in LYX. I tried using forest but I did not figure out how to add text to the different levels and display percentages.
5
votes
2answers
670 views

squiggly trees in latex

I need to draws trees, in which one of the branches is squiggly, as showed in the screenshots below. Does anybody know how I can do that? adapted from: Svenonius, P. (2015). Spanning. Ms., University ...
3
votes
2answers
221 views

How to add an enumerate list to this tree diagram?

So I am trying to add a list of the form 1. 2. 3. under each subject in this tree diagram: My problem is not in making the list itself, but rather in typing under the subjects. I tried both \...
3
votes
2answers
738 views

How can i make this tree diagram with labels on edges and vertices?

I would like to understand how to add labels to edges and vertices and how to make an invisible vertex such that an edge can start or end in it, but the vertex itself is not visible. I'm interested ...
-1
votes
3answers
166 views

A Figure in beamer

Can anyone please tell how can I produce the following figure in beamer :