# Minimal work example for darray from breqn

I was trying to use the darray environment from the breqn package but hadn't success on it.

As a mwe I would like to replace the eqnarray below by the darray.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{eqnarray*}
\max & & c^T x \\
\text{s.t.} & & x \in \left\{ 0, 1 \right\}^n
\end{eqnarray*}
\end{document}

I try

\documentclass{article}
\usepackage{amsmath}
\usepackage{breqn}
\begin{document}
\begin{darray}[cols={rl}]
\max & c^T x \\
\text{s.t.} & x \in \left\{ 0, 1 \right\}^n
\end{darray}
\end{document}

but got the error below

! Undefined control sequence.
\@tempc ...let \@preamble \@empty \darray@mkpream
#1\@percentchar
l.5 \begin{darray}[cols={rl}]

?
! Emergency stop.
\@tempc ...let \@preamble \@empty \darray@mkpream
#1\@percentchar
l.5 \begin{darray}[cols={rl}]

End of file on the terminal!
-
Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. –  Jubobs Mar 23 '13 at 20:14

The breqn documentation specifies that "the darray environment is unfinished". Perhaps a safer alternative should be used. How about simply using an array environment?

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\begin{array}{rl} \max & c^T x \\ \text{s.t.} & x \in \left\{ 0, 1 \right\}^n \end{array}$
\end{document}

-

Same semantics, different syntax. Decide which you find easier to read.

\begin{equation*}
\max \left\{ c^T x \mid x \in \left\{ 0, 1 \right\}^n \right\}
\end{equation*}

-