I'm posting a solution to a problem I had because I couldn't find the exact solution on the web, but managed to work it out myself from a similar solution posted on these boards for the quotation environment.
If you're writing a document with double spacing you will find that when you use the "cases" environment in equations the cases will also be double spaced, which looks ungainly. To solve the problem I added the 3 lines of code in the preamble of this minimal working example (MWE)
Code: Select all
\documentclass[a4paper,11pt]{report}
\usepackage{amsmath}
\usepackage{setspace}
\let\oldcases\cases
\let\oldendcases\endcases
\renewenvironment{cases}{\setstretch{1}\oldcases}{\oldendcases}
\begin{document}
\doublespace
blah blah ajweh uhef kjhsdfkj hlkjdhfkj hdfkjhdfs kjhdksl fjhkjsdfhklj sdfkljh fhksdhjkh dsf hfsdkljhsdf kjhsdf jhf ksdfkjhdfs kjhf sdfkhdsfkh eroihekhf fadsho fshlksd sef klhflk khjf kjh
\begin{equation}
A = \begin{cases} a & b \\ c & d \end{cases}
\end{equation}
blah blah ajweh uhef kjhsdfkj hlkjdhfkj hdfkjhdfs kjhdkslf jhkjsdfhklj sdfkljh fhksdhjkh dsf hfsdkljhsdf kjhsdf jhf ksdfkjhdfs kjhf sdfkhdsfkh eroihekhf fadsho fshlksd sef klhflk khjf kjh
\end{document}
Olly