Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I try to get rid of tree-dvips and look for a way to do the following: Circle an arbitrary word on the page and draw an arrow from some other position at the page towards this circled word. In tree-dvips one can just simply declare a word a node and then use connection directives. I guess this can be done with pgf somehow, but the nodes seem to require a position in a coordinate system.

This is the tree-dvips code:

\documentclass{scrbook}

\usepackage{tree-dvips}


\begin{document}

\begin{tabular}{lllllll}
\node{bazas}{bāz-a\v{s}} & agar & mi-xāh-i                       & fardâ    & \node{blk1}{} & bo-kon-i\\
open-\textsc{3sg}        & if   & \textsc{ipf}-want-\textsc{2sg} & tomorrow & {}                & \textsc{sbj}-do-\textsc{2sg}\\
\end{tabular}\\[2ex]
`If you want to open it tomorrow \ldots'
{\makedash{1pt} \nodeoval{bazas} \abarnodeconnect[-18pt]{blk1}{bazas}}



\end{document}
share|improve this question
    
I smell a TikZ solution... –  cgnieder Sep 12 '12 at 12:49
add comment

2 Answers

up vote 2 down vote accepted

run it with xelatex

\documentclass{scrbook}
\usepackage{fontspec}
\usepackage{pst-node}

\begin{document}

\begin{tabular}{lllllll}
\ovalnode[linestyle=dashed]{bazas}{bāz-a\v{s}} & agar & mi-xāh-i  & fardâ  
   & \rnode{blk1}{~} & bo-kon-i\\
open-\textsc{3sg}        & if   & \textsc{ipf}-want-\textsc{2sg} & tomorrow & {}                  
   & \textsc{sbj}-do-\textsc{2sg}\\
\end{tabular}\\[2ex]
`If you want to open it tomorrow \ldots'
\ncbar[linestyle=dashed,arrows=->,angle=-90,arm=20pt]{blk1}{bazas}

\end{document}

enter image description here

share|improve this answer
add comment

Addition: A solution with tikz:

\documentclass{scrbook}

\usepackage{tikz}
\usetikzlibrary{shapes.geometric}

\begin{document}

\begin{tabular}{lllllll}
\tikz[remember picture,baseline]\node[anchor=base,ellipse,draw](bazas){baz-a\v{s}};
& agar
& mi-xah-i
& fardâ
% & \node{blk1}{}
& \tikz[remember picture,overlay]
    \draw[->,dashed] (0,0) -- ++(0pt,-4.75ex) coordinate(tmp1)
    -- (bazas |- tmp1) -- (bazas |- tmp1) -- (bazas);
& bo-kon-i
\\
open-\textsc{3sg}
& if
& \textsc{ipf}-want-\textsc{2sg}
& tomorrow & {}
& \textsc{sbj}-do-\textsc{2sg}\\
\end{tabular}\\[2ex]
`If you want to open it tomorrow \ldots'

\end{document}

Result with tikz

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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