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

learn more… | top users | synonyms

4
votes
1answer
38 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
161 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
35 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
152 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
46 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
176 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
28 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
69 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
27 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
120 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
78 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
69 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
126 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
30 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{}}}, ...
6
votes
1answer
215 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
141 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
56 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
54 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
105 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: ...
10
votes
2answers
101 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
26 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
55 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
28 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
189 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
37 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
75 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
142 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
64 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
104 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} ...
4
votes
1answer
122 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
103 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
33 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
97 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
80 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 ...
5
votes
2answers
228 views

CV skeleton with forest package

\documentclass{article} \usepackage[margin=.8in]{geometry} \usepackage{forest} \usepackage{tikz} \begin{document} \begin{forest} baseline, for tree={anchor=center, align=center, l sep+=0em, s ...
4
votes
2answers
106 views

How to add a numbered label to syntax tree?

\documentclass{article} \usepackage{forest} \begin{document} \begin{forest} baseline, for tree={parent anchor=south, child anchor=north, align=center, l sep+=0em, s sep+=4em} [T$'$ ...
2
votes
1answer
98 views

How to draw hierarchical graph like this one?

I want to draw the graph like this . However, I only came this one, it seems so ugly. I am frustrated, can anyone help me to get what I wanted? My code is given as follows ...
2
votes
1answer
136 views

Reducing forest tree width without squashing

Apologies if this is a silly question - my first on stackexchange. I have built the tree below using the forest package. Unfortunately, the tree has got too "wide" for the page. Is there a way to ask ...
8
votes
3answers
222 views

How to move tree leaf nodes horizontally after automatic positioning?

I'd like to draw trees like the following: That is, I have edges which are crossing. The tree should be drawn like a regular tree (without crossings) except at the last level where the leaves can ...
3
votes
2answers
108 views

How to format a language tree?

I would like to format the a language tree with XeLaTeX. The question is how to balance it so that it fits within the page width. Monospaced font In a mono-spaced font it looks like indicated ...
2
votes
2answers
67 views

How can I put something under something in a Tree?

\documentclass{article} \usepackage{tikz} \usepackage{tikz-qtree} \begin{document} \begin{tikzpicture} \tikzset{grow'=right,level distance=32pt} \tikzset{execute at begin node=\strut} ...
3
votes
1answer
62 views

Declaring a node to be a phantom node breaks connections between sisters in forest

I wrote a style for forest that can be used to connect a tree node with its sibling to the left and to the right. This works very nice for cases like the one below. Now I want to connect two nodes ...
2
votes
1answer
89 views

How to lengthen edge in forest to be the length of the edge label?

How can I increase the length of the edges in a forest tree so that they are (at least) the length of the edge label that I wish to give them. For example, this code: \documentclass{article} ...
2
votes
1answer
128 views

Adding a specification concerning two daughters, one with special status, in forest

I want to produce the following figure with forest: So what I am looking for is a style specification that says that daughter 1 (frapp) and daughter 2 (ant) together relate to A. Daughter 2 (ant) ...
5
votes
1answer
80 views

How can I label forest nodes automatically, adding labels as prefixes to nodes' content exactly once?

I was trying to figure out how you might get forest to label the nodes in a diagram such as the one featured in this question automatically. So, the idea is that: level 0: content of node should be ...
9
votes
2answers
129 views

Maps between rooted trees using forest (and TiKz)

I had to draw rooted (upward oriented) trees (with leaves). I found the package forest useful, although most likely the work-arounds I employed are not really optimal in any proper sense. An example ...
4
votes
1answer
222 views

Having two forest figures and using tikzmark

I have two forest figures in the same figure environment and I want to use tikzmark in both of them. The outcome is supposed to look like this: My current code is this: \documentclass{article} ...
1
vote
0answers
26 views

How to create a horizontal tree using braces [duplicate]

I want to create a horizontal tree-like structure using braces, as in: Please forgive my lack of creativity. I tried using an equation, for example \begin{equation*} \text{Animals} \left\{ ...
5
votes
2answers
508 views

How can I draw a circle around an entire tree in forest?

For some reason that I cannot discern, using tikz={\node [draw,circle,fit to tree]{};} to draw a circle around nodes in a tree works as expected if the nodes are embedded in a larger tree. However, ...
0
votes
1answer
37 views

Listing or stacking nodes on top of each other in forest

I'm wanting to make a logic tree using forest that looks something like the picture below: I'm struggling to list the premises of the argument at the first node of the tree in the way that is done ...