I tried with

    Input theorems-ams.module
    ProvidesModule theorems-ams

and in fact the only problem style that appears in the drop-down menu is my
style. However, when I try to compile the document, I'm still getting
"LaTeX Error: Command \problem already defined". In the description part
says "\newtheorem{problem}[thm]{\protect\problemname} Your command was
ignored..."





On Mon, Sep 9, 2013 at 1:23 PM, Richard Heck <rgh...@lyx.org> wrote:

>  On 09/08/2013 10:03 PM, Christian Bustamante wrote:
>
>  When I do this:
>
>  DefaultModule theorems-ams
> NoStyle Problem
> Style Problem
>  LatexType command
>  LatexName problem
>  LabelString "Problem:"
>  LatexType Environment
>  OptionalArgs 1
> End
>
>  The Theorems AMS module overwrite my Problem style in the dropdown
> styles menu. When trying to compile, it says "LaTeX Error: Command \problem
> already defined". I tried changing the order:
>
>  NoStyle Problem
> DefaultModule theorems-ams
> Style Problem
>  ...
> End
>
>  with the same result. I am attaching my layout file if someone want to
> see it.
>
>
> You should probably do
>
>     Input theorems-ams
>     ProvidesModule theorems-ams
>
> The DefaultModule stuff just says to load the module, by default, when
> modules are loaded, which will happen AFTER the layout stuff is loaded.
> That is why your declaration gets over-written. When you use Input, the
> file is loaded immediately.
>
> Richard
>
>


-- 
CdeB

Reply via email to