Debian Codegraph @

texmf-dist/tex/latex/forest/forest-lib-edges.sty

raw
1 %%
2 %% This is file `forest-lib-edges.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% forest-libs.dtx (with options: `edges')
8 %%
9 %% `forest-libs' is a collection of libraries for package `forest'.
10 %%
11 %% Copyright (c) 2012-2017 Saso Zivanovic
12 %% (Sa\v{s}o \v{Z}ivanovi\'{c})
13 %% [email protected]
14 %%
15 %% This work may be distributed and/or modified under the
16 %% conditions of the LaTeX Project Public License, either version 1.3
17 %% of this license or (at your option) any later version.
18 %% The latest version of this license is in
19 %%
20 %% http://www.latex-project.org/lppl.txt
21 %%
22 %% and version 1.3 or later is part of all distributions of LaTeX
23 %% version 2005/12/01 or later.
24 %%
25 %% This work has the LPPL maintenance status `author-maintained'.
26 %%
27 %% This file is a part of package `forest'. For the list of files
28 %% constituting the package see main source file of the package,
29 %% `forest.dtx', or the derived `forest.sty'.
30 %%
31 \RequirePackage{forest}
32 \ProvidesForestLibrary{edges}[2016/12/05 v0.1.1]
33 \forestset{
34 declare dimen={fork sep}{0.5em},
35 forked edge'/.style={
36 edge={rotate/.option=!parent.grow},
37 edge path'={(!u.parent anchor) -- ++(\forestoption{fork sep},0) |- (.child anchor)},
38 },
39 forked edge/.style={
40 on invalid={fake}{!parent.parent anchor=children},
41 child anchor=parent,
42 forked edge',
43 },
44 forked edges/.style={for nodewalk={#1}{forked edge}},
45 forked edges/.default=tree,
46 }
47 \forestset{
48 declare dimen register=folder indent,
49 folder indent=.45em,
50 folder/.style={
51 parent anchor=-children last,
52 anchor=parent first,
53 calign=child,
54 calign primary child=1,
55 for children={
56 child anchor=parent,
57 anchor=parent first,
58 edge={rotate/.option=!parent.grow},
59 edge path'/.expanded={
60 ([xshift=\forestregister{folder indent}]!u.parent anchor) |- (.child anchor)
61 },
62 },
63 after packing node={
64 if n children=0{}{
65 tempdiml=l_sep()-l("!1"),
66 tempdims={-abs(max_s("","")-min_s("",""))-s_sep()},
67 for children={
68 l+=tempdiml,
69 s+=tempdims()*(reversed()-0.5)*2,
70 },
71 },
72 },
73 }
74 }
75 \endinput
76 %%
77 %% End of file `forest-lib-edges.sty'.