I'm using the expex package to write examples (in linguistics articles). This package, according to the documentation, allows one to draw arrows (to represent movement in syntax). There is a section about pstricks to do this p. 74 of the documentation on the expex package.

Here is a minimal working example (copied and pasted from the expex documention) that I cannot get to compile and I don't understand why.


\usepackage{pstricks} % Apparently this is required to draw arrow with Expex (see p.74 of Expec doc)
\usepackage{expex}  % package for glosses
\lingset{everygla=,aboveglftskip=0pt,*=?*, textoffset=!-.6em, everyglb=\footnotesize, everyglft=\slshape} % changes style of glosses


This is a "control item", showing that the problem really comes from adding the stuff to draw arrows.

\def\\#1(#2){\rnode{#2}{\strut #1}} %
\vrule height0pt depth5.3ex width0pt
\\Whom(A) did John persuade \\t(B) [ PRO to visit \\whom(C) ]


The result should look like this. (This snapshot is taken from the expex documentation p 74.)

enter image description here

Thanks for your help!

  • 1
    Welcome to TeX.SX! If I add \usepackage{pst-node} to the file, then it compiles, but it does not produce the desired result.
    – Adam Liter
    Mar 3 '15 at 3:48

If using TikZ is an option, this can be easily done:

enter image description here

The code:


\lingset{everygla=,aboveglftskip=0pt,*=?*, textoffset=!-.6em, everyglb=\footnotesize, everyglft=\slshape}

  \tikz[remember picture]\node[inner sep=0pt,outer sep=0pt] (#1) {#2};%

\tikz[remember picture,overlay]
  \draw[->,rounded corners,line width=0.8pt,shorten >= 2pt,shorten <= 2pt,#1] 
    (#2) -- ++(0,-#6\ht\strutbox) coordinate (aux) -- node[#4] {#5} (#3|-aux) -- (#3);


W\Tikzmark{enda}{h}\Tikzmark{endb}{o}m(A) did John persuade \Tikzmark{starta}{t}(B) [ PRO to visit w\Tikzmark{startb}{h}om(C) ]


You use \Tikzmark to place some marks and then \DrawArrow to draw the arrow between the marks.

The \DrawArrow command has syntax

\DrawArrow[<tikz options>]{<start-mark>}{<end-mark>}{<options for the node>}{<label>}[<vertical shift>]

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.