I'm using TeX Live 2019 (in Overleaf) and I have the following code:



but I obtained (LaTeX compiler)

enter image description here

By using Tex Live 2017, I obtain the right result:

enter image description here

What could be the problem? How can I fix it?

  • 1
    tex.stackexchange.com/questions/453780/… is what you need.
    – user213378
    Aug 15, 2020 at 2:25
  • Hi andrebant and @user213378, Tom from Overleaf Support here. Thanks for pointing this out. we'll see whether we can solve this issue for the TeX Live 2020 image in Overleaf that we are about to deploy shortly. However, we'll have to discuss whether the -dNOSAFER option is fine to run in our docker images. Thanks again!
    – yo'
    Aug 15, 2020 at 9:35
  • @user213378 That's exactly what I needed, but I can't reproduce it in Overleaf
    – MateAndres
    Aug 15, 2020 at 19:31
  • @yo' Thanks. Is there a way to include -dNOSAFER by latexmkrc file in Overleaf?
    – MateAndres
    Aug 15, 2020 at 19:32
  • @MateAndres We've looked further into the issue. We'll try to make this work out of the box in our TeX Live 2020 image. For now, see the answer for the correct latexmkrc contents.
    – yo'
    Aug 18, 2020 at 7:47

1 Answer 1


Tom from Overleaf Support here.

You should be able to allow transparency by adding a new file latexmkrc (without any file extension) into your project's top folder and adding the following line there:

$dvipdf = "dvipdf -dNOSAFER -dALLOWPSTRANSPARENCY %O %S %D";

Note that you shouldn't include these options when you're running the code locally on your machine, as they are considered a security threat. In Overleaf, we run the compilations in isolated Docker containers, so there's no issue.

This is necessary in all TeX Live images in Overleaf up to 2019. This will be available in our TeX Live 2020 image by default, allowing PSTricks transparency without additional tricks.

  • This answer could be added here as well: tex.stackexchange.com/questions/453780/…
    – AlexG
    Aug 18, 2020 at 8:18
  • @AlexG I'm reluctant to suggesting users to add this to latexmkrc for the security reasons. (I don't know the details really, at Overleaf we don't need to care that much, but I feel like NOSAFER is called the way for a reason.)
    – yo'
    Aug 18, 2020 at 9:03
  • As far as transparency is concerned, NOSAFER is obsolete (without effect) anyway, beginning with current Ghostscript 9.52. ALLOWPSTRANSPARENCY is the way to go now. It doesn't enable other security-related permissions, as NOSAFER would do, e. g. permission to write to files.
    – AlexG
    Aug 18, 2020 at 9:45
  • @AlexG Ah we currently have 9.50 in our TL2020. I'll see what can be done about this. Anyway, feel free to add my notes about latexmkrc from here to your answer in the other thread -- you seem to know more about the issue than I do anyway :-)
    – yo'
    Aug 18, 2020 at 9:48

You must log in to answer this question.

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