Questions tagged [trees]

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

Filter by
Sorted by
Tagged with
0 votes
2 answers
91 views

Tree Diagram with Filesystem Branches

I am trying to draw this tree diagram exactly: I edited my code and it looks better, but still needs more work. Here is the code and result: \usetikzlibrary {trees} \tikz [font=\footnotesize,grow=...
user avatar
  • 19
0 votes
1 answer
34 views

Trouble drawing an ellipse around two elements of a forest environment

I have seen some questions about the same topic in the forum, but I've been unable to reproduce the same output in my code, so I would start by saying sorry for posting similar questions but here we ...
user avatar
  • 265
0 votes
1 answer
41 views

Node names are too long for forest

I've been trying to draw a tree like this: But I came across the problem that the node names are apparently too long... So the code below doesn't work. (If you replace $\lambda x.\lambda e. \text{...
user avatar
1 vote
1 answer
44 views

Aligning children across multiple tiers in forest

In the following tree, I would like the bottom right node (in the base tier) to be directly under its parent, but it seems to automatically align with its sibling in the tier above. I've tried several ...
user avatar
0 votes
0 answers
37 views

Alignment of children in a directory-like tree structure

I'm using the forest package (v2.1.5) and I'm trying to arrange the children below the parent node, similar to example (d) with for tree={grow'=0,folder}, which I found in the package documentation. ...
user avatar
  • 101
3 votes
2 answers
197 views

Problem with binary tree

I am drawing AVL trees using tikz. I have this code: \documentclass{scrartcl} \usepackage{tikz} \usetikzlibrary{trees} \begin{document} \begin{center} \begin{tikzpicture} \node[circle,draw](z)...
user avatar
0 votes
3 answers
82 views

Using Latex code chunks as library - For reusing latex elements such as figures in multiple representations

In object programming languages often structs exist which help you to reuse code twice or often, but writing that code only one time. A convenient way to write Latex code if the author does not want ...
user avatar
4 votes
1 answer
36 views

Tikz colour only the one branch of tree

Here is my tree: \begin{figure}[H] \centering \begin{tikzpicture}[ grow=right, edge from parent/.style={draw, -latex}, level distance=20mm, ...
user avatar
  • 145
0 votes
2 answers
144 views

Tikz tree does not show (in Springer Nature template)

The LaTeX code of the tree works in other templates, but when copied to the Springer Nature template, it shows errors. Here is my code: \RequirePackage{tikz} \documentclass[default,iicol]{...
user avatar
  • 87
0 votes
0 answers
38 views

How do I specify that tikz not use arrows

I'm writing a latex doc where I have several diagrams. One of my diagrams requires arrows, but then I also have a syntax tree, and for that I don't want the edges to be arrows. Can I specify that ...
user avatar
0 votes
0 answers
33 views

Uniform edge paths throughout the tree

How do I achieve uniform edge paths throughout the tree, the one similar to the path from root to the immediate children? That is to have sharp corners instead of curved corners here. Also what's the ...
user avatar
  • 1,167
-2 votes
1 answer
166 views

How to draw picture like this in Latex?

How can I draw picture like this in Latex? Any pointers welcome.
user avatar
  • 355
3 votes
2 answers
97 views

Nodeconnect lines don't show up

I just installed miktex/texmaker and run an example from here http://mally.stanford.edu/~sr/computing/latex-example.html .But the lines that connect the tree don't show up like in the example. How do ...
user avatar
5 votes
1 answer
200 views

Drawing an unbalanced infinite growing tree

I want to draw a tree that looks like this (disregarding the two boxes, info regarding the tree heights and the node coloring, only the tree itself): I know I could draw this tree manually. Is there ...
user avatar
2 votes
1 answer
92 views

Additional info to Forest Tree & fit tree to page

I'm trying to reproduce the image below. As you can see on the left margin has some info: Channel, Code Type, Sender etc. aligned with descendants. Also, on Repertoire of codes and channels > ...
user avatar
  • 580
3 votes
1 answer
79 views

Drawing Arrows Between Tikz Boxes Around Forest Nodes (w/ MWE + Screenshot)

I am using MacTeX/TeXLive 2021, the newest version of TeXStudio, and Latexmk. I would like to draw an arrow from the green box to the purple box in the picture below. It would replace the current pink ...
user avatar
  • 319
2 votes
1 answer
69 views

Forest Node Alignment with Tikz Rectangle Drawing

I am using MacTeX/TeXLive 2021 and the newest version of TeXStudio. For compiling, I am using Latexmk. In the tree below, I would like for the green box placed on the VP to affect the positioning of ...
user avatar
  • 319
1 vote
1 answer
35 views

Dimension too large error using forest package

One forest in my document produces some weird problems. This is the problematic excerpt: \documentclass{article} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{amssymb} \usepackage{forest} \...
user avatar
2 votes
1 answer
62 views

Drawing a tree with rotated leaves using tikz-qtree

I'm trying to draw a tree with some text in the leaves that I'd like to rotate. The below code works fine except that the edges to the leaves are anchored to the right-hand side of the leaves rather ...
user avatar
  • 227
0 votes
2 answers
166 views

Drawing Latex tree and make arrows in it and change the spaces

I am currently typing a lecture note. Today, I have to make a tree in Latex. Style/application: text boxes and \tiksstyle Title: Types of equations Types of textboxes: border is black border is ...
user avatar
0 votes
1 answer
52 views

How to get a count of leaf nodes?

I'm new to LaTeX, and am working on a tree using forest. Is there any way I can find the total number of nodes in my tree which have NO child nodes? I've tried searching Google and Stack Exchange, but ...
user avatar
0 votes
1 answer
79 views

Fibonacci trees with weights

I'm trying to draw Fibonacci trees, but to make them look more like a real life tree I'm drawing them backwards with the following conditions: The n-th Fibonacci tree (Ft) should have F_n leaves (...
user avatar
  • 2,095
0 votes
0 answers
33 views

Making tree like graphs with different kinds of vertices/edges/loops/labels for use in math equations

I am trying to make tree like graphs where I can change the vertices, edges, and make additional edges between vertices or from a vertex to the same vertex itself that can be used in math equations. I ...
user avatar
  • 1
1 vote
1 answer
39 views

Tikz trees align equations

How can I align the equations in this diagram? I have tried using the align environment but it doesn't work. Here is the code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \...
user avatar
  • 147
0 votes
2 answers
76 views

Tree of matrices and grids

I can make a grid and set queens on it with a matrix. But now I want to make them a node, because I want it to be part of tree. And now the grid and the matrix are separated. Here is my code : \...
user avatar
  • 63
3 votes
2 answers
122 views

How to draw formal sums of trees?

I would like to draw something like this: in a way that, as in the picture, the + sign is centered with respect to the height of the trees. so far I used the tabular environment but the result is ...
user avatar
  • 45
5 votes
2 answers
138 views

How to make a node grow differently when other nodes are forked

I am a beginner in latex and am very interested in exploring it's wide range of features. I wanted to build a family tree and decided to use the forest package. I use this manual - forest_doc. I ...
user avatar
2 votes
2 answers
58 views

CGEL style fusion of functions trees using Forest in TeXstudio

How do I draw a CGEL-style fused determiner-head in an NP. This get's the basic shape of it, but I'd like everything from the Determiner-Head down to be centred under the NP at the top and an edge ...
user avatar
2 votes
1 answer
99 views

tree with branch

I want to draw the following picture in Tikz (I drew this in ipe). I am only able to draw the following picture using the code below. \documentclass[tikz, border=5pt]{standalone} \begin{document} \...
user avatar
0 votes
2 answers
43 views

make nodes distances equal

How do I reduce the space between the two children marked red? Adjusting s sep does not reduce the distance but pushes the next generation downward with equal spacing. \documentclass{article} \...
user avatar
  • 1,167
5 votes
2 answers
396 views

How can I draw a simple factor tree like this?

I am trying to draw a factor tree for my elementary students like this. What are the possible ways / packages to do it efficiently?
user avatar
2 votes
0 answers
44 views

How to arrange the tree diagram nice way to save space?

I want to arrange the tree diagram in a nice way to save space. Here is the latex code that corresponds to the diagram. Please help me. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[...
user avatar
7 votes
2 answers
221 views

Aligning ducks and their labels in a tree

I'm building a tree of labelled tikzducks. An MWE would be \documentclass{scrartcl} \usepackage{tikz} \usetikzlibrary{ducks} \begin{document} \begin{tikzpicture} [level distance=4cm, sibling ...
user avatar
1 vote
1 answer
77 views

Stern-Brocot tree where each node has two fathers

I would like to draw a "tree" like the one in the picture below. I tried the forest package, but I was only able to draw the tree with the black edges with root 1/1. \documentclass{article} ...
user avatar
3 votes
2 answers
167 views

Truth table generation giving weird math mode error?

I'm trying to write a truth table in LaTeX so that it's only takes up as much space as needed. I got the idea to do this with the forest environment when I created truth trees (semantic tableau) using ...
user avatar
2 votes
2 answers
131 views

Tree branching starting from specific character of node

I am doing parse trees for propositional logic formulas and I want to have the branches of a tree start from the main connective. Notice that the branching starts at a specific character for each node....
user avatar
  • 139
5 votes
2 answers
217 views

Forest package: multiple lines in a leaf

I am trying to display a classification tree on papers in my work with the forest package for LaTeX. So far, I have the following code: \begin{forest} for tree={grow=0, s sep=0pt,...
user avatar
4 votes
1 answer
125 views

Tikz-tree merging/recombining nodes

I need to draw a binomial tree, where nodes with the same value are merged together. Example: (But instead from left to right, I want it to be from up to down). Is there a way to do this with tikz-...
user avatar
  • 69
1 vote
1 answer
112 views

Rooted trees with labelled leaves

I am trying to draw something like this using the forest package: how do I draw a tree with circles at every node in a way that I can still label the leaves? is there a way to add dots between ...
user avatar
  • 45
1 vote
2 answers
91 views

how can I make a vertical and reverse decision tree in tikz

I am trying to make a vertical "reverse" decision tree inspired on this. This is my trial: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{tikz} \...
user avatar
1 vote
1 answer
51 views

Binary tree layout removes duplicate branches

What I want to do is draw a tree that doubles in size on each layer, so I thought a binary tree would be the right solution, as of right now I have the following code: \documentclass[a4paper, 12pt]{...
user avatar
1 vote
1 answer
66 views

Arrow diagrams using packages

Is there a way to draw a diagram like such using only default provided packages? The part that I'm trying to figure out is creating an arrow that points above an element, like the right-most arrow in ...
user avatar
  • 13
1 vote
0 answers
106 views

Chessboard tree diagram

I'm wanting to draw a chessboard tree diagram and I am trying to find the best way to create the tree diagram part. So far I have the below but it looks like the chessboard has a white border which is ...
user avatar
1 vote
1 answer
35 views

How can I center this rather uneven parent node around its dashes?

My question is: given the tree in question, how can I centre its parent node around its dashes? This is a sample of a much bigger, and complex, genealogical tree I am trying to build. I would very ...
user avatar
1 vote
1 answer
127 views

How to create trees with Qtree and math symbols

Hi I am trying to create a tree with two branches R<1 , R>1, which are labeled by math symbols (indices, \leq, ...). The second branch must be developed further. This almost works \...
user avatar
  • 155
0 votes
1 answer
47 views

Why are lines appearing away from TikZ graph?

I'm trying to connect the ends of child nodes in TikZ. The lines form the correct shape (it should look like a triangle), but they are appearing weirdly displaced. I want the lines to connect the ...
user avatar
0 votes
0 answers
45 views

Tree with lines in latex [duplicate]

How can i input this on latex? I tried but the space is too hard to input and also the line is hard to input \documentclass{article} \usepackage{bussproofs} \begin{document} \begin{prooftree} \AxiomC{...
user avatar
  • 63
1 vote
2 answers
79 views

How to add children to previously-declared nodes using TikZ?

Here is a simple TikZ tree: \begin{tikzpicture} \node {root} child {node {left}} child {node {right} child {node {child}} child {node {child}} }; \end{tikzpicture} In this ...
user avatar
  • 176
1 vote
1 answer
74 views

Fix overlap Decision Tree

Can please help me in fixing the overlap in the decision tree. Can you suggest a better code? \documentclass[border=10pt]{standalone} \usepackage{tikz} \tikzset{ treenode/.style = {shape=rectangle, ...
user avatar
  • 1,201
-1 votes
1 answer
75 views

Typesetting tree with groups of nodes

How can I create a tree in which some of nodes are in groups so there is no space in between them and only one arrow connects parent and whole group, but I can still add child nodes (of the same style)...
user avatar

1
2 3 4 5
11