summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/forest
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-02-20 23:39:35 +0000
committerKarl Berry <karl@freefriends.org>2016-02-20 23:39:35 +0000
commitbb8bcfa015dcd1dd689d8e37cb290245db10c3b8 (patch)
tree3635ad600a5c36f9f036d985c6ca6ec119de99e1 /Master/texmf-dist/source/latex/forest
parenteaa1f591a82e989becf47d769a8c44a6e607095b (diff)
forest (20feb16)
git-svn-id: svn://tug.org/texlive/trunk@39798 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/forest')
-rw-r--r--Master/texmf-dist/source/latex/forest/forest-libs.dtx10
-rw-r--r--Master/texmf-dist/source/latex/forest/forest.dtx55
2 files changed, 43 insertions, 22 deletions
diff --git a/Master/texmf-dist/source/latex/forest/forest-libs.dtx b/Master/texmf-dist/source/latex/forest/forest-libs.dtx
index 74803e98289..82ab81e36ed 100644
--- a/Master/texmf-dist/source/latex/forest/forest-libs.dtx
+++ b/Master/texmf-dist/source/latex/forest/forest-libs.dtx
@@ -1,4 +1,4 @@
-% \CheckSum{231}
+% \CheckSum{232}
% \iffalse meta-comment
% forest-libs.dtx
%% `forest-libs' is a collection of libraries for package `forest'.
@@ -34,7 +34,7 @@
%
% \paragraph{Disclaimer.} At least in the initial stages of a library's development, the function
% and interface of macros and keys defined in a library might change without backwards compatibility
-% support!
+% support! Though I'll try to keep this from happening \dots
%
% \begin{macrocode}
\RequirePackage{forest}
@@ -171,15 +171,15 @@
% Second, the empty nodes seem too close
% to the other (especially empty) nodes (this is a result of a small
% default |s_sep|). We could use a greater \index{s sep}, but a better solution seems
-% to be to use |calign=node_angle|. The result is shown in (\ref{ex:niceemptynodes}c).
+% to be to use |calign=fixed_angles|. The result is shown in (\ref{ex:niceemptynodes}c).
%
% However, at the transitions from empty to non-empty nodes, tree (\ref{ex:niceemptynodes}c)
% seems to zigzag (although the base points of the spine nodes
% are perfectly in line), and the edge to the empty node left to VP
% seems too long (it reaches to the level of VP's base, while we'd
% prefer it to stop at the same level as the edge to VP itself). The
-% first problem is solved by substituting |node_angle| for
-% |edge_angle|; the second one, by anchoring siblings of
+% first problem is solved by substituting |fixed_angles| for
+% |fixed_edge_angles|; the second one, by anchoring siblings of
% empty nodes at north. VoilĂ , (\ref{ex:niceemptynodes}d)!
%
% \begin{forestexample}[label=ex:niceemptynodes,layout=tree on bottom,index={fixed angles,fixed edge angles,calign,tree,delay,where option,content,for step,step>parent,step>children,option>anchor}]
diff --git a/Master/texmf-dist/source/latex/forest/forest.dtx b/Master/texmf-dist/source/latex/forest/forest.dtx
index 19aba56df68..cd0c0187080 100644
--- a/Master/texmf-dist/source/latex/forest/forest.dtx
+++ b/Master/texmf-dist/source/latex/forest/forest.dtx
@@ -1,4 +1,4 @@
-% \CheckSum{12479}
+% \CheckSum{12506}
% \iffalse meta-comment
% forest.dtx
%% `forest' is a `pgf/tikz'-based package for drawing (linguistic) trees.
@@ -68,13 +68,22 @@
% \settodayfromforestdate
%
% \maketitle
-% \tableofcontents
-% \bigskip
+%
+% This file contains the documented source of \foRest;. If you are searching for the manual, follow
+% this link to \href{http://mirrors.ctan.org/graphics/pgf/contrib/forest/forest-doc.pdf}{forest-doc.pdf}.
+%
+% The latest release of the package, including the sources, can be found on
+% \href{http://ctan.org/pkg/forest}{CTAN}. For all versions of the package, including any
+% non-yet-released work in progress, visit \href{https://github.com/sasozivanovic/forest}{\foRest;'s
+% GitHub repo}. Contributions are welcome.
+%
% A disclaimer: the code could've been much cleaner and better-documented \dots
%
-% Identification.
+% \tableofcontents
+%
+% \section{Identification}
% \begin{macrocode}
-\ProvidesPackage{forest}[2015/01/30 v2.0.0 Drawing (linguistic) trees]
+\ProvidesPackage{forest}[2016/02/20 v2.0.1 Drawing (linguistic) trees]
\RequirePackage{tikz}[2013/12/13]
\usetikzlibrary{shapes}
@@ -123,7 +132,10 @@
\foresttikzcshacktrue
\def\forest@loadlibrarieslater{}
\AtEndOfPackage{\forest@loadlibrarieslater}
-\def\useforestlibrary#1{\forcsvlist\useforestlibrary@{#1}}
+\NewDocumentCommand\useforestlibrary{s m}{%
+ \forcsvlist\useforestlibrary@{#2}%
+ \IfBooleanT{#1}{\forestapplylibrarydefaults{#2}}%
+}
\def\useforestlibrary@#1{\RequirePackage{forest-lib-#1}}
\def\forestapplylibrarydefaults#1{\forcsvlist\forestapplylibrarydefaults@{#1}}
\def\forestapplylibrarydefaults@#1{\forestset{libraries/#1/defaults/.try}}
@@ -300,16 +312,20 @@
\expandafter#1\expandafter{\number#4}{#2}{#3}}
% \end{macrocode}
%
-% A macro converting all non-letters in a string to |__|. |#1| =
-% string, |#2| = receiving macro. Used for declaring pgfmath
-% functions.
+% A macro converting all non-alphanumerics (and an initial number) in a string to |__|. |#1| =
+% string, |#2| = receiving macro. Used for declaring pgfmath functions.
% \begin{macrocode}
\def\forest@convert@others@to@underscores#1#2{%
\def\forest@cotu@result{}%
- \forest@cotu#1\forest@end
+ \forest@cotu@first#1\forest@end
\let#2\forest@cotu@result
}
\def\forest@cotu{%
+ \let\forest@cotu@have@num\forest@cotu@have@alpha
+ \futurelet\forest@cotu@nextchar\forest@cotu@checkforspace
+}
+\def\forest@cotu@first{%
+ \let\forest@cotu@have@num\forest@cotu@haveother
\futurelet\forest@cotu@nextchar\forest@cotu@checkforspace
}
\def\forest@cotu@checkforspace{%
@@ -331,19 +347,19 @@
\@escapeif\forest@cotu@nospaceB
\fi
}
-\def\forest@cotu@nospaceB{%
- \ifcat\forest@cotu@nextchar a%
- \let\forest@cotu@next\forest@cotu@have@alphanum
+\def\forest@cotu@nospaceB#1{%
+ \ifcat#1a%
+ \let\forest@cotu@next\forest@cotu@have@alpha
\else
- \ifcat\forest@cotu@nextchar 0%
- \let\forest@cotu@next\forest@cotu@have@alphanum
+ \if!\ifnum9<1#1!\fi
+ \let\forest@cotu@next\forest@cotu@have@num
\else
\let\forest@cotu@next\forest@cotu@haveother
\fi
\fi
- \forest@cotu@next
+ \forest@cotu@next#1%
}
-\def\forest@cotu@have@alphanum#1{%
+\def\forest@cotu@have@alpha#1{%
\appto\forest@cotu@result{#1}%
\forest@cotu
}
@@ -3846,6 +3862,7 @@
every@step/shared/.code={},
every step/.store in=\forest@nodewalk@config@everystep@method,
every step/.prefix style={every@step=#1},
+ @history/.is choice,
@history/independent/.code={},
@history/inherited/.code={},
@history/shared/.code={},
@@ -4587,6 +4604,8 @@
define long step={preceding siblings reversed}{style}{fake=previous,current and preceding siblings reversed},
define long step={siblings}{style}{for nodewalk'={preceding siblings},following siblings},
define long step={siblings reversed}{style}{for nodewalk'={following siblings reversed},preceding siblings reversed},
+ define long step={current and siblings}{style}{for nodewalk'={preceding siblings},current and following siblings},
+ define long step={current and siblings reversed}{style}{for nodewalk'={current and following siblings reversed},preceding siblings reversed},
define long step={ancestors}{style}{while={}{parent},last valid},
define long step={current and ancestors}{style}{current,ancestors},
define long step={following nodes}{style}{while={}{next node},last valid},
@@ -5526,6 +5545,8 @@
\forest@Pointanchor{\forest@temp@secondchild}{child anchor}%
\advance\pgf@xa\pgf@x\relax\advance\pgf@ya\pgf@y\relax
\divide\pgf@xa2 \divide\pgf@ya2
+ \forest@pointanchor{parent anchor}%
+ \advance\pgf@xa-\pgf@x\relax\advance\pgf@ya-\pgf@y\relax
\edef\forest@marshal{%
\noexpand\pgftransformreset
\noexpand\pgftransformrotate{-\forestove{grow}}%