2

I have the following code:

\begin{dcases}
\left\lbrace  j\in C/\!\!\!\!\!\!\!\!
\bigcup_{\substack{\scriptscriptstyle \forall c' \text{ s.t.\@}\\
\scriptscriptstyle \pi_{ic'}(\alpha)>\pi_{ic}(\alpha)}}
\!\!\!\! C'\ \middle|\ \omega_{ij}(\alpha)>0 \right\rbrace  & \mbox{if } \mathtt{max}_p(S_0) = \emptyset\\[5pt]

\left\lbrace  j\in C/\!\!\!\!\!\!\!\!\bigcup_{\substack{\scriptscriptstyle \forall c' \text{ s.t.\@}\\
\scriptscriptstyle c'\in\mathtt{isucc}(C),\\
\scriptscriptstyle \nexists c'' \text{ s.t.\@} \\
\scriptscriptstyle \pi_{ic''}(\alpha)>\pi_{ic'}(\alpha)}}\!\!\!\! 
C'\ \middle|\ \omega_{ij}(\alpha)>0 \right\rbrace &  \mbox{otherwise}
\end{dcases}&&

It produces the following results:

enter image description here

The whole thing is very ugly. How can it be cleaned?

In particular, in each case in dcases, the curely brackets take up too much space. Maybe if they did not expand to the top of the equations as much as the bottom (as needed because of substack), it would have looked cleaner.

Also please suggest any better way to produce this result in a cleaner form.

7

There is no need that the braces cover also those complicated conditions:

\documentclass{article}
\usepackage{mathtools,amssymb}

\begin{document}

\begin{equation}
\begin{dcases}
\biggl\lbrace
  j\in C\bigg/
  \mspace{-18mu}
  \bigcup_{\scriptscriptstyle\substack{
    \forall c' \text{ s.t.}\\
    \pi_{ic'}(\alpha)>\pi_{ic}(\alpha)
  }}
  \mspace{-18mu}
  C' \biggm| \omega_{ij}(\alpha)>0
\biggr\rbrace
  & \text{if } \mathtt{max}_p(S_0) = \emptyset
\\[5pt]
\biggl\lbrace  
  j\in C\bigg/
  \mspace{-18mu}
  \bigcup_{\scriptscriptstyle\substack{
    \forall c' \text{ s.t.}\\
    c'\in\mathtt{isucc}(C),\\
    \nexists c'' \text{ s.t.}\\
    \pi_{ic''}(\alpha)>\pi_{ic'}(\alpha)
  }}
  \mspace{-18mu}
  C' \biggm| \omega_{ij}(\alpha)>0
\biggr\rbrace
  & \text{otherwise}
\end{dcases}
\end{equation}

\end{document}

enter image description here

  • +1 for mspace. Much better than \!\!\!\!\!\!\!\! – Ali Jun 4 '15 at 9:49
0

Personally I fill prefer the following form: enter image description here

It is obtained width following code:

    \documentclass{article}
\usepackage{mathtools,amssymb}

    \begin{document}
\begin{equation}
    \begin{dcases}
    \begin{tabular}[t]{r|l}
$j\in \dfrac{C}{\bigcup\limits_{\substack{
                        \forall c' \text{ s.t.}\\
                        \pi_{ic'}(\alpha)>\pi_{ic}(\alpha)
                        \hphantom{''}%just for centering
                        }} C'}$
    & $\omega_{ij}(\alpha)>0$
    \end{tabular}   & \text{if } \mathtt{max}_p(S_0) = \emptyset    \\
    \begin{tabular}[t]{r|l}
$j\in \dfrac{C}{\bigcup\limits_{\substack{
                        \forall c' \text{ s.t.}\\
                        c'\in\mathtt{isucc}(C),\\
                        \nexists c'' \text{ s.t.}\\
                        \pi_{ic''}(\alpha)>\pi_{ic'}(\alpha)
                        }}  C'}$ 
    & $\omega_{ij}(\alpha)>0$
    \end{tabular}   & \text{otherwise}
    \end{dcases}
\end{equation}
    \end{document}

If you prefer to have each part of cases in curly braces, than before and after each tabular add \left{ and right} respectively.

I hope that I understand your equation ...

Edit: With added array package (in poreamble), you can rewrite both tabular environments in:

\begin{tabular}[t]{>{$}r<{$}|>{$}l<{$}}

and than omit $ ... $ in each cell of tabular. This simplify writing your equation a little bit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.