1

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. –  Sep 13 '20 at 03: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 '20 at 03:18
  • 1
    The display you get may depend on the PDF renderer. Okular shows https://imgur.com/a/M3VHQ7X, ImageMagick's convert produces https://imgur.com/a/FPYCqr9 – snwflk Sep 13 '20 at 03: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 '20 at 03: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 '20 at 04:17
  • @ShadyPuck A minimal working example is a minimal piece of code that compiles and reproduces your problem. There is no code attached to your question (perhaps it is in the link, but that's not considered part of your question!). –  Sep 13 '20 at 05:12
  • Your problems are mostly renderer related. Many renderers have problems with functional shadings. However, there is also a bug in the final shading. It needs dup dup added at the end. To check what it's meant to look like you should use Adobe Reader. – David Purton Sep 13 '20 at 11:54
  • @DavidPurton Follow your suggestion, I've edited that answer. Thank you. – muzimuzhi Z Sep 14 '20 at 12:43
  • Viewer problem I think. On Windows 7 the code work on the viewer of TeXstudio, on PDF-XChange and on MuPDF 1.15.0, but don't work for Adobe Reader DC. – vi pa Sep 18 '20 at 08:40

0 Answers0