0

Building off of this question, I would like to change the default space between the two columns of the amsmath cases environment to be a \qquad rather than a quad. I tried just copying the code on that question and changing the \quad, but I receive the error message:

Package amsmath Error: Old form `\matrix' should be \begin{matrix}. ^^I^^I\begin{cases}

Is there a way to make this global change?

edit: I've tried changing \matrix to \begin{matrix} and adding \end{matrix} in various places, but no dice.

2
  • Welcome to TeX.SX!! Please post a full minimal working example. Currently we have to guess what packages etc you are using and this makes it really hard to help you. A MWE should start with a \documentclass command, have a minimal preamble and then \begin{document}...\end{document}. The code should compile and be as small as possible to demonstrate your problem. To answer your question we need to know what document class and packges you want to use. – user30471 Apr 16 '19 at 2:56
  • The code you are referring to has @s in their names did you remember to add \makeatletter... \makeatother around that code? My guess, you did not and thus the \matrix@... line was interpreted as \matrix and then @... Next time please post a full minimal example so we know exactly what you are doing and can test it ourself – daleif Apr 16 '19 at 5:51
2

If you do latexdef -p amsmath cases you get

\cases:
\long macro:->\matrix@check \cases \env@cases 

Well, for historical reasons, one needs to look at \env@cases

\env@cases:
macro:->\let \@ifnextchar \new@ifnextchar \left \lbrace \def \arraystretch {1.2}\array {@{}l@{\quad }l@{}}

Good! There's just one \quad!

\documentclass{article}
\usepackage{amsmath}
\usepackage{etoolbox} % for \patchcmd

\makeatletter % we need to patch \env@cases that has @ in its name
\patchcmd{\env@cases}{\quad}{\qquad}{}{}
\makeatother

\begin{document}

\[
\begin{cases}
a & b \\
c & d
\end{cases}
\]

\end{document}

enter image description here

The output without the patch would be

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.