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.

This question already has an answer here:

I have

\draw[draw=black!80,solid, -triangle 90,fill=black!80] (2.6, 4) -- (3.3, 4);

I'd like the endpoints to be where they are, but I need it to arc. How do I do this?

Edit: I'm looking for something like this:

\draw [->] (0,0) arc (180:30:10pt);

enter image description here

Something like the curved arrow, except with the endpoints that I have. I need the triangle on mine to be oriented correctly though.

It doesn't have to appear to trace the top of a circle, it just has to go up in down in a curvilinear fashion (it's because there's currently another line that goes in the straight path). So, essentially, I'm trying to get 2 points from the exact starting point, to the exact endpoint. One line is already going in a straight line from A to B. But now I need to display another line; hence my need to curve the arrow.

share|improve this question
    
Are you looking for something like this: writelatex.com/132583mshwhw? –  kan Apr 5 '13 at 19:39
    
From you edit, I infer that, you're looking for something along the lines of Pg.46 of the manual. I am afraid, I won't be of much help otherwise. I am sorry. –  kan Apr 5 '13 at 19:49
    
@KannappanSampath Better reference would be the section 51.3 “Curves” where the complexity of the curve to style is explained in detail (out/in, relative, all the bending keys, the distances and the loosenesses, the controls). And, there's also (c1) .. controls (c2) [and (c3)] .. (c4). –  Qrrbrbirlbel Apr 5 '13 at 19:58
    
@AlanH Could you add a picture of what you want to achieve? There are many ways to connect two points with an arc. –  Qrrbrbirlbel Apr 5 '13 at 19:59
    
@Qrrbrbirlbel Will read it later tommorrow! Thanks for the pointers. –  kan Apr 5 '13 at 20:09
show 1 more comment

marked as duplicate by mafp, Kurt, Guido, Martin Schröder, Qrrbrbirlbel Apr 5 '13 at 23:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 3 down vote accepted

I don't know if any TikZ frontend commands exist for this (I guess there are but elude me). You can use the lower level commands to get the node border point that lives on the line as if you draw a hypothetical one from the source node to the target node intersecting the node shape.

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\node[draw] (a) at (0,0) {A};
\node[draw,circle] (b) at (2,1) {B};
\draw[-latex] (a) -- (b);

\pgfcoordinate{c}{% a coordinate named c at....
    \pgfpointshapeborder{a}{% the point on the border of node a
        \pgfpointanchor{b}{center}% that sees the center anchor of node b
    }
}
% Same for the border point of b
\pgfcoordinate{d}{\pgfpointshapeborder{b}{\pgfpointanchor{a}{center}}}

% Let's see if we make sense
\draw (c) edge[-latex,bend right] (d);
\end{tikzpicture}
\end{document}

enter image description here

I am not responsible for the ugliness of the arrows. Be careful what you wish for :)

share|improve this answer
    
what if you lowered the arrow a bit so that the arrow heads were separate? –  AlanH Apr 5 '13 at 20:40
    
@AlanH But that's what you are trying to avoid with this question no? –  percusse Apr 5 '13 at 20:42
    
@AlanH Yes, but I didn't think the arrows would look like that... –  AlanH Apr 5 '13 at 20:45
    
@AlanH Change the (d) to (b) in the last draw command. Would that be sufficient? The starting point is the same but they arrive at different points.... –  percusse Apr 5 '13 at 20:46
    
Well, I guess as long as the idea is conveyed... –  AlanH Apr 5 '13 at 20:47
show 3 more comments

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