LyX ⇒ enumerate environment inside theorem environment!
enumerate environment inside theorem environment!
thank you.
Reason: multiple exclamation marks reduced
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
enumerate environment inside theorem environment!
enumerate environments work in theorem environments. But this is plain LaTeX.
Code: Select all
\documentclass{article}
\usepackage{blindtext}
\newtheorem{theorem}{Theorem}
\begin{document}
\blindtext
\begin{theorem}
\blindtext
\begin{enumerate}
\item test?
\item another test
\end{enumerate}
\end{theorem}
\end{document}
Can try to reduce your document to a minimum and export this to LaTeX? This might give us a clue on what went wrong.
Re: enumerate environment inside theorem environment!
"LyX is clikcing buttons, did you click them in the right order?" this explained it to me

It seems to be related to LyX nesting rules.
I did it in the following order and it worked

1- create a list with the theorem statement in the line no 1 and the first of the numbered line in line no 2, the second numbered line in line no. 3 and so on.
2- change the level of numbering of lines starting from no. 2 to the last numbered lines to the next numbering level.
3- after that change the first line to Theorem (corollary or lemma) and you will get it.
thank you Johannes_B.
*************************************
another way { tricky and I don't like it

by putting "\begin{theorem}" and "\end{theorem}" as TeX code in the LyX document. after this write the theorem statement and the enumerated (or itemized lines) between them. It will work.

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: enumerate environment inside theorem environment!
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Re: enumerate environment inside theorem environment!
welcome to the forum!
LyX is a good start and a good tool for experienced users too, just sometimes one needs to deal a bit with the LaTeX under the hood.

Often we LaTeX users can help our LyX friends, when we see the .lyx file or the exported LaTeX file.
See you,
Stefan
Re: enumerate environment inside theorem environment!
I am originally a LaTeX user. I only started using LyX recently. You can view the LaTeX code in the source pane option in view menu. This helps you to find out where you are in the LaTeX world.
I think LyX is a handy tool and it could be useful in preparing documents, reports, papers, theses and books. It can take the place of ms word and its likes because these wysiwyg gadgets are only made to be easy-to-use but they don't give users full control of their documents as LaTeX does.
Thank you.
enumerate environment inside theorem environment!
check this out with ctrl + l you get into the latex mode. By the way also work with enumerate

anyhow is there a way to implement a shortcut in lyx so I do not have to write it out all the time. thanks
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
enumerate environment inside theorem environment!
What exactely do you mean with shortcut? You can define a new environment based on enumerate using package enumitem. You can use this by inserting LaTeX-Code in ERT boxes.
If you want to have a clickable button, you need to ask LyX guys.
Re: enumerate environment inside theorem environment!
by the way thats me.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: enumerate environment inside theorem environment!
It would be nice to share the solution here as well once you got it.
