3

I am trying to draw a pin with a 45-degree angle. For some reason, the angle is not accepted and is seen as the pin label:

\documentclass[tikz]{standalone}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}[scale=2.54]
 \path[draw,red,name path=thresh] (0,0.4) -- (4.0,0.4);
 \path[draw,blue,name path=four] (0,0) -- (4.0,1);
 \path[name intersections={of=four and thresh,name=newfour}];
 \node[style={fill=black,circle,scale=0.3},
      pin={[pin edge={black,thick}]45:{cross}}] at (newfour-1) { };
\end{tikzpicture}
\end{document}

Here is the result: enter image description here

How can I fix this issue?

Note: My pgf version is 2.10.

vrleboss
  • 941
  • 9
  • 27
  • 2
    Your code works correctly with pgf 2.10, as you can check it here for example (include \pgfversion command in the docuemnt to see that it has 2.10). Also here too. – JLDiaz Mar 26 '13 at 17:31
  • The problem must be elswhere then. I am using MacTex and when including \pgfversion the resukt is 2.10 as reported. – vrleboss Mar 26 '13 at 17:34
  • And I compile with pdflatex --shell-escape -enable-write18 $fullname – vrleboss Mar 26 '13 at 17:36
  • Pin angles are known to snap to certain angles. There must be a long thread about that. Here it is http://tex.stackexchange.com/questions/43912/how-can-i-force-tikz-pin-angle – percusse Mar 26 '13 at 17:43
  • @percusse I am not sure the problem is due to the value of the angle. Replacing 45by right give the same error. – vrleboss Mar 26 '13 at 17:47
  • Oh, OK. By the way I have no problems with CVS version. – percusse Mar 26 '13 at 17:48
  • @percusse BTW I saw the thread you mentioned it propose an alternative method to draw pin using <coordinate a>!<dimension>!<angle>:<coordinate b>> For some unknown reasons this piece of code doesn't work for me either. When I try the 2nd example of the section 13.5.4 of the pgf manual, i get the following error: ! Package tikz Error: + or - expected. \coordinate (c) at ($ (a)!.25!(b) $); ? – vrleboss Mar 26 '13 at 18:00
  • 1
    Probably there is something wrong with your installation. That's a valid syntax provided that you are loading the calc library. – percusse Mar 26 '13 at 18:13
  • I do load the \usetikzlibrary{calc} library, is that the one? What check would you recommend doing to make sure the install is ok? – vrleboss Mar 26 '13 at 18:18
  • Problem solved with the help of the above discussion. Turns out that the use of \usepackage[french]{babel} was the culprit. – vrleboss Mar 27 '13 at 10:47
  • @percusse: how do I close this question now? – vrleboss Mar 27 '13 at 11:27
  • @vrleboss I've voted for closing. It should happen soon. – percusse Mar 27 '13 at 13:01

0 Answers0