Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have the same issue as in this question: Split-like environment inside cases environment with one difference - I would like to get the same result with LyX, using as little LaTeX code as possible. How can I do that?

Here's my formula:

\begin{cases}
\epsilon & \exists k\left[i_{k}=0\right]\\
\mbox{LCS}\left(X_{1}\left(i_{1}-1\right),X_{2}\left(i_{2}- 1\right),\ldots,X_{n}\left(i_{n}-1\right)\right)||\sigma_{1}^{i_{1}} & \sigma_{1}^{i_{1}}=\sigma_{2}^{i_{2}}=\ldots=\sigma_{n}^{i_{n}}\\
\max\left\{ \mbox{LCS}\left(X_{1}\left(i_{1}-1\right),X_{2}\left(i_{2}\right),\ldots,X_{n}\left(i_{n}\right)\right),\mbox{LCS}\left(X_{1}\left(i_{1}\right),X_{2}\left(i_{2}-1\right),\ldots,X_{n}\left(i_{n}\right)\right),\ldots,\mbox{LCS}\left(X_{1}\left(i_{1}\right),X_{2}\left(i_{2}\right),\ldots,X_{n}\left(i_{n}-1\right)\right)\right\}  & \mbox{else}\end{cases}
share|improve this question

1 Answer 1

up vote 1 down vote accepted
+300
\listfiles
\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[
\begin{cases}
\epsilon & \exists k\left[i_{k}=0\right]\\
\text{LCS}\left(X_{1}\left(i_{1}-1\right),X_{2}\left(i_{2}- 1\right),\ldots,X_{n}
        \left(i_{n}-1\right)\right)||\sigma_{1}^{i_{1}} \qquad
              & \sigma_{1}^{i_{1}}=\sigma_{2}^{i_{2}}=\ldots=\sigma_{n}^{i_{n}}\\
  \begin{aligned}[t]\arraycolsep=0pt
     \max\{ &
      \text{LCS}\big(X_{1}(i_1-1),X_2(i_{2}),\ldots,X_{n}(i_n)\big),\\ &
       \text{LCS}\left(X_1(i_1),X_{2}(i_2-1),\ldots,X_n(i_n)\right),\\ &
     \ldots, \\ & 
       \text{LCS}
       \left(X_{1}\left(i_{1}\right),X_{2}\left(i_{2}\right),\ldots,X_{n}
       \left(i_{n}-1\right)\right)\}
  \end{aligned}  & \text{else}
\end{cases}
\]
\end{document}

alt text

pages 18f and 56 of the Mathmode document show you the cases environemnt with linebreaks. More informations are only possible when you give an example of what you did.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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