On Sat, Apr 27, 2019 at 2:42 PM Guenter Milde <mi...@users.sf.net> wrote:
>
> >> Dear All,
>
> >> Suppose that I have created a new enumerate-like enumerate, say
> >> xenumerate. How can I use it from inside LyX without recourse to ERT?
>
> > A couple of possibilities come to mind. If you want to use the new
> > version exclusively (and not use good old "enumerate"), you could
> > redefine the enumerate environment itself. Assuming you want xenumerate
> > to coexist with enumerate, you can define a layout for it, either in the
> > Local Layout portion of the document settings (if you only want it for
> > one document) or in a module file installed in your local layouts directory.
>
> > Guessing that you want the last one (i.e., add this along side regular
> > enumerations and make it available to any document that wants it), I
> > would suggest looking at /usr/share/lyx/layouts/stdlists.inc for
> > inspiration. (That's the Linux path; on other OSes, your path may
> > differ.) Look for the section that begins "Style Enumerate" and copy it
> > to your local module file (which will also need the proper header
> > stuff). Change the first line of the style to "Style Xenumerate" (or
> > whatever), change the LatexName entry to "xenumerate", and see if
> > anything else needs tweaking (quite possibly not).
>
> It may help to have a look a the "enumitem" module that enhances enumeration
> environments.
>
> The appended gm-lists.module requires and uses enumitem to define
> additional list types. It is a bit dated, though.
>
>
> > Help > Customization has lots of details about creating your own modules
> > and paragraph styles. Note that you will have to expressly include the
> > module in any document where you want to use the style. (You could hack
> > stdlists.inc itself, but then you would need to repeat the hack any time
> > an upgrade/reinstallation overwrote /usr/share/lyx/layouts.)

Thanks, Günter, I will have a look at that.

Paul

Reply via email to