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 this simple example:


    % Draw axes
    \draw [<->,thick] (0,2.2) node (yaxis) [above] {$t$}
        |- (2.2,0) node (xaxis) [right] {$s$};
    % Draw triangle's legs
    \draw (0.5,0.5) coordinate (a)  -- +(1.3,0) coordinate (b);
    \draw (b) -- +(0,1.5) coordinate (c);

    \draw (a) .. controls +(10:1) and +(265:1) .. (c)
    node[sloped,above,pos=0.5] {$t=g(s)$};

    % Draw vertices and labels
    \fill[red] (a) circle (1pt);
    \draw (a) node[left] {$a$};
    \fill[red] (b) circle (1pt);
    \draw (b) node[right] {$b$};
    \fill[red] (c) circle (1pt);
    \draw (c) node[right] {$c$};

I want to position a fourth point d relative to one of the other points. I want it to be a standalone coordinate, such that later in the code I could refer to it. For example, have \draw (d) -- (0,0); or something similar.


share|improve this question
up vote 14 down vote accepted

This can be done using the following ways:

% ...

\coordinate (d) at ($ (c) + (1,3) $);


\path (c) ++(1,3) coordinate (d);

The latter one might add a invisible path to your picture, which should not be an issue most of the time.

share|improve this answer
I can confirm that both approached solved my issue. Thanks! – Dror Apr 13 '11 at 8:53
Note that in the first case one can also subtract, in the other option one has to add a negative number, for example (c) ++(-1,3). – Dror Apr 13 '11 at 9:21
@Dror: Yes, the ++ is a fixed syntax, there is no --, so you have to use negative numbers. – Martin Scharrer Apr 13 '11 at 9: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.