1

I'm currently trying to draw trees using the rrgtrees package in latex. This package is used to draw syntactical trees for Role and Reference Grammar.

Here is the link to the package and the documentation on CTAN

I'm trying to diagram the sentence in Spanish El médico ya vio varios pacientes (The doctor already saw various patients)

By compiling the following code on overleaf.com : I'm able to produce the tree that you see below:

\documentclass[11pt, spanish]{report}
\usepackage[spanish]{babel}
%Normally I would have used inputenc as overleaf reccomends, but for   some reason when using the packages rrg-trees and their dependencies, I coulnd't get the Spanish accent marks to show up
\usepackage[T1]{fontenc}
\selectlanguage{spanish}
\usepackage{rrgtrees}
% These packages are required
\usepackage{pst-node}
\usepackage{pst-tree}
\usepackage{verbatim}
\begin{document}

\psset{treesep=2ex}
 \SENTENCE{
   \CLAUSE{
    \CORE[COREb]{
     \OPR{2}{El}
     \ARG{\WORD(NP){{médico}}}
        \rPERIPH[b]{1}{FA}{\WORD{ya}}
         \NUC{vio}
          \ARG[ACD]{\WORD(NP){varios pacientes}}
      }
     }
    }
\dolinks
\end{document}

enter image description here

However, as you can see the PERIPHERY node is blocking the CORE node. That's why I want to try and use \LPERIPH or \RPERIPH because it allows you to set a distance that the PERIPHERY node should be away from the CORE node that it refers to.

For example, when I try the following code: `

\psset{treesep=2ex}
  \SENTENCE{
    \CLAUSE{
      \CORE[COREb]{
        \OPR{2}{El}
        \ARG{\WORD(NP){{médico}}}
            \RPERIPH[b]{5em}{1}{FA}{\WORD{ya}}
        \NUC{vio}
        \ARG[ACD]{\WORD(NP){varios pacientes}}
      }
    }
  }
\dolinks

` I get en error on the \dolinks command that says:

Missing number, treated as zero. [ l.50 \dolinks

If someone could please help me with this error or knows a better way to draw the tree that I'm looking for, I would really appreciate it. Thank you.

  • Welcome! Unfortunately, your snippet does not compile. There is no \begin{document} nor \end{document}. Could you please make the snippet compilable (and specify how you compile it)? – marmot Dec 30 '17 at 4:38
  • Btw and off-topic, there are two different sentences: in the question you use varios, but in the code says varias. They are way different in Spanish. – Cragfelt Dec 30 '17 at 8:57
  • code should be compatible and fixed varios vs. varias. – axme100 Dec 30 '17 at 11:42
0

Looks like a bug with \dolinks. However, you can set the Periphery individual:

\documentclass[11pt, spanish]{report}
\usepackage[spanish]{babel}
\usepackage{rrgtrees}
\usepackage{pst-node}
\usepackage{pst-tree}
\begin{document}

\psset{treesep=2ex}
\SENTENCE{%
  \CLAUSE{%
    \CORE[COREb]{%
      \OPR{2}{El}%
      \ARG{\WORD(NP){médico}}%
      \rPERIPH[b]{1}{\rnode{FA}{FA}}{\WORD{ya}}%
      \NUC{vio}%
      \ARG[ACD]{\WORD(NP){varias pacientes}}%
    }%
  }%
}
\pnode[-3,0](COREb){P0}
\rput(P0){\textsc{Periphery}}
\ncline[nodesepA=1]{->}{P0}{COREb}
\ncangles[armA=0.5,angleA=-90,angleB=90]{P0}{FA}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.