Package Information
- Last Updated
- Categories
- componentsvisualizationintegration
- Disciplines
- linguistics
1. Get the package
Download the package using the TPIX CLI:
tpix get @preview/syntree:0.3.12. Import in your Typst file
Add this to your .typ file:
#import "@preview/syntree:0.3.1": *Version History
typst-syntree
syntree is a Typst package for rendering syntax trees / parse trees (the kind linguists use).
Installation
Add #import "@preview/syntree:0.3.1: * somewhere in the preamble. This will add both the latest version of the package, and import the tree, syntree, and listtree functions from the library.
Usage
The name and default syntax are inspired by Miles Shang's syntree. Here's an example to get started:
|
|
There's full support for formulas inside nodes; for example, #syntree[[DP$zws_i$ this]] or #syntree[[C $diameter$]]. For more flexible tree-drawing, tree can be used directly:
|
|
In addition to standard syntree bracket syntax, a list-based syntax is also provided:
|
|
And tree, syntree, and listtree all can compose with each other.
|
|
syntree aims to be a relatively minimal package and so does not provide any utilities for displaying movement or dependency relationships. However, syntree composes freely with external packages such as larrow:
|
|