0

I have a very long equation that begins and ends with a curly brace. I would like it to extend over multiple lines. I tried the following

\documentclass[]{article}
\usepackage{amssymb}
\usepackage{amsmath}

\begin{document}

\begin{eqnarray} \label{eq:cohensDCSs3} \hat{\mathcal{A}}_c^{\pm}= \left {\bf{s}: \ \nonumber \pm \frac{k}{\sqrt{N}}\right} \end{eqnarray}

\end{document}

and get the following error message

! Extra }, or forgotten \right.
<template> }
            $\@eqnsel \endtemplate 
l.9 ...l{A}}_c^{\pm}= \left \{\bf{s}: \\ \nonumber

?

I do not get this error message if I leave out the "\\ \nonumber" part.

Edit. Thank you for the replies. But I wanted a large brace at the beginning of the first line and a large brace at the end of the last line. The following is what I want. enter image description here

The following code does what I want. The braces expand with the equation which begins and ends with a brace. I don't want any braces to span all of the lines.

\documentclass[]{article}
\usepackage{amssymb}
\usepackage{amsmath}

\begin{document}

\begin{eqnarray}
\hat{\mathcal{A}}_c^{\pm}=  \left\{\bf{s}: \right. \\     \nonumber
\left. \pm \frac{k}{\sqrt{N}}\right\}
\end{eqnarray}


\end{document}

2 Answers2

3

Does it work for you or I misunderstand You?

\documentclass[]{article}
\usepackage{amssymb}
\usepackage{amsmath}

\begin{document}

\begin{eqnarray} \label{eq:cohensDCSs3} \hat{\mathcal{A}}_c^{\pm}= \lbrace\bf{s}: \ \nonumber \pm \frac{k}{\sqrt{N}}\rbrace \end{eqnarray}

\end{document}

Just replace \left{ to the "\lbrace" and same "\rbrace"

WinnieNotThePooh
  • 3,008
  • 1
  • 7
  • 14
1

You shouldn't use eqnarray – the spacing at the alignment point is not good. I propose this simple solution with left-aligned Bmatrix:

\documentclass[]{article}
\usepackage{amssymb}
\usepackage{mathtools}

\begin{document}

\begin{equation}\label{eq:cohensDCSs3} \hat{\mathcal{A}}_c^{\pm}= \begin{Bmatrix}[l]\bf{s}: \ \pm \frac{k}{\sqrt{N}}\end{Bmatrix} \end{equation}

\end{document}

enter image description here

Bernard
  • 271,350