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 want to show items, each with a curve pointing to a point on the right figure. But in the following code, the curves disappear. What is wrong?

\documentclass{beamer}
\usepackage{graphicx}
\usepackage{pst-node}

\newsavebox\IBox
\savebox\IBox{\includegraphics[scale=.5]{example-image-a}}

\psset{xunit=.1\wd\IBox,yunit=.1\ht\IBox,arrows=->,linecolor=red}

\begin{document}
\begin{frame}[t]{Hello World and Hello Universe}
\begin{columns}[t]
    \begin{column}{.3\linewidth}
    \begin{enumerate}
        \item<2-> \rnode[r]{HWl}{Hello World}\nccurve{HWl}{HWr}
        \item<3-> \rnode[r]{HUl}{Hello Universe}\nccurve{HUl}{HUr}
    \end{enumerate}
    \end{column}
    \begin{column}{.7\linewidth}
    \begin{center}
        \begin{pspicture}[showgrid=top](10,10)
        \rput[bl](0,0){\usebox\IBox}
        \pnode(2,4){HWr}
        \pnode(5,8){HUr}
        \end{pspicture}
    \end{center}
    \end{column}
\end{columns}
\end{frame}
\end{document}

enter image description here

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

The nodes HWr and HUr are defined only after you \nccurve commands. You can add e.g.

\only<2>{\nccurve{HWl}{HWr}}
\only<3>{\nccurve{HUl}{HUr}}

after you defined all nodes:

\documentclass{beamer}
\usepackage{graphicx}
\usepackage{pst-node}

\newsavebox\IBox
\savebox\IBox{\includegraphics[scale=.5]{example-image-a}}

\psset{xunit=.1\wd\IBox,yunit=.1\ht\IBox,arrows=->,linecolor=red}

\begin{document}
\begin{frame}[t]{Hello World and Hello Universe}
\begin{columns}[t]
    \begin{column}{.3\linewidth}
    \begin{enumerate}
        \item<2-> \rnode[r]{HWl}{Hello World}\nccurve{HWl}{HWr}
        \item<3-> \rnode[r]{HUl}{Hello Universe}\nccurve{HUl}{HUr}
    \end{enumerate}
    \end{column}
    \begin{column}{.7\linewidth}
    \begin{center}
        \begin{pspicture}[showgrid=top](10,10)
        \rput[bl](0,0){\usebox\IBox}
        \pnode(2,4){HWr}
        \pnode(5,8){HUr}
        \only<2>{\nccurve{HWl}{HWr}}
        \only<3>{\nccurve{HUl}{HUr}}
        \end{pspicture}
    \end{center}
    \end{column}
\end{columns}
\end{frame}
\end{document}
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.