3

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}
2
+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.

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.