LyX ⇒ enumerate environment inside theorem environment!
enumerate environment inside theorem environment!
I tried to create enumerate environment inside theorem environment in LyX but it did not work. does anyone know how to do that.
thank you.
thank you.
Last edited by Stefan Kottwitz on Sat Dec 06, 2014 11:59 pm, edited 1 time in total.
Reason: multiple exclamation marks reduced
Reason: multiple exclamation marks reduced
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
enumerate environment inside theorem environment!
Hi and welcome,
enumerate environments work in theorem environments. But this is plain LaTeX.
I don't have experience with LyX and cannot say what might have gone wrong. LyX is clikcing buttons, did you click them in the right order?
Can try to reduce your document to a minimum and export this to LaTeX? This might give us a clue on what went wrong.
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.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Re: enumerate environment inside theorem environment!
Thank you Johannes_B.
"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.
"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!
To be honest, i prefer a simple line (a few simple lines) of LaTeX. If you would point a gun to my head, i couldn't reproduce the clicking maneuver you just described.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
Re: enumerate environment inside theorem environment!
Hi Abbadi,
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
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
LaTeX.org admin
Re: enumerate environment inside theorem environment!
Hi Stefan,
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.
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!
Hey
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
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!
This question has also been asked on TeX.SX.
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.
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.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Re: enumerate environment inside theorem environment!
What I mean is: to press a certain key combination for example ctrl+i and the text form above is generated. it takes just to much time to type all of this all the time.
by the way thats me.
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!
One of the LyX developers is here once in a while. I suggest to adress them directly.
It would be nice to share the solution here as well once you got it.
It would be nice to share the solution here as well once you got it.

The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.