Debian Codegraph @

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

raw
1 %%
2 %% This is file `forest-lib-linguistics.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% forest-libs.dtx (with options: `linguistics')
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{linguistics}[2017/07/14 v0.1.2]
33 \forestset{
34 linguistics@set@baseline/.style={
35 if phantom={for next node=linguistics@set@baseline}{baseline}
36 },
37 libraries/linguistics/defaults/.style={
38 default preamble={
39 sn edges,
40 before drawing tree={
41 if nodewalk valid={name=forest@baseline@node}{}{linguistics@set@baseline},
42 },
43 for tree={align=center},
44 },
45 },
46 }
47 \forestset{
48 define long step={c-commanded}{style}{branch'={siblings,descendants}},
49 define long step={c-commanders}{style}{while nodewalk valid={parent}{siblings,fake=parent}},
50 }
51 \forestset{
52 sn edges/.style={
53 for tree={
54 parent anchor=children, child anchor=parent
55 }
56 },
57 }
58 \forestset{
59 roof/.style={edge path'={%
60 (.parent first)--(!u.children)--(.parent last)--cycle
61 }
62 },
63 }
64 \forestset{
65 nice empty nodes/.style={
66 for tree={calign=fixed edge angles},
67 delay={where content={}{shape=coordinate,
68 for current and siblings={anchor=north}}{}}
69 },
70 }
71 \providecommand\text[1]{\mbox{\scriptsize#1}}
72 \forestset{
73 draw brackets compact/.code={\let\drawbracketsspace\relax},
74 draw brackets wide/.code={\let\drawbracketsspace\space},
75 draw brackets/.style={
76 for tree'={
77 TeX={[%
78 \edef\forestdrawbracketscontentformat{\foresteoption{content format}}%
79 },
80 if n children=0{
81 TeX={\drawbracketsspace\forestdrawbracketscontentformat\drawbracketsspace}
82 }{
83 TeX={\textsubscript{\text{\forestdrawbracketscontentformat}}\drawbracketsspace}
84 },
85 }{
86 TeX={]\drawbracketsspace},
87 }
88 },
89 draw brackets wide
90 }
91 \newbox\standardnodestrutbox
92 \setbox\standardnodestrutbox=\hbox to 0pt{\phantom{\forestOve{standard node}{content}}}
93 \def\standardnodestrut{\copy\standardnodestrutbox}
94 \forestset{
95 GP1/.style 2 args={
96 for n={1}{baseline},
97 s sep=0pt, l sep=0pt,
98 for descendants={
99 l sep=0pt, l={#1},
100 anchor=base,calign=first,child anchor=north,
101 inner xsep=1pt,inner ysep=2pt,outer sep=0pt,s sep=0pt,
102 },
103 delay={
104 if content={}{phantom}{for children={no edge}},
105 for tree={
106 if content={O}{tier=OR}{},
107 if content={R}{tier=OR}{},
108 if content={N}{tier=N}{},
109 if content={x}{
110 tier=x,content={$\times$},outer xsep={#2},
111 for tree={calign=center},
112 for descendants={content format={\noexpand\standardnodestrut\forestoption{content}}},
113 before drawing tree={outer xsep=0pt,delay={typeset node}},
114 s sep=4pt
115 }{},
116 },
117 },
118 before drawing tree={where content={}{parent anchor=center,child anchor=center}{}},
119 },
120 GP1/.default={5ex}{8.0pt},
121 associate/.style={%
122 tikz+={\draw[densely dotted](!)--(!#1);}},
123 spread/.style={
124 before drawing tree={tikz+={\draw[dotted](!)--(!#1);}}},
125 govern/.style={
126 before drawing tree={tikz+={\draw[->](!)--(!#1);}}},
127 p-govern/.style={
128 before drawing tree={tikz+={\draw[->](.north) to[out=150,in=30] (!#1.north);}}},
129 no p-govern/.style={
130 before drawing tree={tikz+={\draw[->,loosely dashed](.north) to[out=150,in=30] (!#1.north);}}},
131 encircle/.style={before drawing tree={circle,draw,inner sep=0pt}},
132 fen/.style={pin={[font=\footnotesize,inner sep=1pt,pin edge=<-]10:\textsc{Fen}}},
133 el/.style={content=\textsc{\textbf{##1}}},
134 head/.style={content=\textsc{\textbf{\underline{##1}}}}
135 }
136 \endinput
137 %%
138 %% End of file `forest-lib-linguistics.sty'.