5

While trying to use the torn page effect in a beamer document, I was confronted to an unexpected problem.

If you just take the the code of this answer and compile it, you get:

Screenshot of the torn effect on article

If you just change the class to beamer (and comment the geometry package), you get:

Screenshot of the torn effect on beamer

A thin (ugly) line just appeared at the end of the shadow (which is not quite the same either). I tried a lot of options and modification of the code, looked at the beamer documentation (ouch), but could not find any clue on how to remove this thin line (or at least, makes it white).

Clément
  • 5,591
  • In both cases, I commented the shade=bilinear interpolation, which caused an error at compilation. – Clément Feb 04 '15 at 23:38
  • 3
    The option in version 3.0 should be shading=bilinear interpolation. – Gonzalo Medina Feb 04 '15 at 23:49
  • Thanks for pointing that out. I added a comment on the original question and a closely related one. However, it does not solve that problem. – Clément Feb 04 '15 at 23:52
  • Yes, I know it doesn't solve the problem. I just wanted to give the proper option. – Gonzalo Medina Feb 04 '15 at 23:53
  • 1
    The output looks fine on my machine after correcting the TikZ option mentioned by @GonzaloMedina. See: http://i.stack.imgur.com/mEnJ0.png – Herr K. Feb 05 '15 at 00:00
  • 2
    This is a viewer issue. I can confirm the problem using Okular and the TeXworks viewer, but the problem disappears using Acrobat Reader. – Gonzalo Medina Feb 05 '15 at 00:01
  • 3
    Most viewers can't handle PS based shadings. So test everything on Acrobat. – percusse Feb 05 '15 at 00:03
  • I'm on debian and you are right. The error shows on Okular, but Adobe Reader and Foxit Reader just display the output correctly. But how come this is sensitive to the class ?!?! Anyway, I'll accept anyone answering "it is a viewer issue", thanks a lot. – Clément Feb 05 '15 at 00:07
  • @percusse It does depend on your aims, though. If you want to make sure something looks OK no matter which viewer a reader uses, it is a reason to test with Okular or another poppler-based viewer. (One person's modus ponens is another's modus tollens...) Why would it be class-dependent, though? – cfr Feb 05 '15 at 00:30
  • I was looking for an explanation of this difference. It appears to be sensitive to the viewer, so I regard this question as off-topic. 2) However, it is class-dependant. Those two .tex, compiled with the same engine and viewed with the same viewer (okular in that case) have different behaviors: in one case the shadow is correct, not in the other. And the only difference is the class.
  • – Clément Feb 05 '15 at 00:37
  • 3
    @cfr If it doesn't work in Acrobat then you can think of a TeX problem otherwise almost always it is a viewer issue. Especially with fadings XeTeX is another smoking gun. Makes life easier for debugging. – percusse Feb 05 '15 at 00:56
  • @percusse Yes, of course. – cfr Feb 05 '15 at 01:03
  • @Clément That I don't understand. If the problem is that the viewer cannot handle the shading, why should the class make any difference? – cfr Feb 05 '15 at 01:03
  • 1
    That is the effect though. Okular has no problem if it is article - only with beamer. It is interesting, because I've had problems with shadings go the other way i.e. artefacts in Adobe which didn't appear in Okular. (Probably an old version of the software since it was a university copy of Adobe.) So now I make my shadings overshoot the page dimensions in beamer so I don't get unexpected blocks of colour when I show the slides in class. (I test in Okular but display in Adobe as they've only got Windows.) – cfr Feb 05 '15 at 01:18
  • @cfr : I cannot explain that neither. But you were aware of the difference that makes the classes in the shadow treatment of viewers, too. Did you try to get any explanation? – Clément Feb 05 '15 at 08:01
  • @Clément Well, in that case I assumed a straightforward viewer problem i.e. that Adobe did something odd in rendering the slides, whereas Okular did not (or did something less odd, at least). It didn't occur to me to test with anything other than beamer - I only tried that with your example a few hours ago. So there was no explanation really to seek. – cfr Feb 05 '15 at 16:02