1

In the following MWE, I would like to uncover the last part of the picture on the second slide. Therefore, I used \only<2->{...}. When compiling with LaTeX->PS->PDF, everything works fine.

But now, I insist on using PDFLaTeX and auto-pst-pdf as I have a lot of graphics (.pdf) to include. I used pdflatex-autopstpdf.tco from https://www.ctan.org/tex-archive/graphics/pstricks/pst-support?lang=de.

Unfortunately, the last part of the picture (inside \only<2->{...}) doesn't show up at all. I get the message "Package pst-pdf warning: 'LaTeX1-pics.pdf' contains 2 pages". Can somebody help?

    \documentclass[12pt,xcolor=pst]{beamer}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage[ngerman]{babel}
    \usepackage{graphicx}
    \usepackage{lmodern}
    \usepackage{geometry}
    \geometry{papersize={16cm,12cm}}
    \usepackage{xcolor}
    \usepackage{pst-all}
    \begingroup
    \catcode`\#=11
    \gdef\autorotatonone{-dAutoRotatePages#/None}
    \endgroup
    \usepackage[pspdf={\autorotatonone}]{auto-pst-pdf}

    \begin{document}

    \begin{frame}
    \centering
    \resizebox{0.6\textwidth}{!}{
    \begin{pspicture}[showgrid=false]
    \psline[linewidth=1.5pt](0,-2.5)(0,-0.3)
    \psline[linewidth=1.5pt](0,0.3)(0,2.5)(6,2.5)(6,-2.5)(0,-2.5)
    \rput[l]{90}(-0.3,0.5){\small Photoplate}
    %Ion
    \psline[linewidth=0.6pt]{->}(-0.7,0)(-0.2,0)
    \pscircle[fillstyle=solid,fillcolor=green,linewidth=0.4pt](-0.7,0){0.1}
    \rput[c](-0.7,0){\tiny\boldmath$+$}
    %Path which is supposed to show up by second slide
    \only<2->{\psarc[linecolor=gray,linewidth=0.7pt](0,1){1}{-90}{90}
    \rput[r](0.6,1.1){\scriptsize$m_1$}}
    \end{pspicture}
    }
    \end{frame}

    \end{document} 
1
  • 1
    Looks as if pst-pdf is not overlay aware. I would avoid the combination with beamer. Create the graphics witt tikz. Or create them in some external documents and insert them with \includegraphics. Commented Feb 15, 2017 at 22:56

1 Answer 1

1

Run the document with xelatex:

\documentclass[12pt]{beamer}
\usepackage[ngerman]{babel}
\usepackage{graphicx}
 \usepackage{lmodern}
 \usepackage{geometry}
 \geometry{papersize={16cm,12cm}}
 \usepackage{xcolor}
 \usepackage{pst-all}
 \begin{document}

\begin{frame}
 \centering
 \resizebox{0.6\textwidth}{!}{%
    \begin{pspicture}(0,-3)(6,3)
    \psline[linewidth=1.5pt](0,-2.5)(0,-0.3)
    \psline[linewidth=1.5pt](0,0.3)(0,2.5)(6,2.5)(6,-2.5)(0,-2.5)
    \rput[l]{90}(-0.3,0.5){\small Photoplate}
    %Ion
    \psline[linewidth=0.6pt]{->}(-0.7,0)(-0.2,0)
    \pscircle[fillstyle=solid,fillcolor=green,linewidth=0.4pt](-0.7,0){0.1}
    \rput[c](-0.7,0){\tiny\boldmath$+$}
    %Path which is supposed to show up by second slide
    \only<2->{\psarc[linecolor=gray,linewidth=0.7pt](0,1){1}{-90}{90}
        \rput[r](0.6,1.1){\scriptsize$m_1$}}
    \end{pspicture}%
}
 \end{frame}

 \end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .