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.

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

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?

share|improve this question
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
up vote 9 down vote accepted

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:

share|improve this answer
So the problem is, I presume, due to the fact that the colon is being made active and so TikZ no longer sees it as a colon. – Loop Space Sep 21 '11 at 9:25
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
I don't think it is the case anymore as of tikz-2.10. – cjorssen Feb 10 '12 at 20:46
Well, I was wrong in the comment above. This should now be fixed in the cvs version of tikz. – cjorssen May 8 '12 at 9:42
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

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.