1

Based on the answer by egreg in The curly brace is too big, I would like to modify the cases environment

After some experimentation, I found out the following option that I like the most:

\documentclass[10pt]{article}
\usepackage{amsmath}
\usepackage{lmodern}
\usepackage{setspace}
\onehalfspacing
\usepackage{etoolbox}

\begin{document} \makeatletter \patchcmd{\env@cases}{1.2}{0.9}{}{} \makeatother \begin{equation} P^(A) = \begin{cases} 1 & \quad \omega_0 \in A, \[.6ex] 0 & \quad \omega_0 \notin A. \end{cases} \end{equation*} \end{document}

My question is: how can I make \\[.6ex] the default behavior inside cases environment?

1 Answers1

1

I guess you want something else than 0.9.

\documentclass[10pt]{article}
\usepackage{amsmath}
\usepackage{lmodern}
\usepackage{setspace}
\onehalfspacing
\usepackage{etoolbox}

\begin{document}

\subsection{No patch, no optional argument} \begin{equation} P^(A) = \begin{cases} 1 & \quad \omega_0 \in A, \ 0 & \quad \omega_0 \notin A. \end{cases} \end{equation}

\subsection{Patch, no optional argument} \makeatletter \patchcmd{\env@cases}{1.2}{0.9}{}{} \makeatother \begin{equation} P^(A) = \begin{cases} 1 & \quad \omega_0 \in A, \ 0 & \quad \omega_0 \notin A. \end{cases} \end{equation}

\subsection{Patch, optional argument} \begin{equation} P^(A) = \begin{cases} 1 & \quad \omega_0 \in A, \[.6ex] 0 & \quad \omega_0 \notin A. \end{cases} \end{equation}

\subsection{Different patch, no optional argument} \makeatletter \patchcmd{\env@cases}{0.9}{1.1}{}{} \makeatother \begin{equation} P^(A) = \begin{cases} 1 & \quad \omega_0 \in A, \ 0 & \quad \omega_0 \notin A. \end{cases} \end{equation}

\end{document}

enter image description here

So you probably want, before \begin{document},

\makeatletter
\patchcmd{\env@cases}{1.2}{1.1]{}{}
\makeatother
egreg
  • 1,121,712
  • Oh I was stupid:( thanks! I thought \\[.6ex] controls the spacing between two lines while patch effectively controls the size of the brace... – user182849 Jul 20 '22 at 13:27