On 12/19/2012 02:43 PM, Guy Rutenberg wrote:
Hi All,

I want to use thmtools to redefine some of the theorem-like environments LyX uses. The problem is that by default when you use the each environment, lyx defines it using a \newtheorem. Is there an option to tell LyX not do so, as I intended to define them myself in the preamble using thmtools?

What you really want to do here is modify the module that defines these environments. They're not hardcoded. I'm not sure which module you are using, but let's say that it's the basic Theorems module. This is actually a file theorems-std.module, which does nothing but pull in three other files: theorems.inc, theorems-proof.inc, and theorems-proof-std.inc.

So here's what you can do.

(1) Copy the system theorems-std.module and theorems.inc files to your local LyX directory. E.g., on Linux, copy /usr/share/lyx/layouts/theorems-std.inc and .../theorems.inc to ~/.lyx/layouts/. Rename them as e.g. theorems-mine.module and theorems-mine.inc.

(2) Modify the headers of both files to give them new, more informative names and descriptions.

(3) Change "Input theorems.inc", in theorems-mine.module to "Input theorems-mine.inc".

(4) Open theorems-mine.inc and change the Preamble code for each environment as you wish. When you see the file, you'll see what to do.

Richard

Reply via email to