I want some shaded lines, so, as I didn't find any specific command for this, I'm trying to do it with a very thin rectangle. I compile with pdflatex and zooming the pdf makes the lines, and, sometimes, also other tikz pictures in the same page, to disappear above certain high zoom percentage, depending on the code; I provide two options in the following MWE, where I include all the libraries used in the main code. I tested that there is no problem with rectangles with more height, but I need very thin lines.



\begin{tikzpicture}[shift=(current page.center), remember picture, overlay, x=1mm, y=1mm,fixed point arithmetic] % All the options I need in the main code for having more than one picture and also some text below them.  


    % If I use the following code, both lines disappear at zoom = 250%
    \shade[left color=white,right color=black](-9*\L/16,-3*\V/8-0.15) rectangle +(9*\L/16,0.15);
    \shade[left color=black,right color=white](0,-3*\V/8-0.15) rectangle +(9*\L/16,0.15);

    If I comment the two previous lines and use the following two, when zooming the pdf, first disappears the right line at zoom = 360%, and then the left one, at zoom = 380%  
    %\shade[left color=white,right color=black](-9*\L/16,-3*\V/8-0.15) rectangle (0,-3*\V/8+0.15);
    %\shade[left color=black,right color=white](0,-3*\V/8-0.15) rectangle (9*\L/16,-3*\V/8+0.15);
    % Sometimes dissapear also all the content of the page, text and other pictures.


I wanted to put a "shade" tag, also with the "tikz-pgf", but I don't have reputation for it.

  • 1
    If you zoom in further do they reappear? This sounds like a rendering issue to me i.e. it is a matter of your PDF viewer rather than something to do with what TeX is doing.
    – cfr
    Aug 24, 2015 at 12:17
  • Yes, it's the PDF viewer. In Windows I can zoom the pdf without problems. I'm using the viewer that comes with Ubuntu and I have read that there is no more support from Adobe for Linux, so I will have to find another viewer. Question solved.
    – Mayo
    Aug 24, 2015 at 15:06
  • I can't make the question solved with the green tick.
    – Mayo
    Aug 24, 2015 at 15:07
  • Does this help ;)?
    – cfr
    Aug 24, 2015 at 16:01

1 Answer 1


If you zoom in further do they reappear? This is almost certainly an issue with your PDF viewer rather than a problem in what TeX is doing or with the PDF file itself.

There are several good PDF viewers for GNU/Linux (and other systems). Ubuntu's repositories will offer a range of options. I mostly use Okular because it integrates well with Kile and a KDE desktop. Evince is a popular option which integrates well with a Gnome desktop. But there are others, too, so you just have to experiment to find which one you like.

As a bonus, these viewers are all much faster and more responsive than Adobe's acroread and several offer significantly better options for annotation (in PDFs which have not been 'blessed' by an expensive copy of Acrobat).

  • 1
    Yes, it does :) By the way, I did't answered your question: they don't appear anymore. Yes, I've been looking for other PDF viewers and also considering the option of installing the older archived Linux version of Adobe's Reader from their ftp. Also, I noticed that opening the PDF with Firefox browser (both in Windows and Ubuntu), there are no displaying problems.
    – Mayo
    Aug 24, 2015 at 19:30

You must log in to answer this question.

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