Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In the following example, I have drawn a couple of arrows in TikZ that are overlapping at one end.



  \foreach \x in {1,...,10}
    \draw[->] (0,0) -- (\x,0);


enter image description here

Since the arrows are drawn separately, TikZ lays them on top of each other making them look thicker than normal. Is there any way to tell TikZ to not thicken lines/borders that are superimposed? Of course, I am looking for a general solution to this problem, not a quick fix for the simple example above.

share|improve this question
Did you try zooming in and out? It's a PDF viewer related anti-aliasing problem. See also tex.stackexchange.com/questions/49614/… –  percusse Jun 23 '12 at 1:15
So, it wouldn't look like this if I print the document? –  Ali Jun 23 '12 at 1:21
Drawing a line on top of itself will only make the line appear thicker if there is a slight offset. In this case, I don't see any offset and since the arrows are not redrawn on top not sure why you would think that the lines could get thicker? –  Peter Grill Jun 23 '12 at 1:21
@peter: The leftmost arrow clearly looks thicker to me than the rightmost one. Is that an illusion?! –  Ali Jun 23 '12 at 1:25
@Ali: Opening it in Acrobat and zooming in to 1600%, the last arrow look the same as the one before. –  Peter Grill Jun 23 '12 at 2:00

1 Answer 1

This is the same effect as in Branching lines in TikZ without antialiasing/subpixel artifact? (and some others, I think). If you are concerned how it looks like on screen, you could try to sidestep the issue. For example (plain-format):

\input tikz
\tikz \foreach \x in {1,...,10} \draw[->] (\x,0) -- ++(1,0);

enter image description here

share|improve this answer
Thanks, @morbusg. This works, indeed. However, it is not always this easy to avoid overlapping lines. In more complicated structures, it is a real headache to segment lines in series, e.g. having lots of shapes with common borders, etc. Anyways, I would not be much concerned about this as long as the printout looks pretty. –  Ali Jun 23 '12 at 20:12
@Ali: Oh, man, I'm sorry; I missed your questions last sentence. I think I remember once seeing a mailing list conversation regarding this effect, but can't for the life of me find it or remember what was the outcome. Maybe there is some program which could “optimize” the resulting PDF by removing the overlapping lines somehow. –  morbusg Jun 24 '12 at 7:16
Sure. As far as I realized from comments, this is apparently a problem related to how the document is rendered and the results vary from system to system. Therefore, I do not believe if there exists any general remedy for it. Again, thanks for your kind input. –  Ali Jun 24 '12 at 8:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.