# Labels in TikZ are incorrectly interpreted

I'm running into a weird problem with TikZ. The following code

\node (A) [label=45:$A$] at (p2) {};


is rendered correctly in one document, but incorrectly in another, larger document (which uses incidentally more packages, this is why I suspect some package clash.

Surprisingly, the label specified by the portion of the code 45:$A$ is rendered explicitly as 45:A, rather than being interpreted as A at 45°. There is no warning or error raised.

Any idea of where the problem might come from?

• Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. You don't have to sign with your name since it automatically appears in the lower right corner of your post. – egreg Sep 20 '11 at 21:00
• Do you compile the two documents on the same machine? Are are there potentially different versions of TikZ in play? – Caramdir Sep 20 '11 at 21:01

It is actually due to a clash with the package babel (see the manual). By using the command \shorthandoff before the tikz code, it works fine! For example, you could use:
\begin{tikzpicture}\shorthandoff{:}

• A tip: If you indent lines by 4 spaces or enclose words in backticks , they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). – Tobi Feb 10 '12 at 18:57
• In version 2.10-1 (on Debian Wheezy), I'm still forced to comment out \usepackage[myoptions]{babel}`. Well, it was worth a try. – Anthony Labarre Oct 9 '13 at 8:59