7
\documentclass{article}
\begin{document}
\begin{equation*}
P^*(A) = \begin{cases}
1 & \quad \omega_0 \in A, \\
0 & \quad \omega_0 \notin A.
\end{cases}
\end{equation*}
\end{document}

When I used the above code to display a piecewise expression, I got the following:

enter image description here

Clearly, the curly brace appeared in the expression is too big, how can I adjust it so the display is more satisfactory? Thanks in advance.

P.S: My preamble:

\usepackage{setspace} 
\doublespacing
\usepackage[margin = 1.5in]{geometry}
\usepackage{float} 
\usepackage{graphicx}
\usepackage{color} 
\usepackage{amsmath} 
\usepackage{amsfonts} 
\usepackage{amsthm}
\usepackage{bm} 
\usepackage{framed}
\usepackage{verbatim}
\usepackage{natbib}
%\usepackage[symbol*]{footmisc}
\usepackage[stable]{footmisc}
\usepackage{mathtools}
\usepackage{mathrsfs}
\usepackage{amssymb}
\usepackage{hyperref}



\newcommand{\eps}{\varepsilon}
\newcommand{\rational}{\mathbb{Q}}
\newcommand{\real}{\mathbb{R}}
\newcommand{\integer}{\mathbb{Z}}
\newcommand{\nn}{\mathbb{N}}
\newcommand{\complex}{\mathbb{C}}
\newcommand{\Ell}{\mathcal{L}}
\newcommand{\mean}{\mathbb{E}}
\newcommand{\prob}{\mathbb{P}}
\newcommand{\dd}{\mathop{}\!\mathrm{d}}
\newcommand{\overbar}[1]{\mkern 1.5mu\overline{\mkern-1.5mu#1\mkern1.5mu}\mkern 1.5mu}
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator*{\diam}{diam\,}
\newcommand{\Riemann}{\mathscr{R}}

\theoremstyle{definition}
\newtheorem{defn}{Definition}[section]
\newtheorem{defns}{Definitions}[section]
\newtheorem{exmp}{Example}[section]

\theoremstyle{plain}
\newtheorem{thm}{Theorem}[section]
\newtheorem{lem}{Lemma}
\newtheorem{prop}{Proposition}
\newtheorem*{cor}{Corollary}

\theoremstyle{remark}
\newtheorem*{rem}{Remark} 
Zhanxiong
  • 309
  • 4
    The culprit is, of course, setspace, but you don't show what command you're using from it to increase the interline space. – egreg Sep 11 '15 at 20:36

3 Answers3

10

The cases environment does \renewcommand{\arraystretch}{1.2}, which means it uses 20% more space than normal, but of course this is wrong when the document is already double spaced.

\documentclass{article}
\usepackage{amsmath}
\usepackage{setspace}
\usepackage{etoolbox}

\usepackage{lipsum}

\doublespacing

\makeatletter
\patchcmd{\env@cases}{1.2}{0.72}{}{}
\makeatother

\begin{document}

\lipsum*[2]
\begin{equation*}
P^*(A) = \begin{cases}
1 & \quad \omega_0 \in A, \\
0 & \quad \omega_0 \notin A.
\end{cases}
\end{equation*}
\lipsum[3]

\end{document}

Note that \doublespacing does \linestretch{1.667} and 0.72=1.2/1.667

enter image description here

egreg
  • 1,121,712
8

Package amsmath is missing, which defines environments equation* and cases:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
P^*(A) = \begin{cases}
1 & \quad \omega_0 \in A, \\
0 & \quad \omega_0 \notin A.
\end{cases}
\end{equation*}
\end{document}

Result

The brace looks normal sized.

Updated question

The preamble uses

\usepackage{setspace}
\doublespacing

As set, the increased line spacing also affects cases (and array, tabular). Workaround: A local switch to \singlespacing:

\documentclass{article}
\usepackage{setspace}
\doublespacing
\usepackage{amsmath}
\begin{document}
\begin{equation*}
P^*(A) = \begin{cases}
1 & \quad \omega_0 \in A, \\
0 & \quad \omega_0 \notin A.
\end{cases}
\end{equation*}
\begingroup
  \singlespacing
  \begin{equation*}
  P^*(A) = \begin{cases}
  1 & \quad \omega_0 \in A, \\
  0 & \quad \omega_0 \notin A.
  \end{cases}
  \end{equation*}
\endgroup
\end{document}

Result

Heiko Oberdiek
  • 271,626
  • @ Thank you, but I do use amsmath package in my original draft, I just didn't paste the preamble here. But your output looks good, does the editor matter? I use Texshop in Mac. – Zhanxiong Sep 11 '15 at 20:26
  • 1
    since the brace is the "expected" size after amsmath is added, something else, not shown, has to be causing the reported oversized brace. not enough information here. – barbara beeton Sep 11 '15 at 20:27
  • OK, I will list all my preamble in my question. – Zhanxiong Sep 11 '15 at 20:28
3

Compare this two cases

\documentclass{article}
    \usepackage{amsmath}

\begin{document}
\begin{equation*}
P^*(A) = \begin{cases}
1 & \quad \omega_0 \in A, \\[1ex]
0 & \quad \omega_0 \notin A.
\end{cases}
    \quad
P^*(A) = \begin{cases}
1 & \quad \omega_0 \in A, \\
0 & \quad \omega_0 \notin A.
\end{cases}
\end{equation*}
\end{document}

Both have equal big curly brace, but at the first one can has filling, that it is smaller or that it better fit content after it:

enter image description here

Difference between them is vertical space between equations: the first one has bigger. Maybe is this what you looking for.

Edit: Apparently the original question was misleading for me ... Problem caused by increased line spacing are well elaborate in Heiko Oberdiek and egreg answers, however, after considering any of proposed solutions, one still can manually increase interline spacing between equations (when this is appropriate) what make curly braces visually smaller.

Zarko
  • 296,517
  • 1
    Oh, I see the problem, I should have not put a space between \\ and[1ex]. Thanks. – Zhanxiong Sep 11 '15 at 22:29
  • @Zhanxiong, I'm afraid that I do not understand what doesn't work properly. I didn't teat my proposition with your preamble and egreg/Heiko proposition, but I as far I estimate their solution they haven't influence on work of my suggestion. The `\[1ex] should only increase space between equations after curly braces , – Zarko Sep 11 '15 at 22:30