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
1answer
39 views

Forest: parent node positioned incorrectly in relation to children [duplicate]

The tree below is produced by the code beneath it. In the tree, the parent node is slightly out of alignment. You will notice that the edges to its children are asymmetrical: the one on the left is ...
1
vote
2answers
94 views

Tikzpictures in forest nodes without saveboxes

I am able to generate the following tree using the MWE below. It creates tikzpictures using a \drawtape command and puts them into saveboxes, which in turn can be straightforwardly used as the content ...
3
votes
1answer
44 views

Tikz trees growing to the left and right

I have a tikz diagram growing to the right hand side. \documentclass{article} \begin{document} \usepackage{tikz} \usetikzlibrary{decorations.pathreplacing,positioning,shadows} \begin{tikzpicture}[ ...
1
vote
1answer
53 views

How to make custom node set includes some nodes in trees package on Tikz

Please tell me how to make custom node set which consist of some nodes using \tikzset or \tikzstyle. In the below code, I want to set node of line (1)-(3) into a custom node set by \tikzset. On the ...
2
votes
3answers
109 views

Adjusting leaf sizes in forest

I'm trying to draw some trees using the forest package. For some reason, the leaf sizes are scaled differently depending on how many leaves the tree has (see picture). I want every leaf to be of ...
0
votes
1answer
33 views

Trying to add labels/descriptions to syntax trees in qtree

I'm trying to add descriptions to certain nodes in a Syntax tree. I'm using qtree, but I can't seem to find a way to do this. I'm also trying to box some, but not all of the nodes in the tree. Here's ...
1
vote
1answer
33 views

how fit a big tree in the paper and change the place of some nodes?

I made this tree by the following code \begin{forest} for tree={ rounded corners, draw, align=center, top color=white, bottom color=blue!20, }, forked edges, [a [$ ...
1
vote
1answer
38 views

how to make tree wider? [duplicate]

This is a tree that I made by following code: \begin{tikzpicture}[sibling distance=7em, every node/.style = {shape=rectangle, rounded corners, draw, top color=white, bottom color=blue!20}]] ...
2
votes
2answers
45 views

Formating nodes' content depending on parameters

I would like to be able to change the content of the nodes, from a home made parameter list to an actual text. For example, I would like to create trees such as: \documentclass{standalone} \...
2
votes
1answer
26 views

How to make a command to insert a subtree in forest?

I need to make several syntax trees using forest, and there are some structures that show up over and over again in multiple trees. How can I achieve this? So far attempts I've made with \newcommand ...
0
votes
2answers
104 views

automating recursive file hierarchy (directory tree) diagrams with tikz

So, I've been trying to write a python script that will produce the TikZ/LaTeX source code for one of these filesystem tree / directory structure diagrams: Preview Code LaTeX: TikZ \...
3
votes
2answers
66 views

Binomial queue in forest?

I was hoping to get some help drawing a binomial queue with the forest package. All I can find are references to binomial trees, but I am looking to replicate this: I tried using phantom to make ...
1
vote
1answer
70 views

Binomial tree using matrices?

I have the following code for a particular group, now I wish to show the matrix representations for each permutation in the same manner as: \documentclass[11pt]{article} \usepackage{forest} \begin{...
0
votes
0answers
63 views

how can I draw a compact resolution tree with annotation in latex?

I'd like to draw a resolution tree for a research paper: similar to the following resolution proof which each node might have extra annotations inside brackets[]. I found some posts like this but I ...
1
vote
2answers
116 views

Binomial trees using forest package

I need to draw a 3-period tree with different elements at each stage, for example: the upper path: (12)(12) ---> () the lower path: (13)(12) ---> (123) how can I draw such a tree? Edit: ...
2
votes
1answer
48 views

add text on the edge of line in proof tree

How can I do this in latex ? This is what I've tried, \documentclass{amsart} \usepackage{forest} \begin{document} \begin{forest} [$(\lnot \,A \to (B \to \lnot C)$ [$\lnot \, A$...
3
votes
1answer
53 views

Drawing a frame around a part of a syntactic tree using the `xytree` package

I am trying to make a box around a part of a syntactic tree, using the xytree package. I am aware that we can do it, using the qtree package which has the \qframesubtree command. But, I would like to ...
2
votes
2answers
144 views

Adding a symbol to the top of a vertex in a connected tree

I have a code for a tree \[ \xymatrix@-1.25pc{ *={\bullet} & &*={\bullet} & \frm{}\\ &*={\bullet}\ar@{-}[lu] \ar@{-}[ru]& & } \] which will produce this as ...
5
votes
2answers
66 views

Shift children and subtrees horizontally in forest

I am trying to draw a tree diagram with forest package. In order to have the diagram fitting within the page margins, I moved down the subtree of NastranBulkData object, as you can see from the image. ...
0
votes
1answer
78 views

Making a directory tree with custom symbols (symbol for MATLAB file)

I am trying to draw a directory tree. As the tree should visualize the structure of a MATLAB framework, i would love to represent the matlab files with the corresponding icon, e.g. I found the ...
1
vote
1answer
47 views

How to start Decision Tree with a split?

I am trying to draw a simple decision tree like in Figure 1 of https://besjournals.onlinelibrary.wiley.com/doi/full/10.1111/j.1365-2656.2008.01390.x Unfortunately whatever I try, I cant adjust the ...
0
votes
1answer
45 views

Library graphs - mixture between layered layout and tree - How to do?

the creation of a graph with some specific attributes is for me not possible. Maybe you have some helpfully ideas how to realize?! The attributes of the graphs in 1. and 2. have to be "mixed", while ...
2
votes
2answers
120 views

Tikz: tree and reverse tree combined together

I need to reproduce the following image in tikz: I started by drawing the upper part: the "normal" tree. I used forest to do this. But, I have no idea on how to do the lower part...the "reversed ...
5
votes
1answer
64 views

Is there a way to factorize the tree decoration of several trees?

I have a LaTeX document with several trees made with the forest package and would like to define a decoration style for these trees in a way that avoids code duplication. In other words, I would like ...
1
vote
0answers
124 views

No ordinary family tree. Howto insert Son/Daughter in Law?

With the tree above in mind, i am trying to get something like this: So far little luck, this is where i am now: I also tried forest, but still can't get the job done. \documentclass{article} \...
4
votes
3answers
187 views

How to include horizontal arrows in between nodes in TiKz

I’ve been attempting to recreate this language tree, and attempted to do it in TiKz, but I’m open to other solutions. However, I’m not sure how to approach the horizontal arrows which are located in ...
3
votes
1answer
49 views

Tree diagram has lopsided branch

I'm attempting to draw a tree diagram using the forest package that shows the morphological derivation of a word. However, when I align the terminal nodes, the highest branch looks lopsided. This is ...
3
votes
1answer
75 views

Align text and bottom of forest tree

How can I align text around forest tree's bottom node? Fox \begin{forest} [PAST [jumped]] \end{forest} over fence Or are there more cleaner ways to insert text above words?
2
votes
1answer
65 views

How can I insert a tree diagram into text?

I've made a tree diagram using the forest package. To prevent the diagram stretching beyond the page I've placed it in a box. How can I place this box within the text such that Latex can determine its ...
4
votes
2answers
135 views

Tree in Diagram not centered

while the diagram seems to be centered (as seen by the caption), the tree inside is not. The narrower the tree, the farther to the right it is positioned. Any thoughts? Here's my code \...
0
votes
1answer
68 views

How to draw hierarchical overlapping models

I am trying to draw hierarchical models with overlapping nodes. I am able to use Use tikz to draw a hierarchical model (mult-level model from statistics) to make hierarchical models, but I am not able ...
3
votes
1answer
57 views

Depth first step by step construction on forest tree

Currently using forest to display Tableaux trees on beamer. For some cases i want a depth first step by step animation for the construction of the tree. The idea is to start with the root visible, ...
1
vote
1answer
57 views

Draw a particular hierarchy tree diagram with a connector of the before to last level to the last one

I use the code found here To draw a hierarchy tree diagram \documentclass[tikz,border=10pt]{standalone} \usepackage[edges]{forest} \usetikzlibrary{arrows.meta} \begin{document} \begin{forest} for ...
7
votes
2answers
334 views

Decision tree nodes overlapping with Tikz

Does anyone know how to prevent the branches of a decision tree from converging on each other? This is with Tikz - I've tried tweaking the sibling distance and things like that, but two of the ...
3
votes
1answer
169 views

How do you use environments that have the same name within a single LaTeX document?

I'm trying to typeset some proof tree exercises. But I need to use the prooftree environment from the bussproofs package, as well as the prooftree environment from the prooftrees package. Is there a ...
2
votes
2answers
97 views

Display count of leaves(depth) at each level in tree

I am drawing a tree like given below. The MWE for it is below: \documentclass[]{article} \usepackage{forest} \title{} \author{} \begin{document} \date{} \begin{forest} [n ...
2
votes
2answers
231 views

Simple trees for mathematics

I have to draw many simple trees similar to the ones depicted for instance at page 128 or 133 of this beautiful book by Cheng and Lauda. I used to have some knowledge of the package forest, but ...
2
votes
1answer
121 views

Create separate double arrows as edge of a tree

I'd like to create a tree with edges made from two separate arrows as shown in picture: But I don't know how to change the edge to 'two separate arrows for each edge' Currently, I could only do the ...
2
votes
2answers
179 views

forest tree nodes

I'd like to clean up my tree by drawing an edge between parent nodes. In the following, I'd like to have the 0 nodes (which are children now) adjacent to the numbered nodes (ie on the "parent" level). ...
3
votes
1answer
48 views

Adding coordinates to forest edge path

I've got: I'd like something like: Code: \documentclass{article} \usepackage{tikz} \usepackage{forest} \begin{document} \begin{forest} for tree={rectangle,rounded corners,draw, l sep=20pt, if ...
3
votes
1answer
113 views

trees with straight spines, and not too much vertical space?

I want to be able to typeset syntactic trees in a way that will achieve the following: straight spine when there is no label on the nonterminal node obtuse angle at each (binary) branch (so the tree ...
4
votes
1answer
340 views

How to add multi-line text below a node in a tree in forest

I want to make a tree which has bulleted lists centered below the child nodes, like so: I've searched on TeX SE and found questions which describe putting labels below nodes, but it doesn't quite ...
1
vote
1answer
202 views

Improving a decision tree drawn with TikZ / forest

I'm trying to create a decision tree in TeX, currently using the forest package, which uses TikZ under the hood. TikZ is black magic to me, and as a result so's the forest package, but I found a very ...
0
votes
1answer
27 views

Labels are missing in the Tree

In the following tree, the labels are concatenated to their parent node. For example in the first branch of the tree from left, I would like to have "the" as a leaf, but it sticks to D (its parent). ...
3
votes
1answer
89 views

Drawing a centrally aligned tree using LaTeX

I am trying to draw a tree in LaTeX via following code. It works; however, it is always aligned to the left. How I can make it aligned to the centre? \usepackage[T1]{fontenc} \usepackage[utf8]{...
3
votes
1answer
56 views

Help with branches

I'm trying to do something like this, but I doon't know how to creat [+silábico] or organize "NUC" in an equal high. Thanks!! Here is what I used: (I've tried "[{[-silábico]},before drawing Vocálico={...
4
votes
1answer
100 views

How to position a single child node so it is in the same level with parent using forest?

Here is my tree diagram built using forest package. How to move the node in the red pen to the position of the blue pen? Here is my code. \begin{forest} for tree={calign=last}, [HEAD ...
4
votes
1answer
160 views

prooftrees.sty - why are line numbers overlapping and how to avoid?

Why are the "6" and "7" overlapping here and how can I avoid it? \documentclass[border=10pt]{standalone} \usepackage{prooftrees} \begin{document} \begin{prooftree}{} [A [A [A [...
3
votes
2answers
235 views

Problem with Texpad - Forest package Tree results in error: TeX capacity exceeded, sorry [parameter stack size=120]"

I recently got back reviews for a paper I submitted eight months ago. Upon opening my file, I discovered it wouldn't compile properly anymore. After some troubleshooting, I narrowed it down to the ...
4
votes
1answer
90 views

prooftrees tree nodes on different line

While trying to write a tableaux proof tree with prooftrees, I had some difficulty with putting single and branching nodes on the same line. \documentclass{article} \usepackage{prooftrees} \begin{...

1 2 3 4 5 9