{trees} is for questions about drawing or constructing tree {diagrams} (for example, family trees).

learn more… | top users | synonyms

3
votes
2answers
1k views

tikz tree fork down edge labels

\documentclass{article} \usepackage{tikz} \usetikzlibrary{trees} \begin{document} \begin{tikzpicture}[level distance=1.5cm, level 1/.style={sibling distance=3.5cm}, level 2/.style={sibling ...
2
votes
0answers
56 views

Drawing parse trees [duplicate]

I'm trying to draw parse trees for mathematical expressions such as (x + (y - z)). When I google for parse trees in LaTeX, all I get are packages that produce an output similar to the style of this ...
4
votes
1answer
165 views

pgf/tikz line to triangle

I'm trying to draw a simple tree. Here's the latex code: \begin{tikzpicture} \node at (2,-2) [circle,draw,minimum size=8mm] (A) {$\alpha$}; \node at (0,-4) [circle,draw,minimum size=8mm] (B) ...
0
votes
2answers
198 views

Drawing a graphic image with LaTeX for an e-book using Markdown

How can I draw the picture below with LaTeX? I will be using it in an e-book using Markdown. Thanks.
4
votes
1answer
153 views

Drawing tree in text (like inline math)

Is there a way to draw (with tikz/tikz-qtree) a tree directly in the text, like the inline math command? For a small tree with 2 or 3 nodes? Thanks!
3
votes
1answer
344 views

Creating Tic-Tac-Toe boards with LaTeX/TikZ

I am trying to create a diagram of tic-tac-toe boards similar to the one attached below. I cannot seem to find any documentation or examples on how to create these boards in LaTeX or TikZ. Does ...
1
vote
1answer
311 views

Depth-first traversal of a binary tree

How can I achieve the drawing of a depth-first traversal of a binary tree like in this picture ?
20
votes
1answer
510 views

Drawing Bruhat--Tits trees with TikZ

I am not a regular user of TikZ, and I was wondering if there was a quick way of drawing trees that look like ? (the picture seems to have been taken from page 71 of J. P. Serre's book on trees). ...
7
votes
1answer
226 views

Creating radial trees in TikZ

I am fairly new TikZ user and I am looking for a way to generate a radial tree similar this: or this: So far, I have two methods of doing this: 1) Program it manually - This involves quite a ...
1
vote
1answer
141 views

How to write a tree with no (visible) root with TikZ?

I’m trying to write a tree structure in TikZ. The trees in question are labelled on the leaf only; there is no label on inner nodes. Because I don’t use node on inner nodes, the tree structure joins. ...
2
votes
1answer
422 views

Creating appealing directory trees - alternative to dirtree

I already found a similar question and thus know about the dirtree package. However, the result does not really look nice. Also I'd like to put the tree in a figure environment and get it centered. ...
3
votes
1answer
95 views

tikz draw tree with extra column

01, 001 and 0001 are not actually "childs". How do I add K=1,2,3 and K=4 to the left hand column? And I tried really hard to adjust the distance. But this is the best I can do. Thanks. ...
7
votes
1answer
312 views

Draw randomized tree in TikZ

I am trying to draw a randomized tree using TikZ, that is, I'm looking for a macro \randtree{NN}{x} that attaches a randomized tree of maximum depth x to a node named NN. The nodes need not be visible ...
5
votes
2answers
242 views

How to make TikZ draw right child before left

I'm trying to make a tree with two different colors of edges, black and gray. This is my code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,automata} ...
10
votes
1answer
362 views

Drawing PQ-trees

I need to draw PQ-trees in LaTeX which look like these: I tried trees in tikz but I had two problems: partially shade rectangles use vertical pointers from children to the parent, if the parent ...
6
votes
1answer
274 views

beamer and forest

I am preparing beamer presentation and flow chart using forest. For some reason, it is suggesting extra } or problem with \end{frame}. Here is the code: \documentclass[12pt,a4paper]{beamer} ...
7
votes
1answer
324 views

Trees in latex : Depth of 4 nodes

I am following the current tutorial (MWE) : link However, I am facing difficulties to perform a tree of 4 nodes. Items are superposed, and even if I add a child [missing] {} it doesn't solve the ...
8
votes
2answers
473 views

how to draw a diagram that forks out, then joins in the middle then forks out again?

Update: ref comments: I've slightly corrected the terminology and the title. I am using the term diagram now, instead of tree, and I am just asking on how to draw this diagram in Tikz. Any tool or ...
6
votes
1answer
324 views

Customized edge in forest tree

Following the examples in the documentation, it is not too difficult to customize the edge of trees using the tikz-qtree package. The following code illustrates it: \documentclass{standalone} ...
2
votes
1answer
192 views

How can I use fork style edges with explicitely positioned TikZ tree nodes?

As part of a graphical export facility, I try to render a tree in TikZ were all the node positions are exactly given and were the edges are fork-style. Doing that without the trees package demands ...
2
votes
1answer
570 views

How to make Directory List in LaTeX?

I am writing an article using LaTeX. It is a research report about developing mathematics ebook using LaTeX. It contains directory list consists of folders and files, like this: - ...
1
vote
0answers
125 views

How to surround portions of a tree with boxes [closed]

I need to group portions of a tree with boxes, and additionally label them, e.g. put "W1" on the side of the box, or in the top right corner of the box. The result I want to achieve is somewhat ...
3
votes
1answer
360 views

Vertical path to node in TikZ trees

How can I set the path between two specific nodes to "vertical" rather than "direct"? Currently my tree looks like this: \begin{tikzpicture}[level distance=1.5cm, every ...
6
votes
1answer
419 views

How to create syntactic trees and align them in LaTeX?

I want to create syntactic trees and align them in LaTeX as in the picture below. Can you help me?
11
votes
1answer
575 views

Using beamer overlays with forest generated trees

I am using the forest package from Sašo Živanović in order to create a wide tree on a beamer slide. Previously, I was using qtree. But due to the easier way of arranging nodes automatically with ...
2
votes
2answers
350 views

Drawing tree like structure

I have to draw the following figure. What I have now is uggly. Somehow the structure should be more balanced. Is there a way to do this with tikz-qtree? The point is that it is multiple dominance and ...
5
votes
1answer
564 views

Square edges in forest package

I can easily do trees with horizontal (square) edges in tikz-qtree (see MWE). The forest package is however a far superior alternative for my purposes. However, every attempt to do either horizontal ...
2
votes
2answers
820 views

[Tikz-]Qtree: force direction of single child to left or right?

I'm trying to draw a tree that has internal nodes with only one child, but which must be oriented. / \ /\ \ /\ Instead of the typical qtree where said children just "hang": ...
2
votes
0answers
363 views

Simple dendrogram [closed]

I am just trying to create a simple dendrogram in beamer to develop an intuition for heirarchical clustering and I have tried several sites and several tree diagrams but cannot get anything to do what ...
4
votes
1answer
328 views

Nodes within leaf text in tikz-qtree?

I'm trying to draw a box around only part of the text in a tikz-qtree tree, but the closest I can do is this: \documentclass{article} \usepackage{tikz} \usepackage{tikz-qtree} \begin{document} ...
4
votes
2answers
475 views

Restoring qtree spacing in tikz-qtree

Is it somehow possible to achieve the same node spacing in tikz-qtree as in the original qtree package? Compare the two: qtree: tikz-qtree: The spacing between nodes in one level should be the ...
14
votes
1answer
420 views

Is it possible to emulate qtree with forest?

This question was actually asked by Alan Munn in a comment to How do I create a LCM tree diagram?. I repeat (and self-answer) it here because the answer is too long to fit the margin :-) qtree is a ...
12
votes
1answer
444 views

draw a many edge from a node- Tree - tikz

i want to draw the tree in the following picture : i have write : \documentclass{article} \usepackage{tikz} \usepackage{color} \definecolor{red}{rgb}{1,0,0} \begin{document} ...
7
votes
2answers
178 views

Seeking improvement on a poor solution---for descendant charts

I've a solution to a problem that screams out for improvement. I'm working on a second edition of a family history (mine) that has a great number of descendant charts. I've cobbled together a way of ...
5
votes
1answer
449 views

How to fix the overlapped nodes with long text, in TikZ. Concept maps

I'd like to get helping from you. I want to have paragraphs in the nodes of the concept map with Tikz, I mean, texts with multiple lines. I have a problem with texts, the nodes are overlapped. Here's ...
0
votes
0answers
242 views

Example template for a hierarchy diagram [duplicate]

I wanted to draw a tree diagram so that i can put citations beside the node texts. Is there an example in code?
6
votes
3answers
1k views

drawing a syntax tree in tikz

I would like to draw a syntax tree, which resembles the below syntax tree. I know that I can use tikz to draw syntax trees, but I can't seem to figure out how to draw a straight line down to a node, ...
2
votes
0answers
251 views

How to convert Newick tree format to TikZ? [closed]

I need to draw a number of large phylogenetic tree diagrams in a document and it appears that tikz-qtree may be the best package for this task. A manual approach does not seem the best solution to ...
10
votes
1answer
859 views

Tikz tree and position of single leaf in binary tree

I am constructing a binary tree which looks as follows: \begin{tikzpicture} \node {root} child { node {left} } child { node {right} child { node {rightmost} } ...
10
votes
1answer
160 views

Indefinite Subtrees

While doing tree proofs, sometimes we need to consider a root with some subtrees, but we don't know the exact properties of the subtrees, so we just represent them using triangles. Is it possible to ...
1
vote
0answers
157 views

Using tree-dvips with pdflatex? [closed]

It seems like using tree-dvips with pdflatex is not very easy. It has been documented in various places in the web. I wouldn't mind using latex and then convert to PDF, but I am actually interested ...
0
votes
0answers
64 views

Strange line width problem with tikz-qtree [duplicate]

Possible Duplicate: TikZ borders showing through when they shouldn’t (overlapping circles) I have a strange problem with using tikz-qtree where the thickness of the lines are a bit odd. ...
4
votes
2answers
760 views

complex nodes with tikz-qtree

I am trying to convert my tree-dvips trees into something that is compatible with xelatex. I had a look at the tikz-qtree package, but it seems to be impossible to set complex nodes. In the old qtree ...
3
votes
2answers
412 views

Using tree-dvips with XeLaTeX

I try to switch to XeLaTeX, but the package tree-dvips causes problems. It seems to require PostScript and pdftricks which causes a lot of other problems (puts a \begin{center} environment around ...
3
votes
1answer
493 views

A simple tree for a website structure?

I would create a simple picture of a small websitestructure and i found these nice example http://www.texample.net/tikz/examples/family-tree/. But I would change some things and I don't know if it is ...
6
votes
1answer
2k views

I'm getting the error: ! Paragraph ended before \@@label was complete

I've scoured this forum and it looks to me like I'm setting up the tree correctly, but I'm still getting this error, I have \usepackage{tikz} \usepackage{tikz-qtree} in the header. Here is the ...
3
votes
2answers
872 views

place several figure into one -tikz

I draw several trees and now I want to place them in a figure ( side by side or one below the other ) \documentclass{report} \usepackage{tikz} \usetikzlibrary{fit,shapes} \begin{document} ...
5
votes
1answer
645 views

Incomplete arrows and missing arrow heads in TikZ

I have the following plot which looks good, but there are two issues: Not all arrows have arrow-heads. I have no idea why this is. Some edges are not long enough. For example, the left edge of the ...
6
votes
1answer
434 views

How do I draw curve crossing one edge of a tree (using tikz-qtree)?

I am using tikz-qtree, and I'd like to draw a curve separating a set of nodes from the rest of the tree. For example, \documentclass{article} \usepackage{tikz} \usepackage{tikz-qtree} ...
1
vote
1answer
424 views

Draw a tree with variable node number

I would like to draw a tree in tex that is more like a sketch of a tree: It should contain variable node numbers. Important is, that the dots are contained in the tree drawn. Is that possible with ...