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

Creating a floating tree next to another

I'd like to draw a smaller subtree inside a circle stemming out of this tree, in the following way: Is there a code I can use to do that (I'm using forest)? Thanks a lot!
  • 25
2 votes
2 answers
125 views

How do I draw big square brackets around forest nodes?

I'd like to write node features between big square brackets in a tree (I use forest), as in the example below. What function could I use?
  • 25
0 votes
1 answer
38 views

Tikz error "giving up on this path"

I have a strange giving up on this path, did you forget a semicolon? + missing } inserted bug with one of my commands made from tikz code (the code itself is perfectly working, suggested to me by ...
0 votes
0 answers
26 views

Colored rooted trees with white and black nodes (Butcher trees)

I found the solution to draw single-colored rooted trees (Butcher trees as used in numerical analysis) in Butcher Trees in TikZ I would like to adapt this to colored trees with white and black nodes. ...
  • 33
3 votes
1 answer
28 views

How to draw a circle top-down in a tree

How could I draw a circle top down in a tree? I need to draw a circle from PartP down to # only. Here's the code: \documentclass[a4paper,12pt, twoside]{report} \usepackage{tikz-cd} \usepackage[...
  • 63
3 votes
1 answer
79 views

Verbatim text in forest nodes

In the MWE \documentclass{scrartcl} \usepackage{forest} \forestset{termtree/.style = {align = center, l sep = 18pt, s sep = 15pt, where n children = 0 {tier = leaves}{}}} \begin{document} \begin{...
  • 1,844
4 votes
2 answers
127 views

Customize node shape and "fork" in forest tree

I am struggling to make a phylogenic tree. Below is a minimal example : \documentclass[10pt]{article} \usepackage{tikz} \usepackage[edges]{forest} \usetikzlibrary{trees,shapes,snakes} \begin{document}...
0 votes
0 answers
46 views

How to personalize font in LaTeX (forest)

I am drawing a stemma codicum in LaTeX using the package forest. The code works perfectly, but I would need a specific font i.e. Garamond Premier Pro. Is it possible to use it and how? Thanks \...
0 votes
1 answer
28 views

How to fix edge overlapping node in forest (increase distance between just two nodes)

I've the following tree made with forest package but unfortunately there is the edge to Z going through M. Why is that? I already tried to increase the s sep option but couldn't fix it. Does anybody ...
2 votes
1 answer
37 views

Place node label BELOW external nodes in tree with forest

I'm new to LaTeX and need to make a beamer presentation in which I want to show a tree like the one below. As I have limited time I used forest for this because it seemed the easiest and fastest way ...
1 vote
0 answers
22 views

Forest does not draw diagrams/lines [closed]

I have a problem with Forest in TexLive. I never experienced this problem in TexWorks which I am used to work with. As you can see in the picture, forest does not draw lines between nodes, so it does ...
  • 11
0 votes
1 answer
43 views

centering tikz forest diagram?

I have a tikz/forest diagram that is almost complete, with a few remaining issues. 1a/1b: the title and the diagram are not aligned. I'd like them to be centered, so either the title needs to move ...
  • 15
1 vote
1 answer
36 views

Reducing distance between Parent and Child level

I'm trying to reduce the distance between levels AA and A in the picture, I tried to use l sep but it didn't work. \documentclass[tikz]{standalone} \usepackage{tikz} \usepackage[edges]{forest} \...
  • 1,087
4 votes
2 answers
187 views

Argument splitting using low-level Expl3 syntax

Using egreg's answer here I tried to create my own advanced command with key=value-style optional argument splitting, which was successful. Now how can I integrate the splitting of the mandatory ...
0 votes
1 answer
29 views

How to reduce node spacing in forest when using a custom edge path?

Consider the following code: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{forest} \title{Bla} \author{John Doe} \date{April 2020} \begin{document} \maketitle \begin{forest} ...
3 votes
2 answers
113 views

Problem in getting chart with \usepackage{forest}

I am using the script provided here to draw a multi-levels chart. The chart should look like this: But when I run the same script in that should produce the above chart, I get distorted arrow. I am ...
  • 297
1 vote
1 answer
49 views

Double edge forked forest

I know how to draw a forked edge in the forest package \begin{forest} forked edges, [test [ok][doubled[test][fest][boost]]] \end{forest} And it gives me this result I would like to ...
1 vote
1 answer
23 views

Forest: change depth of a sibling

\usepackage[linguistics]{forest} \begin{document} \begin{forest} [A[B[C]][D]] \end{forest} \end{document} Here A has two children: B and D. I would like to place D just right of C. How do I ...
  • 151
1 vote
1 answer
41 views

drawing trees with forest

i want to draw a tree with thicker branches like the one in the picture, what could i put instead of ''thick'' ? \documentclass[border=3.141592]{standalone} \usepackage{forest} \begin{document}...
0 votes
2 answers
53 views

How do I draw a decision tree like this?

I've tried plain-old TikZ and Forest and cannot get close. Thank you!
  • 205
2 votes
1 answer
59 views

no math is generated when using tikz/tikzpicture with tex4ht in mathjax mode

I found another problem with math when using tex4ht and tikz. This is similar/followup to earlier question no math is generated when using tikz/forest with tex4ht in mathjax mode but since this ...
  • 19.2k
4 votes
2 answers
91 views

forest Package Tree Change with RequirePackage

I am using the forest package to draw a simple tree. When using forest with the Springer-Nature template, forest must be specified via a \RequirePackage callout before calling \documentclass. This ...
  • 451
0 votes
1 answer
41 views

why caption is not centered under figure when using forest? How to correct

I am following an answer in How to include caption in \begin{forest}...\end{forest} in LaTex where it shows how to put forest inside figure with caption, under the part where it says If you want a ...
  • 19.2k
2 votes
1 answer
43 views

no math is generated when using tikz/forest with tex4ht in mathjax mode

This MWE \documentclass{article} \ifdefined\HCode \def\pgfsysdriver{pgfsys-dvisvgm4ht.def} \fi \usepackage{amsmath} \usepackage[edges]{forest} \begin{document} \begin{forest} for tree={ draw, ...
  • 19.2k
1 vote
1 answer
41 views

How can i make bigger rectangles in a tree in LaTeX

I'm trying to insert a vector inside of a node in a tree,but the vector is too big and i don't know how to set bigger rectangles, so the vector can fit. For example, in the below code i tried to ...
1 vote
1 answer
33 views

How to color the nodes of a binary tree using forest package in LaTex

I'm trying to color the nodes of a binary tree. The main idea is that i want to create a binary tree that the nodes of its subtrees are colored. I don't have a preferred color for the nodes, i just ...
1 vote
2 answers
38 views

import multi external files into forest

I want to import many input text files inside a forest. Here is an example to illustrate my idea: input1.txt This line is a long sentence that may need more space to fit inside a single line. This is ...
  • 2,160
1 vote
1 answer
52 views

Import extrenal text into forest

I want to import a text file into forest and have it as it is without using latex symbols. I found verbatiminput as possible choice but it doesn't work as I expect and outputs some strange chars: Here ...
  • 2,160
1 vote
1 answer
47 views

Reduce vertical space of forest directory tree

I am struggling with reducing the vertical space of a directory tree using the forest class. My code is based on this SO-Answer (https://tex.stackexchange.com/a/328890/32924). Although, I added inner ...
  • 111
7 votes
2 answers
464 views

Children alignment with their parent

I've been looking for some hours examples for this unfortunately I can't find one that I can use, sorry for the inconvenience... I would like to have vertical alignment between the parent $v_1$ and ...
  • 73
2 votes
1 answer
79 views

How to split my figure (folder directory tree) into two columns in latex as shown in the screenshot?

\documentclass[tikz, border=12pt, a4paper]{standalone} \usepackage{tikz} \usetikzlibrary{trees} \usepackage[edges]{forest} \usepackage{sectsty} \usepackage{array} \usepackage{multicol} \usepackage{...
1 vote
1 answer
33 views

How to make grow work with forest?

I'm trying to get this example from pg 42 of the the forest documentation to work: \begin{forest} delay={where in content={grow}{ for current/.pgfmath=content, content=\texttt{#1} }{} } [{grow=south} [...
0 votes
2 answers
83 views

Improvement of Game Tree in Forest: Visualisation of Backward Induction

I need help finishing my game tree in forest . I have successfully managed to represent the different levels and the basic structure of the tree with a continuum of moves, see the code. However, I ...
  • 15
1 vote
1 answer
53 views

Improvement of Game Tree in Forest with continuum of moves

I need help with an application within the Forest environment. I would like to create a game tree in Forest where there is a continuum of moves. These are marked with arcs, as can be seen in the top ...
  • 15
3 votes
2 answers
99 views

forest - automatic setting of the alignment of some labels

In the following picture, I would like to align the label 1470 = 1400 + 70 as if it was 1470 : see the red arrow. This feature is needed for any node, not only the root one, and an automatic procedure ...
  • 12.2k
-1 votes
1 answer
43 views

Decorated trees using forest package

Using the package "forest", firstly i would like to draw the following tree (where terminal vertices could be either a dot or a letter), i could write a tree where all vertices are dots or ...
0 votes
1 answer
33 views

Spacing of siblings in Latex forest

In the first row here, the middle sibling lilts sideways. How do I center it? \documentclass{article} \usepackage{forest} \begin{document} \begin{forest} [$expr$ [$expr$ [$term$ ...
0 votes
1 answer
30 views

Tikz extra node before forest

I would like to combine a forest with some kind of variable initiation on top of the first node. This is the code I currently have \documentclass[]{standalone} \usepackage{forest} \usetikzlibrary{...
1 vote
0 answers
30 views

Forest: vertical space on folder grow

I want to calc "on the fly" the vertical space the nodes must have to avoid overlaping and it'd be nice to align them too, currently I've a style named arrowed folder that it's almost a copy ...
1 vote
3 answers
101 views

Highlighting parts of nodes in forest

In my forest (see code) \documentclass{standalone} \usepackage[edges]{forest} \begin{document} \begin{forest} for tree={% folder, grow'=0, fit=band, } [root [2020-01-01 10:05 part ...
2 votes
1 answer
105 views

Change color of forest nodes

I'm trying to change the color of certain blocks to green and some to red in a forest graph in LaTex using Overleaf. I'm not getting anywhere though. My current code is: \usepackage{tikz} \...
  • 21
0 votes
2 answers
88 views

Is there a way to insert line-breaks in a tcbox within a forest environment?

I am trying to get line breaks in a tcolorbox object whose width is limited to the width of the text therein (or to the width of the forest node it is inside). This is standardly done via \tcbox[...
  • 333
4 votes
1 answer
61 views

Forest package not working at all

I have used the forest package for several years and I hadn't had any problem until now. It simply stopped working. I use Texstudio, but I tried the same file with TeXShop and got the same error, so I ...
0 votes
0 answers
30 views

TikZ forest ignores tikzsetnextfilename

I have the next structure Main.tex \documentclass[12pt]{report} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Draws & diagrams \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows.meta, shadows} \...
1 vote
1 answer
53 views

Forest: Using an ellipsis (...) and increasing horizontal space between nodes

Looking for how to insert an ellipsis (...) between $B_{1}$ and $B_{n}{1}$ and increase horizontal space between $B{n}{1}$ of U and $B{1}$ of R under K in the following picture. \documentclass{...
  • 8,423
2 votes
2 answers
50 views

Shifting leaf nodes to the right in forest

In the following tree the edges should hit the leaves above ha, en, and o. But due to the subscripts, the edges hit at the middle of the complete node. I found a "solution" to the problem ...
4 votes
2 answers
196 views

How to change the size of an arrow?

Using TikZ, how to have an arrow that automatically extends to accommodate text above and below it? Here is my code: \documentclass{article} \usepackage{amsmath} \usepackage[edges]{forest} \begin{...
  • 163
0 votes
1 answer
45 views

How to fix children alignment in this forest?

I am trying to align the Branches 1 and 2 of this forest with the vertical lines under Subtitles 1 and 2, but I haven't been able to do it so far. Do you know how to do this?. The diagram was made ...
  • 103
5 votes
1 answer
177 views

Vertical alignment in a tree

I've used base=bottom and base=top to have the text in a child node vertically aligned. However, I don't have the desired output. I would like to have "You can" in front of the edge, not &...
  • 163
0 votes
1 answer
56 views

How to move a tree?

This is the tree I am drawing. I would like to move the left-facing brace (together with the x/y tree) closer to the m/n tree. When I try using "s sep", the p/b tree above also moves. \...
  • 163

1
2 3 4 5
17