[pstricks] Transparency and pst-3dplot

Herbert Voss Herbert.Voss at fu-berlin.de
Mon Jan 17 21:59:40 CET 2022



Am 17.01.22 um 19:43 schrieb Hamed Alsulami:
>
> Dear all,
>
> I have a problem with transparency appearing on the following example
>
> \documentclass[11pt]{article}
>
> \usepackage{auto-pst-pdf}
>
> \usepackage{pst-3dplot}
>
> \begin{document}
>
> \begin{pspicture}(-5,-5)(5,5)
>
> \pstThreeDSquare[fillcolor=red,fillstyle=solid](0,0,0)(0,2,0)(2,0,0)
>
> \pstThreeDSquare[fillcolor=blue,fillstyle=solid,opacity=0.5](0,0,0.8)(0,2,0)(2,0,0)
>
> \pstThreeDEllipse[fillcolor=white,fillstyle=solid,opacity=0.5](1,1,0.8)(0,0.5,0)(0.5,0,0)
>
> \end{pspicture}
>
> \end{document}
>


If you have an up-to-date TeX distribution (TeXLive or MikTeX
you can run this with lualatex and get directly your pdf output:

\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{}
\documentclass[11pt]{article}

\usepackage{pst-3dplot}

\begin{document}

\begin{pspicture}(-5,-5)(5,5)
\pstThreeDSquare[fillcolor=red,fillstyle=solid](0,0,0)(0,2,0)(2,0,0)
\pstThreeDSquare[fillcolor=blue,fillstyle=solid,opacity=0.5](0,0,0.8)(0,2,0)(2,0,0)
\pstThreeDEllipse[fillcolor=white,fillstyle=solid,opacity=0.5](1,1,0.8)(0,0.5,0)(0.5,0,0)
\end{pspicture}

\end{document}



IOtherwise you have to load auto-pst-pdf with

\usepackage[pspdf={-dALLOWPSTRANSPARENCY -dNOSAFER}]{auto-pst-pdf}


Herbert




More information about the PSTricks mailing list.