13

LyX is great. I use it to write everyday documents. But it seems that its environment can only have one type; different types of environments can't be mixed. For example, you can't have itemize inside a proof. If you try, either you lose the itemize, or the itemize part become outside of the proof. Can I have itemize inside proofs? You need this when making case distinctions.

2 Answers 2

15

Lyx can perfectly nest environments: All you need to do is to increase the nesting depth (EditIncrease List Depth):

LyX Screenshot

-1

Have you tried the cases environment?

\documentclass[a4paper]{book}

\usepackage{amsmath,amsthm}

\begin{document}
\begin{proof}Here is the proof and the cases environment:
\[
|x| =
\begin{cases}
x, & \text{if $x\ge 0$,} \\
-x, & \text{if $x<0$.}
\end{cases}
\]
\end{proof}
\end{document}

I know that in LyX you can use every package you want and add the code too, so the example should be ok. If I misunderstood what you need, please provide an example of what you want to achieve.

1
  • This is more like a jerry rigging than a proper solution. The question is about nesting enfironments.
    – user4929
    Oct 7, 2020 at 9:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .