Questions tagged [forest]

{forest} is about trees in {diagrams} created with the forest package. It is built upon {tikz-pgf}.

Filter by
Sorted by
Tagged with
1
vote
1answer
20 views

Compilation error using Forest package

I've been looking at this for a while, but can't figure out what's wrong with the code. It compiles in Overleaf, but with errors. I'll show the code first, and then the errors. \documentclass{article} ...
1
vote
1answer
34 views

forest — How to create a custom edge path at level 3 and level 4

While attempting a question [https://tex.stackexchange.com/questions/567434/tikz-tree-diagram-classification-with-functional-levels] I got stuck at level 3 and 4-- How do I get the correct structure ...
3
votes
2answers
138 views

Tikz tree diagram classification with functional levels

I'm trying to achieve the following tree diagram with functional level scheme, using the Tikz/forest package for my literature report: I'm still learning how to use these packages, but I'm stuck on ...
2
votes
2answers
24 views

How to Type Clitic Examples with the gb4e Package

I was struggling to use clitics in my glosses, as it forces the use of an = sign. I searched for a long time, but every question I was able to find was specific to math. Normally, the use of ...
2
votes
2answers
62 views

How to get ALL forest nodes arranged from left to right without overlapping bands?

I want to get all nodes to be in ascending order from left to right. If I use fit=band the 2 subtrees left and right are in good order without any overlaps. But the left subtree is far too right and ...
-2
votes
3answers
76 views

How can I draw a tree like this?

I cannot figure out how to add the boxes with numbers in them. I've tried using forest and tikz but was not able to do this. I was able to draw a tree structure easily, but that's it.
1
vote
1answer
34 views

Tree with well disposed labels and edges

I would like to do a tree like this : But I'm only able to do this : with the following code : \begin{forest} for tree={grow=north, parent anchor=north,child anchor=south} [a[b[c]]] \path[fill=red] ...
2
votes
3answers
129 views

forest - Move vertically a node

Here is a basic tree. \documentclass{article} \RequirePackage{forest} \useforestlibrary{linguistics} \begin{document} \begin{forest} for tree = {grow' = 0, sn edges}, [ [A] [...
0
votes
3answers
57 views

Draw a hash table horizontally

How to create this design? It's possible with forest?
0
votes
2answers
54 views

Draw a counting tree with grow right and then placed on the right (or left) of page that shown on the picture

I need help about tikz (or any other latex tools) on how to draw a counting tree with grow right and then placed on the right (or left) of page that shown on the picture.
1
vote
0answers
28 views

Error when creating trees in latex [closed]

So when I am creating trees using forest I get a really weird error when creating the second tree. I get the following error even when I create an empty tree: Argument of \bracket@Parse@token has an ...
1
vote
1answer
49 views

Add node colors and node shapes to legend in tikz-picture using forest tree and pgfplots

I want to add the elements of my tree to the legend (see the legend for description). I found this and this answer, but they do not explain how to add other shapes to the legend. I did not find ...
0
votes
0answers
24 views

Write macro to create a recombinant binary tree with the forest package

Below I show how I can use the forest package to create a recombinant binary tree by drawing some edges manually. How can use the forestset macro to achieve the same result, without the need to add ...
0
votes
1answer
41 views

How can label an edge of a tree which was manually added?

One can use TikZ to create a tree manually , or use the forest package to make the process easier. Below I show how I can use the forest package to create a binary tree, and turn it into a recombinant ...
1
vote
1answer
30 views

Use \forestset macro to automatically turn on math-mode in each node, and color the 2nd component of every couple?

I want to produce a binary tree, where at each node I will enter a couple (e.g. $(8,16)$ or $(S_2,M_2)$), and the second component is colored red. How do I use the \forestset macro (from the forest ...
0
votes
1answer
34 views

Coloring all nodes that follow to a specific terminal node

I have been trying to color some nodes with filled dots. But I am stuck, following the forest package guideline, I was only able to fill only first and two rows. What I am trying to do: I was only ...
1
vote
1answer
41 views

forest - Change the color of the nodes after their creation by using their automatic name

I have tried to use the solution given in this post to act on nodes of a forest tree but the solution does not work with automatic names given by forest to the nodes : see the MN(ot)WE below. Is there ...
1
vote
2answers
40 views

Forest package: How to use \forestset in the preamble?

I'm trying to automate the layout for certain trees that I wish to use repetitively, but I don't seem to be able to get the \forestset command to work in the preamble. In the codes below, I suppose ...
0
votes
0answers
19 views

Changing taxonomy structure

I have following structure of my taxonomy \documentclass[conference]{IEEEtran} \usepackage{etex} \usepackage{graphicx} \usepackage{epstopdf} \usepackage{tikz,pgfplots} \usepackage{tikz-qtree} \...
2
votes
1answer
76 views

How can I draw a tree diagram where leafs are connected to converging branches?

\documentclass{article} \usepackage{fullpage} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{arrows,shapes,positioning,shadows,trees} \usetikzlibrary{arrows.meta} \usepackage{mdframed} \...
1
vote
1answer
40 views

Align edges of forest to center of column in node

I have a forest whose nodes are tabulars, looking like this: I would like the edges to be aligned to the center of the second column of the table (the formulas) -- that is, at the upper end, the ...
1
vote
3answers
66 views

TikZ - foreach, expansion problem, optional argument and node

I am trying to use foreach to simplify the 1st env. code in my MN(ot)WE below. There is an expansion problem regarding the optional argument in the 2nd code. Here is the output. How can I fix this ? \...
0
votes
1answer
68 views

TikZ - forest - for nodewalk to add a root-to-leaf path

In the following M(erly)WE, here is my goal. I would like to give the colors as an argument. I would like to decorate all the edges and nodes from the root to the leaf marked. Here is the output of ...
1
vote
1answer
30 views

TikZ forest - Align content using a macro and not a style

In this previous post, js bibra gives me a way to align contents by using some styles. I need indeed to work with a macro like in the following MN(ot)WE. I'm trying to adapt the use of \coordinate (...
0
votes
1answer
40 views

forest styling - Horizontal tree similar to a folder tree

I would like to obtain the following formatting for a tree with the excellent package forest only. Maybe the example in page 82 of the documentation or this other post could be a starting point. Here ...
0
votes
1answer
33 views

TikZ forest - Align extra contents added on the right of the final nodes

To explain "probabilistic" tree, I would like to add extra texts. I would like to align vertically all this extra texts. Is it feasible? Is it also possible to have perfect baseline ...
2
votes
1answer
39 views

Vertical dots in a tree with forest

I am writing a paper about the collatz conjecture, and I want to show a diagram, but I don't know how to add ellipses to the tree. \usepackage{forest} \begin{forest} for tree={ edge path={\...
1
vote
2answers
50 views

How to correctly put the root of a Forest tree in a custom position?

I am trying to draw a simple tree using forest. A simplified version is the following: Now I need to reduce the horizontal space occupied by the figure. My idea is moving the root node above Node A, ...
5
votes
1answer
103 views

TikZ - Surrounding som edges of a “forest” tree

I'm looking for some help to obtain a better formatting than what my code does for the moment : see the ugly picture below. I would like the blue line to be parallel to "its" parallel edges....
1
vote
1answer
48 views

tikz use pic as “tree node” with forest package

The pre-problem is tikz tree use pic as tree node, which has a perfect answer. What's more, I want to get pic worked with forest package, with nodes and cooredinates inside pic able to be referenced ...
1
vote
1answer
86 views

Change alignment of tree-boxes in Block Diagram using Forest package (or otherwise)

I need to draw a tree-like diagram for a classification purpose. Getting a cue from this question, I came up with the following MWE \documentclass{book} \usepackage[tmargin=2in, bmargin=2in, lmargin=...
4
votes
2answers
87 views

Choose between xymatrix, forest and pst-tree

I'm embarrassed about the choice of the package used to produce rooted trees like this I have the option of the forest package Example1, The xymatrix package example2, or pst-tree package Example3 ...
1
vote
1answer
43 views

Tree does not show correctly

I have a tree in 2-column display, it doesn't shows correctly. There are some errors that I no know how to resolve them \newcommand{\CLASSINPUTbottomtextmargin}{25.4mm} \newcommand{\...
0
votes
0answers
35 views

Alpha-Beta Pruning tree (multi-shape node) in forest

I am trying to reproduce a tree (Alpha-Beta Pruning) where each node consists 2 components: a triangle and a 3x2 table. \tikzset{ triangle/.style= {draw, regular polygon, regular polygon sides =3}...
2
votes
1answer
23 views

Forest Tikz text alignemnt vertical

i am trying to align the text in vertical, so that it looks tidy and doesn't require much space. text width was recommended here in this forum, but I don't know where to call that command in forest. :-...
0
votes
1answer
40 views

Forest package : URL tree?

After reading this answer (Making a (simple) directory tree), I was curious to see if I can reproduce this URL tree with the forest package : As you can see, it is similar to a dirtree but some urls ...
1
vote
0answers
22 views

How to center a node between two subtrees with `forest`? [duplicate]

I have the following tree, which I drew using the package forest: \documentclass[border=2ex]{standalone} \usepackage{forest} \begin{document} \begin{forest} for tree={grow'=north, math content} [...
0
votes
0answers
41 views

Defining \absurd in prooftrees

In https://www.logicmatters.net/resources/pdfs/L4LProoftrees.pdf, a predefined expression \absurd is used in expressions like close with=\absurd. How can this be defined?
1
vote
1answer
23 views

Forest: Help with automatic anchoring of nodes relative to edges of other nodes

I have trees in forest, where each node in the tree is annotated with a superscript (index) and a subscript (outdex), which I instantiate as separate nodes and position in the left and right corner of ...
0
votes
0answers
11 views

Positioning two forest trees side by side as numbered gb4e subexamples [duplicate]

I am adjusting the tabularx solution to position two syntax trees side by side, as numbered subexamples. The problem I am having is too much whitespace between the second-level label ("a.") and the ...
0
votes
0answers
30 views

Adding extra lines to trees with forest

I have trying to draw trees using forest with consonants and vowels on different tiers. With help from Sašo Živanović I managed to do this as in (1) in the following MWE. I next wanted a tree with a ...
1
vote
1answer
29 views

Forest package: Tree connector apear reversed

For the following MWE, I am sing the {forest} package to make a hierarchy, however the node connector for the second level apears on the opposite side, it emerges from the opposite node on far LHs ...
1
vote
1answer
39 views

arrows between table cells and graph nodes

Want to achieve something like this: Code: \usepackage[table]{xcolor} \usepackage{forest} \setlength{\arrayrulewidth}{.1mm} \setlength{\tabcolsep}{12pt} \renewcommand{\arraystretch}{2} \...
2
votes
1answer
47 views

remember picture not working with forest and tikzmark's subnode

According to the tikzmark documentation, when using \subnode, it should be possible to use ordinary node syntax (within a tikzpicture) to access this information. Thus after \node {a \subnode{a}{...
0
votes
1answer
85 views

Tikz Forest coloring and edge label positions

Here is the code: \begin{figure}[H]\centering \begin{tikzpicture} \node (tree) { \begin{forest} for tree = {circle, draw, minimum width = 2.25em} ...
1
vote
1answer
66 views

Skip level in TikZ forest tree

In the following example, I'm trying to "skip" a level in my TikZ tree. On other threads I saw the recommendation to add , tier=text to relevant nodes to assign them manually to another tier. This ...
1
vote
1answer
37 views

How to reduce the size of forest?

I have a forest with many leaves and It took the whole page. I want to reduce its size. I tried \scalebox but it doesn't work, it goes out of the page \newcommand{\CLASSINPUTbottomtextmargin}{25.4mm} ...
0
votes
3answers
62 views

How to make the forest at the center?

I want to put the forest at the center here is my code: \newcommand{\CLASSINPUTbottomtextmargin}{25.4mm} \newcommand{\CLASSINPUTtoptextmargin}{19.1mm} \newcommand{\CLASSINPUToutersidemargin}{15.8mm} ...
1
vote
1answer
53 views

Unique level color in vertical forest diagram in tikz

\documentclass[tikz,border=5pt,multi]{standalone} \usepackage{forest,array} \usetikzlibrary{shadows} \begin{document} \newcolumntype{C}[1]{>{\centering}p{#1}} \begin{forest}...
1
vote
1answer
81 views

How to put forest in 2 columns page?

I have a 2-column article in which I would like to put a forest in 2 column instead of one, and at the top of page. Here is the code: \newcommand{\CLASSINPUTbottomtextmargin}{25.4mm} \newcommand{\...

1
2 3 4 5
13