My .tex was compiled fine using pdflatex. Now I added to it

1 & 1\end{cases}

and the compilation never ends (pdflatex is stuck in an infinite loop).

If I run the same code in a new document there's no problem. So it must be a collision with another package. Any ideas?

EDIT: I found a workaround. I actually use lyx, and it adds


to the top of the exported .tex file when adding a cases environment. I overrode it (a flag in the .lyx), and used mathtools instead, and the problem was bypassed. (I guess I should report a bug or something.)

closed as off-topic by karlkoeller, egreg, Thorsten, lockstep, Heiko Oberdiek Aug 9 '13 at 8:33

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Try creating a minimal working example (MWE). The process of doing so usually helps reveal what the problem is. Moreover, without an MWE, it will be difficult (and sometimes impossible) for those of us on TeX.SX to help you. – Adam Liter Aug 9 '13 at 6:14
  • 1
    Are you loading amsmath package (\usepackage{amsmath})? Otherwise & can not be used inside cases environment. BTW, did you want to write \begin{cases} 1 \\ 1 \end{cases}? – karlkoeller Aug 9 '13 at 6:22
  • mathtools loads amsmath, so I doubt that was the problem. – Torbjørn T. Aug 9 '13 at 6:47
  • 4
    This question appears to be off-topic because it is about an error made and solved by the OP. – karlkoeller Aug 9 '13 at 7:54
  • Yes, please file a bug report here: lyx.org/trac and post a LyX minimal example: wiki.lyx.org/FAQ/MinimalExample – scottkosty Aug 9 '13 at 8:43

Browse other questions tagged or ask your own question.