diff options
author | Karl Berry <karl@freefriends.org> | 2016-01-30 23:00:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-01-30 23:00:43 +0000 |
commit | 7f11d08fd1940cb3e9b90139b6321e1fcaf38f9c (patch) | |
tree | b154c54263ec9eb452103307cbad705ae9e01ec0 /Master/texmf-dist/tex/latex/forest/forest-compat.sty | |
parent | 0911ade404142a305ac949e3c53934a536168c3b (diff) |
forest (30jan16)
git-svn-id: svn://tug.org/texlive/trunk@39513 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/forest/forest-compat.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/forest/forest-compat.sty | 170 |
1 files changed, 170 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/forest/forest-compat.sty b/Master/texmf-dist/tex/latex/forest/forest-compat.sty new file mode 100644 index 00000000000..8921cf5405a --- /dev/null +++ b/Master/texmf-dist/tex/latex/forest/forest-compat.sty @@ -0,0 +1,170 @@ +% \CheckSum{12884} +% \iffalse meta-comment +% forest-index.dtx +%% `forest-compat' defines a compatibility layer of 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'. + +\ProvidesPackage{forest-compat} + +\def\forest@deprecated#1{% + \PackageWarning{forest}{Compatibility mode for #1}% +} +\forestset{@@deprecated/.code={\forest@deprecated{#1}}} +\def\forestcompat#1{\pgfqkeys{/forest/@compat}{#1}} +\forestcompat{ + most/.style={1.0-most}, + all/.style={1.0-all}, + none/.style={}, + silent/.style={\def\forest@deprecated##1{}}, + %%% begin listing region: compat_1.0 + 1.0-most/.style={ + 1.0-triangle,1.0-linear,1.0-nodewalk,1.0-ancestors, + 1.0-fittotree,1.0-for,1.0-forall + }, + 1.0-all/.style={ + 1.0-most, + 1.0-ignoreinvalidsteps,1.0-rotate,1.0-stages,1.0-name + }, + %%% end listing region: compat_1.0 + 1.0-triangle/.style={ + /forest/triangle/.style={ + @@deprecated={key "triangle" from v1.0.x. Use key "roof" from library "linguistics" instead}, + edge path'={% + (.north west)--(!u.south)--(.north east)--cycle + } + } + }, + 1.0-linear/.style={ + /forest/define long step={linear next}{autostep}{% + \forest@deprecated{nodewalk step "linear next" from v1.0. Use key "next node" instead.}% + \edef\forest@cn{\forest@node@linearnextid}}, + /forest/define long step={linear previous}{autostep}{% + \forest@deprecated{nodewalk step "linear previous" from v1.0. Use key "previous node" instead.}% + \edef\forest@cn{\forest@node@linearpreviousid}}, + }, + 1.0-nodewalk/.style={ + /forest/node walk/before walk/.style={}, + /forest/node walk/every step/.style={}, + /forest/node walk/after walk/.style={}, + /forest/node walk/.style={ + @@deprecated={key "node walk" from v1.0. Use key "nodewalk" instead.}, + /forest/node walk/before walk, + /forest/nodewalk/before walk/.style={/forest/node walk/before walk}, + /forest/nodewalk/every step/.style={/forest/node walk/every step}, + /forest/nodewalk/after walk/.style={/forest/node walk/after walk}, + /forest/nodewalk/node walk/.style={before walk,for nodewalk={####1,options={/forest/nodewalk/after walk}}{/forest/nodewalk/every step}}, + for nodewalk={##1,options={/forest/nodewalk/after walk}}{/forest/nodewalk/every step}, + }, + }, + 1.0-ancestors/.style={ + /forest/for ancestors'/.style={ + @@deprecated={key "for ancestors'" from v1.0.x. Use key "for current and ancestors" instead.}, + for current and ancestors={##1}}, + }, + 1.0-fittotree/.style={% + /tikz/fit to tree/.style={ + /forest/@@deprecated={key "/tikz/fit to tree" from v1.0.x. Use "/tikz/fit to=tree" instead.}, + inner sep=0pt,fit to=tree + } + }, + 1.0-for/.style={ + /forest/for/.code 2 args={% #1 = nodewalk, #2 = after walk keylist + \forest@deprecated{Key "for" from v1.0.x. Use key "for group" instead.}% + \forest@forthis{\forest@nodewalk{##1,options={##2}}{}}% + } + }, + 1.0-forall/.style={ + /forest/for all next/.style={ + @@deprecated={Key "for all next" from v1.0.x. Use key "for following siblings" instead.}, + for following siblings={##1}}, + /forest/for all previous/.style={ + @@deprecated={Key "for all previous" from v1.0.x. Use key "for preceding siblings" instead.}, + for preceding siblings={##1}}, + }, + 1.0-ignoreinvalidsteps/.code={% + \def\forest@forstepwrapper##1##2{% + \def\forest@nodewalk@config@everystep@method{independent}% + \def\forest@nodewalk@config@history@method{independent}% + \edef\forest@marshal{% + \def\noexpand\forest@nodewalk@config@oninvalid{compatfake}% + \unexpanded{\forest@Nodewalk{##1}{##2}}% + \def\noexpand\forest@cn{\forest@cn}% + \def\noexpand\forest@nodewalk@config@oninvalid{\forest@nodewalk@config@oninvalid}% + }\forest@marshal + }% + \def\forest@relatednode@option@compat@ignoreinvalidsteps##1{% + \forest@saveandrestoremacro\forest@nodewalk@oninvalid{% + \def\forest@nodewalk@oninvalid{compatfake}% + ##1% + }% + }% + }, + 1.0-rotate/.style={ + /forest/undef option=rotate, + rotate/.style={ + @@deprecate={Using non-autoforwarded key "rotate". Some keys, like "forked edges" and "folder", might produce a wrong result.}, + node options={rotate={##1}}, + }, + }, + 1.0-stages/.style={ + /forest/@@deprecated={Using v1.0.x "stages" style}, + /forest/stages/.style={ + process keylist=before typesetting nodes, + typeset nodes stage, + process keylist=before packing, + pack stage, + process keylist=before computing xy, + compute xy stage, + process keylist=before drawing tree, + draw tree stage, + }, + /forest/TeX={% + \def\forest@defstages##1{% + \def\forest@stages{% + begin forest, + for root'={ + process keylist register=default preamble, + process keylist register=preamble + }, + process keylist=given options, + ##1, + end forest + }% + }% + }, + }, + 1.0-name/.code={% + \forest@deprecated{key "name": using key "name" from v1.0.x, which does not enforce uniqueness. If you really need this, you're doing something wrong.}% + \def\forest@node@setname##1{% + \ifstrempty{##1}{}{% + \forestoeset{name}{##1}% + \csedef{forest@id@of@##1}{\forest@cn}% + }% + }% + \def\forest@node@setalias##1{% + \ifstrempty{##1}{}{% + \csedef{forest@id@of@##1}{\forest@cn}% + }% + }% + }, +} +\expandafter\forestcompat\expandafter{\forest@compat} |