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

learn more… | top users | synonyms

1
vote
1answer
58 views

Drawing condensed version of complex dependency diagrams

I got a cool solution to my question drawing complex dependency diagrams with tikz / forest and want to reuse this style for drawing a condensed version of the diagram that is supposed to look like ...
4
votes
1answer
45 views

Odd incompatibility between multi-line forest nodes and tabular

The following MWE compiles just fine: \documentclass{article} \usepackage{forest} \begin{document} %\begin{tabular}{c} \begin{forest} [x\\y, align=center [z] ] \end{forest} ...
3
votes
1answer
37 views

What is the default anchoring style in Forest?

Drawing linguistic phrase structure trees most of the time, I use the sn edges from the forest manual as a global default, with parent anchor=south, child anchor=north. This outputs the following sort ...
6
votes
1answer
33 views

Forest local versus global style

This is something that has been frustrating me for an hour or two. Usually I maintain forest styles locally within each image. I have one particular forest that has been driving me insane, but I am ...
5
votes
1answer
110 views

drawing complex dependency diagrams with tikz / forest

I want to draw the following Word Grammar diagram with tikz/forest: I am a great fan of forestand would like to have a style for such graphs, but I think this is non-trivial/impossible for this type ...
7
votes
1answer
84 views

Targeting proper parts of nodes in `forest`

I am using forest to construct trees. I have one (minor but persistent) issue: sometimes I would like to place a node at a point that is a proper part of (e.g.) a leaf, in particular so that I can ...
1
vote
0answers
34 views

! LaTex Error: File `forest.sty` not found [duplicate]

When I run a tikz code on my PC, the following error always stop me from producing the figure. ! LaTex Error: File forest.sty not found But my code is okay in Overleaf. My LaTex on ...
4
votes
2answers
66 views

Elementary forest question: meaning of calign, parent anchor and child anchor [closed]

Consider the following example: \documentclass[tikz,border=5pt]{standalone} \usepackage{forest} \begin{document} \begin{forest} for tree={ draw, } [center,calign=center [first, parent ...
6
votes
2answers
156 views

move the green box to the top of the right grey box

The following is the graph I modified from the forest style, but I encounter an problem when I try to move the green box to the top of the right grey box, I know the main problem is the tree style, ...
4
votes
2answers
61 views

Aligning nodes at the right periphery of the text area in forest

I have to typeset trees with huge AVMs in them: I want to do this with forest and the idea is to have all right nodes be aligned at the right periphery as it was done by hand in the picture above. ...
0
votes
1answer
17 views

Aligning siblings with complex content in forest

I have the following code and I want the AVMs to be aligned at the top. The two PHON values should be at the same height. I have the option base=top set for all nodes, but this does not work. ...
6
votes
1answer
220 views

Math content in forest

I'm trying to modify an example given in the forest manual. However, the template is setup in such a way that I'm not able to enter more "advanced" math contents, such as \nicefrac or \underset. In ...
2
votes
2answers
61 views

Draw a box containing the grandchild and add text at the bottom of box

I want to draw a minimal box which contains all the grandchilds (pink boxes), and move the text of deep green box to the bottom of the new box. How could I do it? codes: \documentclass{standalone} ...
7
votes
1answer
86 views

TikZ externalize fails with Forest

I'm having a hard time getting TikZ externalize and Forest to play nicely. Here is a MWE (text.tex): \documentclass{article} \usepackage[external]{forest} \tikzexternalize \tikzset{ ...
2
votes
1answer
34 views

How to align text boxes in forest?

I adopted Alenanno's code to draw the following graph, but I encounter a problem, that is, how to align the text boxes (pink boxes) in left? and codes are as follows: \documentclass{standalone} ...
1
vote
0answers
31 views

Align the forest from left to right [duplicate]

Recently, I applied cfr's code to what I wanted (see below). But I want to arrange this diagram from left to right in order to put into my book, that is, put the topmost box at the left side of page ...
4
votes
1answer
48 views

How to modify Forest nodes in Beamer overlays?

I would like to change a property, say the color, of a forest node between overlays in beamer. It is proposed elsewhere to use PGF's keys for this in the general case. However, this approach doesn't ...
3
votes
2answers
173 views

Writing info into a tree

I want to draw this tree, but I want the data on the branches to be parallel to the branch, not like the result I am getting Thank you! \documentclass[12pt,oneside,a4paper,fleqn]{report} ...
2
votes
2answers
38 views

Making branches closer in a tree

Suppose that I have the following tree... and I want to make only the second and third branches closer. Is that possible? \documentclass[12pt,oneside,a4paper,fleqn]{report} \usepackage{forest} ...
6
votes
2answers
174 views

Decision Tree with Labels on Both Sides of Line

I am trying to generate a decision tree similar to this scanned example: Notice that some branches have text on the top as well as the bottom. I have not figured out how to do this. I can get text ...
1
vote
3answers
57 views

Adding Short Lines Across Decision Tree Branch

I am creating decision trees using the 'forest' package and would like to add short lines across a branch to indicate that the decision is sub-optimal. Can this be done in 'forest'? I am attaching a ...
7
votes
2answers
209 views

Adding Triangles to LaTeX Decision Trees

I am using the 'forest' package in LaTeX in order to create decision trees with multiple decisions. I've got it mostly how I want it, except for two things: I'd like the circles at the leaves of the ...
2
votes
1answer
31 views

draw small lines

I have the following scenario tree \begin{forest} [,name=a,for tree={s sep=50pt,l sep=5cm,dot,grow=1}, [ ,name=b, edge=dashed [ ,name=c, edge=dashed ] [ ,name=i, edge=densely ...
2
votes
2answers
83 views

A scenario tree in latex

I know it's a bit tedious, but could someone please write me the latex code for below tree? Here's how I started \documentclass{article} \usepackage{amsmath} \usepackage{forest} \tikzset{ ...
2
votes
2answers
31 views

Family tree with two different line style using forest package

I'm trying to use forest package to draw a family tree in similar fashion like a folder. I'd like some children to be marked with dashed lines, because they are not descendents of the person, but are ...
3
votes
2answers
146 views

forest “every leaf node” and “every tree node” like syntax

I was seeing around that the forest package is better at drawing trees than tikz-qtree. I want to migrate my drawings, however, I can't find a way to easily format the tree. I see that there are ways ...
2
votes
1answer
80 views

How to compile tikz files into article?

I've been using forest to make logical proof tree. For my project I need to compile them all into a large file and add commentary which does not belong in the tree. Any advice on how to do that would ...
4
votes
2answers
72 views

Expansion in forest

I am trying to expand a macro as part of a style within a forest tree. Here's an MWE: \documentclass[tikz,border=5pt]{standalone} \usepackage{forest,ifthen} \begin{document} \bracketset{action ...
4
votes
2answers
138 views

Making forest tree with lots of text much narrower

I am having trouble getting a forest tree to fit on the page. I was wondering what techniques there are to squash the tree below so it doesn't take up so much horizontal space. Ideas I had (but have ...
0
votes
1answer
35 views

PGF Math error with blank node in forrest [duplicate]

\documentclass[12pt]{article} \usepackage{forest} \usepackage{gb4e,cgloss} \forestset{ sn edges/.style={for tree={parent anchor=south, child anchor=north,align=center,base=bottom{}}}, ...
7
votes
1answer
225 views

How to create a correctly aligned tree proof in logic with 4 branches, columns of line numbers and justifications?

I'm looking for a way to make a Logic Tree with three columns (line number, tree itself and commentary). I've tried using a tikz matrix, and it worked very well, except when I get more than two ...
6
votes
3answers
146 views

Autosegmental Representation in tikz-qtree

This is what I want to achieve and this: But all I've been able to make with tikz-qtree is the following: \documentclass[12pt,a4]{article} \usepackage[utf8]{inputenc} ...
6
votes
2answers
63 views

Changing the size of empty nodes in forest

I want to set the following picture: The following forestcode almost does it: \documentclass{article} \usepackage{forest} \begin{document} \begin{forest} for tree={fit=band,parent ...
5
votes
2answers
59 views

LaTeX Error: Missing \begin{document} with forest-GP1

I'm trying to use forest-GP1 which is a style in Zivanovic's forest-package (for phonological representation) found on github. I have added the .sty file to the same directory as the relevant .tex ...
1
vote
1answer
107 views

Upside-down trees in forest

I'm trying to typeset a tree which grows upwards using the forest package. The problem I have is that as soon as I leave the first level, branches start growing back down again. Here's the code: ...
11
votes
2answers
108 views

Two lines in a single node in Forest

I have recently switched from the tikz_qtree package to forest. Now I'm trying to change my trees to fit the forest coding. However, I can't find the way to let a single node contain two lines. I do ...
0
votes
1answer
28 views

Associating two children to one parent in Forest [duplicate]

I am trying to draw a nice multi-dominance. I find the gap between the two lines above "V" is ugly. Is there any way to move the lower end of the line in red square so that the two lines meet at one ...
7
votes
1answer
56 views

How to remove an unwanted line in forest?

\documentclass{article} \usepackage{forest} \begin{document} \begin{forest} [TP [DP] [T' [T] [VP [DP] [V', name=node [V] [DP] ] ]]] ...
4
votes
1answer
29 views

How can I set a style in `\forestset` which requires delayed calculations with the results of node walks?

What is the correct way to wrap the specification for the tree below into the my binomial style defined in \forestset and why? The following code works fine: ...
6
votes
2answers
223 views

Tikz Forest label positioning

I'm constructing a tree diagram using the forest package, and I want to label the edges. Usually, Tikz is quite good at avoiding a collision between the label and the edge, but if the branches of my ...
0
votes
1answer
42 views

forrest hierarchical diagram that will fit in landscape mode for 8.5“ by 11” document

Is there a way to use the pictured hierarchical diagram and load it into latex so that it fits into landscape on a 8.5" by 11" document that won't affect header and footer/page number? somewhat new to ...
1
vote
1answer
76 views

Is there a way to systematically ignore specific error messages?

When I compile my documents with a lot of trees, I often get the following error code: ! Dimension too large. <recently read> \pgf@xa l.1042 }} This error is due to some temporary ...
2
votes
2answers
153 views

Forest causing PdfLatex to run out of memory

I asked this question almost a year ago but did not have much luck. MikTex's PDFLaTeX has been updated since, but the error is still there: ! TeX capacity exceeded, sorry [save size=50000]. Full ...
3
votes
1answer
68 views

Arrows with texts in forest?

\documentclass{article} \usepackage[margin=.8in]{geometry} \usepackage{forest} %main + for elongation of two branches of a node \usepackage{tikz-cd} \begin{document} \begin{forest} baseline, for ...
6
votes
1answer
105 views

How can I draw -X in the forest package?

I want to draw a dead-end in forest. edge={-X} doesn't work. Example: \documentclass[a4paper]{article} \usepackage[english]{babel} \usepackage[utf8x]{inputenc} \usepackage{amsmath} ...
5
votes
1answer
135 views

setting all nodes of a tree in italics with forest

I want to define a style for setting type hierarchies with forest and the types should come out in italics. I read the manual, but ... I found some examples that use the content of a node and do ...
5
votes
1answer
104 views

Lazy Evaluation in Forest Package?

I'm using the forest package to draw logic circuits, and I'm trying to customize the style. I want the inputs to be aligned, so I write this macro: \newcommand{\inp}[1]{[#1,tier=in]} But when the ...
2
votes
1answer
36 views

Using Forest Package in Newenvironment

I'm trying to use the forest package to draw circuits, so I want to define a "circuit" environment that is a wrapper around the forest environment. But defining a newenvironment runs into problems. ...
1
vote
1answer
104 views

Draw multiple inheritance hierarchies

I have to draw multiple inheritance type hierarchies. The worst case is something like the following: I used tables and tree-dvipsto draw these figures, but I am now looking for something that is ...
3
votes
1answer
88 views

How to use bracket symbol in node name in forest?

\documentclass{article} \usepackage{forest} \begin{document} \begin{forest} [Z [$K[2]$] ] \end{forest} \end{document} How can I use brackets in a node name? Not necessarily inside math. The above ...