Questions tagged [trees]

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

Filter by
Sorted by
Tagged with
1
vote
2answers
579 views

The way to list subsets of the set {1, 2, 3, 4, 5} with forest or tree package

I want to list the number of subsets of the set {1, 2, 3, 4, 5}. I tried with forest package. \documentclass[border=3mm]{standalone} \usepackage{amsmath} \usepackage{forest} \begin{...
5
votes
0answers
78 views

How can I get correct spacing when reusing Forest trees and when calign is center (default), last etc.?

Forest allows me to reuse (part of) a tree in another tree. However, when calign has certain values, including the default center, this does strange things to the spacing of some nodes. How can this ...
3
votes
2answers
260 views

How to create board game search tree?

How can I create a visualization for the search tree in a game where I don't want to see only the nodes, but the board configuration at each step? Any code help for this image for example would be ...
2
votes
2answers
425 views

how can i make plane/binary trees with dots?

I have been creating binary and plane trees using the following code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,chains,fit,shapes,calc} \begin{tikzpicture} \node[...
3
votes
1answer
94 views

Phonological Trees: Consonant Gemination in tikz-qtree

I am new at this. I am making phonological trees. I have the following code: \documentclass{article} \usepackage{tikz} \usepackage{tikz-qtree} \usepackage{tipa} \begin{document} \begin{...
0
votes
2answers
584 views

how to make tree structure in latex

I want to make tree strucrure. I seacrch a lot, but found other structure's solution. But did not solution find fortree. Suggest me tutorial or give me solution here. Help me!
5
votes
2answers
163 views

Forest for linguistics: changing the exit location of an arrow

I am a novice, with a hopefully simple question about arrows in a linguistics tree using Forest. The following hopefully minimal example yields an arrow whose tail is centered under the roof (the ...
3
votes
2answers
660 views

LaTeX: how to make a horizontal tree that is closed at the end (forest)

I have created the following horizontal tree in LaTeX, using the forest package. \forestset{ L1/.style={draw=black,}, L2/.style={,edge={,line width=0.8pt}}, } \begin{forest} for tree={ ...
0
votes
1answer
76 views

Hiding first node of tree, or creating a tree with 2 start nodes

i have the following code, \[\begin{tikzpicture}[level distance=50mm,sibling distance=22mm,every node/.style={rectangle,draw,inner sep=4pt}] \node {} child [draw=none,grow=left]{ ...
-1
votes
1answer
757 views

How can i build the tree diagram? [closed]

I want as in the picture
2
votes
1answer
54 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
477 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
134 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
613 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
205 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
226 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
233 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
582 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
311 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
511 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
485 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
420 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
715 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
179 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
405 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
581 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
81 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
556 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
180 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
236 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
299 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
487 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
52 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
266 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
512 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
103 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
275 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
635 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
708 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
3k 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
323 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
407 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
835 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
125 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
287 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 ...
5
votes
2answers
508 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
1k 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}...