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-lib-linguistics.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-lib-linguistics.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/forest/forest-lib-linguistics.sty | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/forest/forest-lib-linguistics.sty b/Master/texmf-dist/tex/latex/forest/forest-lib-linguistics.sty new file mode 100644 index 00000000000..9632361e964 --- /dev/null +++ b/Master/texmf-dist/tex/latex/forest/forest-lib-linguistics.sty @@ -0,0 +1,133 @@ +%% +%% This is file `forest-lib-linguistics.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% forest-libs.dtx (with options: `linguistics') +%% +%% `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{linguistics}[2015/11/14 v0.1] +\forestset{ + libraries/linguistics/defaults/.style={ + default preamble={ + sn edges, + baseline, + for tree={align=center}, + }, + }, +} +\forestset{ + define long step={c-commanded}{style}{branch'={siblings,descendants}}, + define long step={c-commanders}{style}{while nodewalk valid={parent}{siblings,fake=parent}}, +} +\forestset{ + sn edges/.style={ + for tree={ + parent anchor=children, child anchor=parent + } + }, +} +\forestset{ + roof/.style={edge path'={% + (.parent first)--(!u.children)--(.parent last)--cycle + } + }, +} +\forestset{ + nice empty nodes/.style={ + for tree={calign=fixed edge angles}, + delay={where content={}{shape=coordinate,for parent={ + for children={anchor=north}}}{}} + }, +} +\providecommand\text[1]{\mbox{\scriptsize#1}} +\forestset{ + draw brackets compact/.code={\let\drawbracketsspace\relax}, + draw brackets wide/.code={\let\drawbracketsspace\space}, + draw brackets/.style={ + for tree'={ + TeX={[% + \edef\forestdrawbracketscontentformat{\foresteoption{content format}}% + }, + if n children=0{ + TeX={\drawbracketsspace\forestdrawbracketscontentformat\drawbracketsspace} + }{ + TeX={\textsubscript{\text{\forestdrawbracketscontentformat}}\drawbracketsspace} + }, + }{ + TeX={]\drawbracketsspace}, + } + }, + draw brackets wide +} +\newbox\standardnodestrutbox +\setbox\standardnodestrutbox=\hbox to 0pt{\phantom{\forestOve{standard node}{content}}} +\def\standardnodestrut{\copy\standardnodestrutbox} +\forestset{ + GP1/.style 2 args={ + for n={1}{baseline}, + s sep=0pt, l sep=0pt, + for descendants={ + l sep=0pt, l={#1}, + anchor=base,calign=first,child anchor=north, + inner xsep=1pt,inner ysep=2pt,outer sep=0pt,s sep=0pt, + }, + delay={ + if content={}{phantom}{for children={no edge}}, + for tree={ + if content={O}{tier=OR}{}, + if content={R}{tier=OR}{}, + if content={N}{tier=N}{}, + if content={x}{ + tier=x,content={$\times$},outer xsep={#2}, + for tree={calign=center}, + for descendants={content format={\noexpand\standardnodestrut\forestoption{content}}}, + before drawing tree={outer xsep=0pt,delay={typeset node}}, + s sep=4pt + }{}, + }, + }, + before drawing tree={where content={}{parent anchor=center,child anchor=center}{}}, + }, + GP1/.default={5ex}{8.0pt}, + associate/.style={% + tikz+={\draw[densely dotted](!)--(!#1);}}, + spread/.style={ + before drawing tree={tikz+={\draw[dotted](!)--(!#1);}}}, + govern/.style={ + before drawing tree={tikz+={\draw[->](!)--(!#1);}}}, + p-govern/.style={ + before drawing tree={tikz+={\draw[->](.north) to[out=150,in=30] (!#1.north);}}}, + no p-govern/.style={ + before drawing tree={tikz+={\draw[->,loosely dashed](.north) to[out=150,in=30] (!#1.north);}}}, + encircle/.style={before drawing tree={circle,draw,inner sep=0pt}}, + fen/.style={pin={[font=\footnotesize,inner sep=1pt,pin edge=<-]10:\textsc{Fen}}}, + el/.style={content=\textsc{\textbf{##1}}}, + head/.style={content=\textsc{\textbf{\underline{##1}}}} +} +\endinput +%% +%% End of file `forest-lib-linguistics.sty'. |