My question is basically a combination of the questions Is it possible to use the enumerate/itemize environment within the proof/remark environment in a nice way? and Create new paragraph style in LyX.
When I write a mathematical document in LyX, I frequently want to divide my proofs into steps. Up to now, I have often simply used the enumerate environment to do this.
This has the advantage that the numbering of the steps is handled automatically by LyX and that I can reference the individual steps later on using the usual Labels and References.
One of the disadvantages is that I am not really satisfied how the output looks afterwards, i.e. my "steps" are somewhat flushed to the right.
In the first question linked above, the user egreg proposed to simply use
\newenvironment{steps}{\setcounter{step}{0}}{}
\newcounter{step}
\newcommand{\proofstep}{\par\refstepcounter{step}Step~\thestep.\space\ignorespaces}
as a solution in LaTeX.
It would be really nice if I could integrate this in LyX, i.e. I would like to have environments
- Steps
- step
(or something like that), which result in the above LaTeX environments/commands to be used by LyX. I would also like to be able to reference the individual steps using labels and references.
The second question linked above describes how to add a new environment (the quotation environment) to LyX.
I tried to adapt this to the case of enumerate/itemize environments, but the format of these seems to be more complicated. Also, I guess I somehow have to tell LyX to use \proofstep
instead of \item
and I am not sure how to do this.
Any help will be appreciated.