diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/forest/forest-lib-edges.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/forest/forest-lib-edges.sty | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/forest/forest-lib-edges.sty b/Master/texmf-dist/tex/latex/forest/forest-lib-edges.sty new file mode 100644 index 00000000000..5c737aabfeb --- /dev/null +++ b/Master/texmf-dist/tex/latex/forest/forest-lib-edges.sty @@ -0,0 +1,74 @@ +%% +%% This is file `forest-lib-edges.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% forest-libs.dtx (with options: `edges') +%% +%% `forest-libs' is a collection of libraries for package `forest'. +%% +%% Copyright (c) 2015 Saso Zivanovic +%% (Sa\v{s}o \v{Z}ivanovi\'{c}) +%% saso.zivanovic@guest.arnes.si +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `author-maintained'. +%% +%% This file is a part of package `forest'. For the list of files +%% constituting the package see main source file of the package, +%% `forest.dtx', or the derived `forest.sty'. +%% +\RequirePackage{forest} +\ProvidesForestLibrary{edges}[2015/11/14 v0.1] +\forestset{ + declare dimen={fork sep}{0.5em}, + forked edge/.style={ + edge={rotate/.pgfmath=grow()}, + edge path'={(!u.parent anchor) -- ++(\forestoption{fork sep},0) |- (.child anchor)}, + }, + forked edges/.style={ + for tree={parent anchor=children}, + for descendants={child anchor=parent,forked edge} + }, +} +\forestset{ + declare dimen register=folder indent, + folder indent=.45em, + folder/.style={ + parent anchor=parent last, + anchor=parent first, + calign=child, + calign primary child=1, + for children={ + child anchor=parent, + anchor=parent first, + edge={rotate/.pgfmath=grow()}, + edge path'/.expanded={ + ([xshift=\forestregister{folder indent}]!u.parent anchor) |- (.child anchor) + }, + }, + after packing node={ + if n children=0{}{ + tempdiml=l_sep()-l("!1"), + tempdims={-abs(max_s("","")-min_s("",""))-s_sep()}, + for children={ + l+=tempdiml, + s+=tempdims()*(reversed()-0.5)*2, + }, + }, + }, + } +} +\endinput +%% +%% End of file `forest-lib-edges.sty'. |