On Tuesday 16 January 2007 16:41, Steve Litt wrote:
> On Friday 21 January 2005 13:52, Matej Cepl wrote:
> > Steve Litt wrote:
> > > How do I derive a new LyX environment based on an existing one? For
> > > instance, I'd like to derive a "superdefinition" environment based on
> > > the existing "Description" environment.
> > >
> > > I know how to do it in LaTeX:
> > >
> > > \let\oldmystyle=\mystyle
> > > \def\mystyle{
> > > \oldmystyle
> > > %%% Place LaTeX for modifications here
> > > }
> >
> > Two things needs to be distinguished (using LaTeX terminology) --
> > commands and environments. What you have shown here is redefinition of
> > command, however description (used by "Description" layout) is an
> > environment, where things are slightly more complicated. Try this:
> >
> > \let\olddescription=\description
> > \let\endolddescription=\enddescription
> > \renewenvironment{description}{%
> > \begin{olddescription}%
> > %modifications in the beginning of the environment
> > }{%
> > %modifications in the end of the environment
> > \end{olddescription}}
> >
> > Does it work?
>
> Hi Matej (and anyone else who can answer this question)
>
> First, forgive my replying to a two year old post, but I need this
> information and knew that once upon a time Matej had posted it.
>
> What I want to know is this: where does \enddescription come from?
I just realized neither \endolddescription nor \enddescription are used
subsequently. What's the purpose of the line:
\let\endolddescription=\enddescription
Thanks
SteveT
Steve Litt
Author: Universal Troubleshooting Process books and courseware
http://www.troubleshooters.com/