Questions tagged [forest]
{forest} is about trees in {diagrams} created with the forest package. It is built upon {tikz-pgf}.
748
questions
0
votes
1
answer
11
views
How to return/realign/reunite a branch of a tree structure to the original parent lineage using the forest package?
I am drawing etymological trees using forest and I am wondering if I can reunite my forked-off branches back with the main "line" somehow.
Essentially the question could also be: Can one ...
2
votes
1
answer
26
views
Morpho-phonological insertion in syntactic tree
I need to draw a tree that partially reproduces one from a paper I'm citing in my dissertation. With the following code I obtain the tree below. However, what I need is to draw the connection between ...
1
vote
1
answer
15
views
Forest - horizontal directory structure
Does someone know how to turn this vertical directory structure into a horizontal one?
I already tried different solutions, but none of them worked as expected.
\documentclass[12pt,a4paper,oneside, ...
0
votes
0
answers
26
views
How to use pause for each level in a forest tree? [duplicate]
\documentclass[10pt]{beamer}
\usepackage{forest}
\forestset{
my nodes/.style={minimum height=1.5cm,rounded corners,draw,align=center,top color=white,bottom color=A!80}
}
\begin{document}
\begin{frame}...
1
vote
1
answer
29
views
Forest Package for "Conceptual Blending"
)
I am trying to create a figure for a "conceptual blend" from Cognitive Linguistics.
I have managed to create "something" with the forest package, however I am not sure how to add ...
1
vote
0
answers
29
views
Forest: Directory listing with files and file contents
This expands on a number of questions of file listings using forest. The most similar solution to my desired one is this one.
The open question, to which I couldn't find a solution is: how do I ...
2
votes
1
answer
73
views
forest – grow half of tree the other direction
I am trying to change the growth direction midway while growing my tree with forest.
Here is an MWE:
\documentclass{standalone}
\usepackage{forest}
\useforestlibrary{edges}
\...
5
votes
1
answer
125
views
How to make a directory tree (with forest)
(this question is a follow up of How to insert folder icon in root node with forest package and Making a directory tree of folders and files)
The following example shows the problem:
\documentclass[...
0
votes
1
answer
52
views
Create a stemma codicum using qtree
I've realized the following stemma codicum using forest.
However, I am trying to see if it is possible to recreate the same result using qtree. So far, I have managed to create the following code but ...
3
votes
1
answer
47
views
node positioning in a forest
I followed the forest based solution of this post Making a (simple) directory tree to create a directory structure. Right to each file and name I want to add its full path. Full paths should also be ...
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 ...
3
votes
1
answer
70
views
How to count nodes in forest?
I'm complete beginner in LaTeX, this is my first document.
I need to count every node in Forest, and nodes that are different color and I can't figure out how aggregate function .count works.
This is ...
1
vote
0
answers
31
views
Forest figure changining between multiple compilations
As it is well known, some tex projects need to be compiled several times to get things done.
I have this case with the forest package where the output is as expected at the first compilation.
However,...
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{...
1
vote
2
answers
74
views
Tikz Forest - How to have a custom placement for a child node?
I would like to change the position of a specific child node in a diagram using the forest package.
I would like to have a diagram organized as follows, with a child node located directly to the left/...
0
votes
0
answers
31
views
Are there anyway to use forest package with IEEEACCESS template? [duplicate]
I have been facing a problem to use Forest and Tikz package IEEE Access template. If I use these packages the title, abstract and index terms do not appear in the pdf. I find a solution here Title, ...
0
votes
1
answer
39
views
Changing the color of the boxes and their margin using forest
I have a decision tree made from the code below. Yet, so far I have not been able to get rid off the shadowy properties of the boxes. I would like the boxes around the names to have a black margin and ...
1
vote
1
answer
46
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 ...
2
votes
1
answer
52
views
How do I auto-indent a forest tree in the source?
I often have to work with large collections of forest trees whose indentation in the source is collapsed, for example:
[A[B][C[D]]]
or
[A
[B]
[C
[D]
]
]
This is of course hardly readable as soon as ...
3
votes
1
answer
81
views
Forest latex how to go to next line in node child
I am just experiencing with forest, and I'd like to have a responsive child, and not to be in one line as shown in the figure below:
I'd like to split the text of all child of 1 level. I already ...
5
votes
1
answer
86
views
Forest: Edge at leftmost character
I am trying to write a join-tree in forest like this:
\begin{forest}
[$\bowtie_{p_{AB}}$
[A]
[B]
]
\end{forest}
However, the Bowtie / join symbol is not centered, and instead the edges seem ...
0
votes
1
answer
30
views
How to resolve `! Undefined control sequence. \GenericError` with forest and comma in math mode [duplicate]
I want to write the following code:
\documentclass{article}
\usepackage{forest}
\begin{document}
\begin{forest}
[ \(R(x, f)\)
[x]
[f]
]
\end{forest}
\end{document}
Which gives the ...
1
vote
1
answer
42
views
TikZ/Forest: Drawing square arrows that go down and back up
I'm sure there's already an answer for this somewhere but I can't really find it. I'm trying to get square arrows that go down and back up below the tree.
This is what I have right now with the ...
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. ...
0
votes
0
answers
21
views
"babel" package makes rendering of "forest" trees impossible
I am trying to recreate the example code from the package documentation at page 29.
The package is called "forest" and is used to draw trees in LaTeX.
The example shows how to draw a tree, ...
2
votes
2
answers
67
views
Geometric figure 'framing' forest tree
Is there any way I can, so to say, frame my forest-tree with the shape of a cone?
This is what I got so far:
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{float}
\...
4
votes
1
answer
106
views
Forest environment inside forest node
Is it possible to have a forest environment inside a forest node? It does not work when I write the following:
\begin{forest}
[$a$
[$b$]
[$\texttt{apply}\left(
\begin{forest}
...
1
vote
0
answers
40
views
How to draw a graph for source code? [duplicate]
I have to draw a graph like the following or similar:
I have already explored tikz and forest package and have not came anything like this.
Can anyone please provide me any pointer or package name ...
2
votes
1
answer
61
views
Tree of logic puzzle
I want to build a tree of the 8-puzzle. By using logicpuzzle and forest I got to this point:
\documentclass{article}
\usepackage{logicpuzzle}
\usepackage{forest}
\newenvironment{eight}[1][]{%
\begin{...
1
vote
1
answer
46
views
Creating a Box which is not descendant or the first node
Is it possible to create a box at the same level as the Children or Grandchildren but not a descendant from the first node (oil wealth)? Think of an isolated box called 'ABC', which does not have an ...
0
votes
2
answers
150
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]{...
0
votes
0
answers
25
views
forest simple vertical alignment [duplicate]
I do not find anywhere how to specify vertical alignment for a forest obtained with the forest package. Here is an example of a table I'd like to have in a document:
\documentclass[a4paper]{report}
\...
1
vote
2
answers
50
views
Forest: extending the upwards connection of forked edges
I'm attempting to use forest with the forked edges option in order to draw family trees, which seems to work very well except for drawing children whose two parents are both shown in the tree. In this ...
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 ...
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 > ...
3
votes
1
answer
80
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 ...
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 ...
2
votes
1
answer
61
views
Align edge path for childrens in forest
I am trying to align the edge path of my taxonomy using forest. I've looked at a lot of examples and documentation, without finding it. My knowledge in tikz is still very limited.
MWE
Here is a MWE. ...
1
vote
1
answer
36
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}
\...
2
votes
1
answer
59
views
How to increase the vertical distance between proof lines in a prooftrees environment?
With the following code I tried to create a proof tree with the prooftrees environment wich is based on the forest package which is based on the pgf/TikZ package:
\usepackage{pstricks}
%\usepackage{ot-...
1
vote
1
answer
126
views
Typesetting Subgroup Lattices in LaTeX
Trying to figure out the easiest way to create a subgroup lattice in LaTeX. Looking to create something like this one for `$D_4$'.
0
votes
2
answers
168
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 ...
1
vote
1
answer
284
views
Forest package with arrows between nodes
I am wondering how to add arrows to the Forest package syntax tree. I am hoping I don't have to use the Tkiz package to manually draw things. I hope to draw something like this:
My attempt so far:
\...
2
votes
1
answer
68
views
Labeling nodes by level and node ID in forest
I am drawing a family tree and I would like to label each node with the level and an ID, ideally restarting at each level. I would like to have the following output, but then with automatic numbering. ...
2
votes
1
answer
42
views
Breaking the line in \begin{forest} and \end{forest}
I'd like to break the text in the cell with “require major upgrades”, but I'm not able to.
\documentclass[dvipsnames,svgnames,x11names]{beamer}
\usepackage{amsmath}
\usepackage{amsfonts,amssymb}
\...
0
votes
1
answer
40
views
Define custom subtree macros in `forest`? [duplicate]
I am using forest to typeset some trees that contain many repetitive structures. For example:
\begin{forest}
[ [ NP [ N : \textit{John} ] ]
[ VP
[ V : \textit{ate} ]
[ NP
[ ...
1
vote
1
answer
75
views
Reformatting the directory tree style
I have a directory tree that almost looks like this:
The above image is what I am trying to achieve.
Here's my one which I took help and slightly modified from Making a (simple) directory tree
I ...
1
vote
1
answer
46
views
Forest tree with folders on every last relative level
I want to create a tree, where the children at the last parent node of each branch are arranged as a folder. Based on some other posts I created the example shown below. However, my problem with this ...
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 ...
2
votes
1
answer
36
views
Forest: Terminal nodes associated with multiple branches
I would like to draw family tree diagrams like the following, where the terminal nodes are associated with multiple branches.
My current workaround is to carve up the phrase I want to use at the ...