I am looking into the possibilities of \pgfdeclarefunctionalshading for the first time. I found this post on TeX.se and tried pasting its MWE into my LaTeX editor (MacTeX 2020, up to date, run through VSCode's LaTeX Workshop) to play around with. However, instead of getting several shaded bands, I got a bunch of pink bands.

enter image description here

I thought it might be something local, but I got an identical result when I tried the MWE in Overleaf. Now the linked post is five years old, so I was wondering if \pgfdeclarefunctionalshading is being phased out or is broken right now (i.e., there's a bug)... But I really have no idea what's going on.

Any thoughts? If there's anything else I can provide, let me know!

  • Welcome to TeX.SX! We need to see your code as it's impossible to guess what is going wrong from just a screenshot! Please distill the code down to a minimal working example. This should compile and be as small as possible to demonstrate your problem.
    – user30471
    Sep 13, 2020 at 3:12
  • 1
    @Andrew The MWE is linked to in my question — please reread it. As I said above, I do not believe that the code is the problem; I think it’s probably something with my LaTeX or TikZ installation.
    – Shady Puck
    Sep 13, 2020 at 3:18
  • 1
    The display you get may depend on the PDF renderer. Okular shows imgur.com/a/M3VHQ7X, ImageMagick's convert produces imgur.com/a/FPYCqr9
    – snwflk
    Sep 13, 2020 at 3:22
  • @snwflk I think you're on to something. I just tried looking at the PDF in Preview, and it worked! Would you have any idea how to make functional shadings work in VSCode's default PDF viewer?
    – Shady Puck
    Sep 13, 2020 at 3:40
  • @ShadyPuck Sorry, I'm not familiar with that. It's software, though, and each implementation may behave differently. Maybe there are settings? Maybe you can switch out the viewer application? If you have a certain goal in mind that you want to achieve, be sure to add it into your question!
    – snwflk
    Sep 13, 2020 at 4:17


You must log in to answer this question.

Browse other questions tagged .