3

I have a strange problem with PS-Tricks. I can only create one picture when using beamer. Take this as an example:

\documentclass{beamer}

\usepackage[pdf]{pstricks}


\begin{document}
\begin{frame}

\begin{pspicture}(0,0)(2,2)
  \psline(0,0)(1,1)
 \end{pspicture}

\end{frame}

\begin{frame}

\begin{pspicture}(0,0)(2,2)
  \psline(0,0)(1,1)
 \end{pspicture}

\end{frame}


\end{document}

Only the first frame contains a pstricks graphic, the second one is empty. Pstricks only creates the first graphic and ignores the rest.

Any ideas to this? I use TexLive 2013.

2

Stolen from Herbert's answer here (click).

\documentclass{beamer}
\usepackage{auto-pst-pdf}
\makeatletter
\let\Test@pr@shipout\pr@shipout%% save the original definition
\let\Test@shipout\shipout
\makeatother
\usepackage{tikz}
\makeatletter
\AtBeginDocument{%
  \let\pr@shipout\Test@pr@shipout%% restore it 
  \let\shipout\Test@shipout
}
\makeatother
\usepackage{pstricks}


\begin{document}
\begin{frame}

\begin{pspicture}(0,0)(2,2)
  \psline(0,0)(1,1)
 \end{pspicture}

\end{frame}

\begin{frame}

\begin{pspicture}(0,0)(2,2)
  \psline[linecolor=red](0,0)(1,1)
 \end{pspicture}

\end{frame}


\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.