TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Consider the added minimal example, I was expecting it to generate two parallel lines. The ending result however is that the second line start at the end of the first in what I assume is the relative angle. I have no idea how the length is determined. I've also attached a figure of my results. So, as the title ask. Why won't this two line be parallel?



    \draw  (-1.5,-0.1) -- (51:1.9);
    \draw  (1.5,-0.1) -- (51:1.9);
    \node at (-1.5,-0.1) {a};


The output of the simple code

enter image description here

share|improve this question
The director vector is not the same so they are not parallel. – Sigur Jul 21 '13 at 15:41
I'd need to read up on tikz' coordinate systems... going by the picture, is (51:1.9) polar w.r.t. origin? (It sounds like you want polar w.r.t. the current position.) – Ulrich Schwarz Jul 21 '13 at 15:42
Oh now I get it. You need to put a + sign before the end point to make it relative as in +(51:1.9) – percusse Jul 21 '13 at 15:46
Be careful. Since the point a is not the origin, the vector (51:1.9) is not the director vector to the line. – Sigur Jul 21 '13 at 15:48
@Sigur, I've placed point a just so we'll have an easy point to discuss. – Yotam Jul 21 '13 at 19:52
up vote 10 down vote accepted


Regrading your Question

Note the leading + in front of the target coordinates. To receive parallel lines you have to draw a line relative the the start point. Without the +-sign you specify absolute coordinates with respect to the origin (0,0).

Regarding Relative Coordinates

In a path you can specify relative coordinates in several manners. Let's draw a simple rectangle.

Using explicit coordinates

The simplest way using the rectangle macro.

\draw (0,0) rectangle (1,1);

Using a line to connect the edges:

\draw (0,0) -- (1,0) -- (1,1) -- (0,1) --cycle;

Using relative coordinates

With the rectangle macro:

\draw (0,0) rectangle +(1,1);

Using a line to connect the edges: Point preceeded by a single + are always relative to the previous declared point on the path and the pen is returned to the previous point

\draw (0,0) -- +(1,0) -- +(1,1) -- +(0,1) --cycle;

while points with two ++ are still relative the previous point on the path but the pen stays on the resulting point relative to the previous point

\draw (0,0) -- ++(1,0) -- ++(0,1) -- ++(0,-1) --cycle;

More about relative coordinates

If you want to learn more about relative coordinates, review section 2.15 of the current pgfmanual.


        \draw (-1.5,-0.1) -- +(51:1.9);
        \draw (1.5,-0.1)  -- +(51:1.9);
        \node at (-1.5,-0.1) {a};


enter image description here

share|improve this answer
Nice answer. You may like to add some information about the ++ syntax ... – Tobi Jul 21 '13 at 19:52
included a small clarification, I hope you don't mind. – percusse Jul 21 '13 at 20:29
@percusse Thanks for your improvements. You are always welcome! – Henri Menke Jul 21 '13 at 20:31

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.