Básicamente es la misma pregunta queBosque: ¿Crear un nodo fantasma que no ocupe espacio?pero la solución que se ofrece allí no funciona con forest 2.1.5. Quiero que el phantom S no ocupe espacio. Intenté establecer la línea de base en el nodo fantasma, pero esto no tuvo ningún efecto.
\documentclass{article}
\usepackage{forest}
\useforestlibrary{linguistics}
\begin{document}
\noindent
This is some very informative text, that is very informative.\\
\begin{forest}
[\phantom{S}
[S, no edge, baseline
[NP,name=np11
[he]]
[VP, name=vp1
[V,name=v1 [knows]]]]
[S, no edge, name=s2
[V, name=vcoord, no edge [and, name=and, no edge]]
[VP
[V,name=v2 [loves]]
[NP, name=np22 [this record, roof]]]]]
\draw (s2.south)--(np11.north)
(vp1.south)--(np22.north);
\draw[thick] (vcoord.south)--(v1.north)
(vcoord.south)--(v2.north)
(vcoord.south)--(and.north);
\end{forest}
\end{document}
Respuesta1
La solución es utilizar la phantom
tecla de forest
en lugar de la \phantom
macro, lo que hace que la S sea invisible.
\documentclass{article}
\usepackage[linguistics]{forest}
\begin{document}
\noindent
This is some very informative text, that is very informative.\\
\begin{forest}
[S, phantom
[S, no edge, baseline
[NP,name=np11
[he]]
[VP, name=vp1
[V,name=v1 [knows]]]]
[S, no edge, name=s2
[V, name=vcoord, no edge [and, name=and, no edge]]
[VP
[V,name=v2 [loves]]
[NP, name=np22 [this record, roof]]]]]
\draw (s2.south)--(np11.north)
(vp1.south)--(np22.north);
\draw[thick] (vcoord.south)--(v1.north)
(vcoord.south)--(v2.north)
(vcoord.south)--(and.north);
\end{forest}
\end{document}