-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforest-trees.tex
36 lines (35 loc) · 986 Bytes
/
forest-trees.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
% Use with package `forest`
\forestset{
nice trees/.style={
for tree={
parent anchor=south,
child anchor=north,
align=center,
base=top,
inner sep=0pt,%, s sep=12pt,
l=0ex,
before typesetting nodes={%
%based on nice empty nodes - page 52 of the manual,
%used in Jason Zentz's answer: http://tex.stackexchange.com/a/216103/
if content={}{
for parent={
for children={anchor=north},
calign=fixed edge angles,
calign angle=60,
},
shape=coordinate,
calign=fixed edge angles,
calign angle=60,
}{},
%% from http://tex.stackexchange.com/a/205311,
%% in order to reduce the width of triangles/roofs
% if n children=0{delay=with translation}{}
},
},
},
}
\newcommand\tree[2][]{\begin{forest}
nice trees,
#1% optional argument here like 'for tree={s sep=20pt}'
#2
\end{forest}}