Peter Pieczora wrote:
Hi All,
This question is about layouts and environments.
In this example I have defined newenvironment in latex cls, than
I defined style in lyx's layout file, which works just fine, however I would
like to be able to use standard styles i.e. sections, lists, enumerate etc.
within given environment.
This is how latex file would look like:
\begin{document}
\begin{MyEnv}
\section{yadda yadda}
more yadda yadda
\begin{enumerate}
\item yadda yadda
.....
\end{enumerate}
....
\end{MyEnv}
\end{document}
Latex class file has all commands and formating to produce desired effect.
Now going back to Lyx, I've created template.lyx and layout file, which works
fine with my latex class file (based on the article class). Lyx picks up
stdclass elements just fine, but they don't get placed within
\begin_layout MyEnv
.....
\end_layout
Quick workaround I've found was to insert ERT tex code (which does the trick)
but that IMHO defeats the purpose.
Does anyone have an idea how to solve this problem?
TIA
Just to clarify this: you have a layout file in which MyEnv appears on
the drop down list of layouts, but nesting does not work with it?
You've tried
1. Start a new paragraph and select MyEnv.
2. Type some stuff and hit Enter.
3. Select Itemize or Enumerate and nest the list (Edit -> Increase List
Depth or M-S-right arrow or the corresponding tool button), but they
fail to nest the list under MyEnv?
/Paul