# Error messages with diagonal arrows [closed]

When I copy and paste the corrected code for example in this question, I get the following error message:

``````xymatrix 2x2

! Missing number, treated as zero.

\/

l.101   & C
}
``````

I've been using xymatrix/pic for a while now, and only recently I've been getting weird error messages like these when I try to implement diagonal arrows. What's going on?

So in a basic latex file, the code in question, and any code like it works just fine. So the problem lies in the particular file I'm working in now. What is possibly different about this file?

I isolated the problem. It turned out what made everything go awry was that I had renewed the command "`\char`" in this file. So, original problem solved. However, can anyone tell me what `\char` had to do with in the compilation of the diagram?

-

## closed as too localized by egreg, lockstep, azetina, cmhughes, WernerOct 7 '12 at 16:03

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Please, post your code here. – Sigur Oct 7 '12 at 14:12
@JSeaton Try deleting all precompiled latex files and recompiling. Are you compiling the code with your own or as it is. If you are compiling with some other code then post a MWE. – azetina Oct 7 '12 at 14:21
The problem may be an incompatibility in packages or package options. In this case, it is necessary to provide a MWE, the packages you are using along with the `xy`. Else, we cannot say what the problem really is. :-) – azetina Oct 7 '12 at 14:28
@azetina: thank you very much for the helpful comments. I found out what the original problem was (see 'addendum II' above). – JSeaton Oct 7 '12 at 15:25
@JSeaton You must never redefine primitive commands, unless for very specific purposes. Always use `\newcommand` and, if the compiler tells you that the command is already defined and you can't find it in the LaTeX manual, then don't redefine it under any circumstance (unless you precisely know what you're doing). In particular, `\char` is used in many places internally and redefining it is really a bad idea. – egreg Oct 7 '12 at 15:29

I had redefined the primitive command `\char`; that was the origin of the error.