0

I have a problem. The following code runs

\[\xymatrix{
 X \ar[d] \ar[r] & Y \ar[d]\\
 T                 & S\\} \]

Even the following runs

\[\xymatrix{
 X \ar[r] & Y \ar[d]\\
         & S\\} \]

But not this:

\[\xymatrix{
 X \ar[dr] \ar[r] & Y \ar[d]\\
                  & S\\} \]

My code is:

\documentclass[psamsfonts]{amsart}
\usepackage{amssymb,amsfonts}
\usepackage[all,arc]{xy}
\renewcommand{\char}{char}
\begin{document}

\[\xymatrix{
X   \ar[dr] \ar[r] & Y \ar[d]\\
             & S\\} \]
\end{document}
5
  • I have Windows 10. I use Overleaf.
    – Grobber
    Aug 6, 2017 at 5:44
  • It seems there is a problem with my macros. I am trying to narrow it down.
    – Grobber
    Aug 6, 2017 at 6:11
  • Oh my! I had redefined \char to say char. This seems similar to some other earlier post. Could you please tell me the reason for such mishap?
    – Grobber
    Aug 6, 2017 at 6:19
  • Could you please tell me why \renewcommand{\char}{char} causes the problem?
    – Grobber
    Aug 6, 2017 at 6:31
  • I have added my error-prone code above.
    – Grobber
    Aug 6, 2017 at 6:39

1 Answer 1

4

\char is a TeX primitive. Redefining it is bound to break almost every LaTeX document.

This is like redefining \box or \fi or \uppercase (I remember of a class which did the latter).

Never do \renewcommand if you never heard about the command you'd like to redefine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .