I need to make several syntax trees using forest, and there are some structures that show up over and over again in multiple trees. How can I achieve this? So far attempts I've made with \newcommand haven't worked. As a basic example, I'd expect to be able to enter something like this:
\newcommand{\asdf}[1]{a [#1] [c]}
...
\begin{forest}
[x
[y]
[\asdf{b}]
]
\end{forest}
and produce this tree:
What am I doing wrong?
Edit: here's a more complete example of what I'm trying to do:
\documentclass{article}
\usepackage{forest}
\usepackage{ulem}
\usepackage{textcomp}
\renewcommand{\ln}{\textit{n}}
\newcommand{\uX}[1]{\sout{u#1}}
\newcommand{\mvmt}[1]{\textlangle#1\textrangle}
\newcommand{\basen}[1]{
\ln
[\ln
[#1{[N]}]
[\ln {[\uX{N*}]}]
]
[\mvmt{#1[N]}]
}
\begin{document}
\begin{forest}
[D
[the{[D,\uX{\ln}]}]
[\basen{dog}]
]
\end{forest}
\end{document}
with this as the intended result:
sorry for not being clearer to begin with!




prooftreesdepends on it (AND theenvirontrick). – cfr Nov 18 '19 at 02:54\lynxdo? – cfr Nov 18 '19 at 02:59