1

This is just a simple question. I saw here about the discussion on allowing transparency. I am actually creating documents with PSTricks figures.

My question is: Where do I put or write ps2pdf -dALLOWPSTRANSPARENCY in my LaTeX document? I honestly was not able to follow the thread in the comments on the link above. I am using TeXStudio as my TeX editor and uses XeLaTeX to compile documents.

Here is my MWE:

\documentclass[10pt,a4paper]{report}
\usepackage{pstricks,pstricks-add}
\usepackage[width=8.29in, height=11.64in, left=0.5in, right=0.5in, top=0.5in, bottom=0.5in]{geometry}
\begin{document}

\begin{pspicture}(-5,-5)(5,5)
\pscircle[ fillstyle=solid, fillcolor=green!15 , opacity = 0.95 ](0,0){1}
\pspolygon[  fillstyle=solid, fillcolor=magenta!15 , opacity = 0.95](0,2)(-1,0)(1,0)
\end{pspicture}

\end{document}

Thank you in advance.

11
  • -dALLOWPSTRANSPARENCY is an option that you must add to the ps2pdf call, not to the document. Oct 31, 2023 at 8:29
  • @UlrikeFischer but does xelatex run ps2pdf behind the scenes?
    – daleif
    Oct 31, 2023 at 8:45
  • 1
    @daleif ah sorry I didn't see the reference to xelatex, yes behind the scene it is there too. Adding something like -output-driver="xdvipdfmx -i dvipdfmx-unsafe.cfg -q -E" to the xelatex call should work. Oct 31, 2023 at 8:54
  • @UlrikeFischer just checked, it does seem to work.
    – daleif
    Oct 31, 2023 at 9:02
  • @UlrikeFischer where can I find the ps2pdf call? ^^ Oct 31, 2023 at 9:46

1 Answer 1

0

Simply use lualatex instead of xelatex. Then you do not need ps2pdf:

enter image description here

image with opacity=0.5

5
  • This works fine! Thank you so much. I have another question. If I load the pst-pdf package, the PSTricks image disappears but if I do not use, some texts are missing and the PSTricks image is incomplete. How do I deal with this one? Oct 31, 2023 at 21:09
  • give an example! There is only a known problem with filled outline font.
    – user187802
    Nov 1, 2023 at 6:27
  • I seem to have fixed it just now. The packages pst-3dplot and pst-pdf cause the PSTricks image to not display. Nov 1, 2023 at 6:31
  • with lualatex you do not need the package pst-pdf!!
    – user187802
    Nov 1, 2023 at 7:27
  • the example exhibiting the problem is on tex.stackexchange.com/questions/700140/… Nov 1, 2023 at 14:03

You must log in to answer this question.

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