Skip to content

Instantly share code, notes, and snippets.

@patrl
Last active April 28, 2025 12:19
Show Gist options
  • Select an option

  • Save patrl/a9f7bce39dd80e58696a67db5d7eb230 to your computer and use it in GitHub Desktop.

Select an option

Save patrl/a9f7bce39dd80e58696a67db5d7eb230 to your computer and use it in GitHub Desktop.
Syntactic trees within denotation brackets in LaTeX (mwe)
\documentclass{article}
% this is necessary for the denotation brackets [[.]]
\usepackage{stmaryrd}
% this is necessary for syntactic trees. There are other packages too,
% this is just the one I prefer.
\usepackage[linguistics]{forest}
\begin{document}
% enclosing the forest environment within an `array' environment seems
% ensures that the alignment is as desired.
\[
\left\llbracket\begin{array}{c}
\begin{forest}
[{XP}
[{X}]
[{Y}]
]
\end{forest}
\end{array}\right\rrbracket^{w} = \ldots
\]
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment