6

The following code worked several years ago but it does not now. I lost my conscious and I might be in a generation gap. I attempted to compile with either lualatex or latex->dvips->ps2pdf sequence but it ends with errors.

\documentclass{beamer}
\usepackage{pstricks}

\usepackage[active,tightpage]{preview}
\PreviewEnvironment{pspicture}
\PreviewBorder=1cm\relax

\usepackage{graphicx}

\def\RightPart
{
    \only<+->{\psline(0.5,2.7)(!6.5 3.5 82 eP2C)}
    \only<+->{\psbezier(1.2,1.3)(1.3,1.0)(2.0,1.0)}
    \only<+->{\psbezier(3.0,1.0)(3.0,2.2)(!6.5 3.5 73 eP2C)}
    \only<+->{\psellipticarcn(6.5,3.5){(!6.5 3.5 73 eP2C)}{(!6.5 3.5 73 neg eP2C)}}
    \only<+->{\psbezier(4,-2)(4,0)(2.2,-1.8)}
    \only<+->{\psbezier(1.5,-1)(1,-1)(!6.5 3.5 -90 eP2C)}
}

\def\LeftPart
{
        \only<+->{\psbezier(1,-1)(1.5,-1)(2.2,-1.8)}  
        \only<+->{\psbezier(4,0)(4,-2)(!6.5 3.5 73 neg eP2C)}    
        \only<+->{\psellipticarc(6.5,3.5){(!6.5 3.5 73 neg eP2C)}}{(!6.5 3.5 73 eP2C)} 
        \only<+->{\psbezier(3.0,2.2)(3.0,1.0)(2.0,1.0)}
        \only<+->{\psbezier(1.3,1.0)(1.2,1.3)(!6.5 3.5 82 eP2C)}
    \only<+->{\psline(0.5,2.7)}
        \only<+->{\closepath}
}

\begin{document}
\begin{frame}{Test}
\begin{pspicture}[showgrid=false](-7,-4)(7,4)
\pstVerb{/eP2C {PtoCab} def}%
%\psclip{%
\pscustom[dimen=m,linewidth=4\pslinewidth]
{
    \only<+->{\RightPart}
  \code{-1 1 scale}
  \LeftPart
    \only<+->{\fill[fillcolor=yellow,fillstyle=solid]}
}%}
\only<+->{\rput(0,0){\parbox{12cm}{\centering \bf\fontsize{15pt}{15pt}\selectfont Entity Framework Core  \\ Happy Coding}}}
%\only<+->{\rput(-2.5,-.75){\includegraphics[scale=2.2]{parents}}}%
%\endpsclip
\end{pspicture}
\end{frame}
\end{document}
  • The errors when compiled with latex-dvips-ps2pdf: List item

  • The errors when compiled with lualatex: enter image description here

Note: For the sake of my convenience, the errors are intentionally sent as images.

4
  • 1
    +1: It may be useful to also post the error message. Jun 24 at 14:49
  • I only had a few warnings (overfullhbox), compiling with xelatex --shell-escape.
    – Bernard
    Jun 24 at 15:10
  • @Bernard: Yes. It is compilable with xelatex. Jun 24 at 15:15
  • 3
    the problem is preview. It has not been adapted to the new shipout code of LaTeX and now choke over code in the shipout hooks. If I remove preview it compiles in texlive 2022 both with lualatex and with latex-dvips-ps2pdf. Jun 24 at 16:15

1 Answer 1

8

preview has not been adapted to the current LaTeX and chokes over some hooks. You can try to empty the hooks. For lualatex you should also load the pro-file in the picture:

\documentclass{beamer}
\usepackage{pstricks}

\usepackage[active,tightpage]{preview}
\PreviewEnvironment{pspicture}
\PreviewBorder=1cm\relax

\RemoveFromHook{shipout/firstpage}[hyperref]
\RemoveFromHook{shipout/before}[hyperref]
\RemoveFromHook{shipout/before}[beamerbasenavigation]

\usepackage{graphicx}

\def\RightPart
{
    \only<+->{\psline(0.5,2.7)(!6.5 3.5 82 eP2C)}
    \only<+->{\psbezier(1.2,1.3)(1.3,1.0)(2.0,1.0)}
    \only<+->{\psbezier(3.0,1.0)(3.0,2.2)(!6.5 3.5 73 eP2C)}
    \only<+->{\psellipticarcn(6.5,3.5){(!6.5 3.5 73 eP2C)}{(!6.5 3.5 73 neg eP2C)}}
    \only<+->{\psbezier(4,-2)(4,0)(2.2,-1.8)}
    \only<+->{\psbezier(1.5,-1)(1,-1)(!6.5 3.5 -90 eP2C)}
}

\def\LeftPart
{
        \only<+->{\psbezier(1,-1)(1.5,-1)(2.2,-1.8)}
        \only<+->{\psbezier(4,0)(4,-2)(!6.5 3.5 73 neg eP2C)}
        \only<+->{\psellipticarc(6.5,3.5){(!6.5 3.5 73 neg eP2C)}}{(!6.5 3.5 73 eP2C)}
        \only<+->{\psbezier(3.0,2.2)(3.0,1.0)(2.0,1.0)}
        \only<+->{\psbezier(1.3,1.0)(1.2,1.3)(!6.5 3.5 82 eP2C)}
    \only<+->{\psline(0.5,2.7)}
        \only<+->{\closepath}
}

\begin{document}
\begin{frame}{Test}
\begin{pspicture}[showgrid=false](-7,-4)(7,4)
\pstheader{pstricks.pro} % for luatex
\pstVerb{/eP2C {PtoCab} def}%
%\psclip{%
\pscustom[dimen=m,linewidth=4\pslinewidth]
{
    \only<+->{\RightPart}
  \code{-1 1 scale}
  \LeftPart
    \only<+->{\fill[fillcolor=yellow,fillstyle=solid]}
}%}
\only<+->{\rput(0,0){\parbox{12cm}{\centering \bf\fontsize{15pt}{15pt}\selectfont Entity Framework Core  \\ Happy Coding}}}
%\only<+->{\rput(-2.5,-.75){\includegraphics[scale=2.2]{parents}}}%
%\endpsclip
\end{pspicture}
\end{frame}
\end{document}

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.