On 11.09.08, rgheck wrote:
> Atlas wrote:

>> Background: * CLS file ==> www.stacs-conf.org/for_authors/stacs.cls    
>> (note: stacs.cls
>> is based on amsart.cls) 
...
>> * Conference-supplied TEX file (note: this file does not import correctly
>> nor compile in LyX 1.5.6 nor 1.6.0):    
>> http://www.stacs-conf.org/for_authors/stacs-smp.tex

>> * In stacs-smp.tex, it states: 

>> %% due to the dependence on amsart.cls, \begin{document} has to occur  
>> %% BEFORE the title and author information: \begin{document} 

As amsart.cls works with LyX, this should not be a problem.

>> \title[Using stacs.cls]{How to use stacs.cls} \author[lab1]{A. 
>> Uthor}{Alice Uthor} 

>> %% the abstract has to PRECEDE the command \maketitle: %% be sure not 
>> to issue the \maketitle command twice! \begin{abstract}  STUB.  
>> \end{abstract} \maketitle 

So you will need the InTitle flag for the Abstract style. This is already
true for the amsart layout.

>> QUESTION how would I get stacs-smp.tex to import and
>> compile correctly in LyX? 


> You need a layout file for stacs.cls. See the Customization manual for  
> the details. You can start by copying amsart.cls to stacs.cls and  
> changing the first two lines to:
> #% Do not delete the line below; configure depends on this
> # \DeclareLaTeXClass{article (stacs)}

I would rather start with a new file and include amsart.layout:

  #% Do not delete the line below; configure depends on this
  # \DeclareLaTeXClass{article (stacs)}

  input amsart.layout

Now you can add, overwrite, and disable layouts to adapt to the stacs class.

I do not know whether this works with 1.6, though. 
Is there an analogy to NoStyle to undo UseModule calls (NoModule, say)?


>> - The problem is that LyX hides most of the details in its preamble
>>   and also apparently inserts a redefinition of the theorem
>>   environment.

> LyX adds this:
> \theoremstyle{plain}
> \newtheorem{thm}{Theorem}
> So you need to stop LyX from issuing this code. 
> Fortunately, all of this is user-controllable. 

In 1.5, add to your stacs.layout file

  Style Theorem
        Preamble
        EndPreamble
  End

to overwrite the Preamble definition in amsmaths.inc with an empty
preamble.

> In 1.6, the theorem layout is in theorems-ams.inc, which is included by
> the theorems-ams.module, which is included by default by amsart.layout.
> So you'd want to copy theorems-ams.inc to something like
> theorems-stacs.inc; make the necessary change there; copy
> theorems-ams.module to theorems-stacs.module; make the change there;
> and then change stacs.layout so it does this: UseModule
> theorems-stacs.module instead of using theorems-ams.module. (Note that
> this is a default include: the user can override it in
> Document>Settings.)

In analogy, I'd just copy theorems-ams.module to theorems-stacs.module
and overwrite the offending parts from included files there.

> If there are theorem environments other than the ones theorems-ams.inc  
> defines, then you will need to add those to theorems-stacs.inc, as well.  
> Otherwise, LyX won't know about them.

> The good thing is that you only have to do this once. Then you can post  
> it on the wiki, or maybe your layout can even be included with LyX 
> itself.

Günter

Reply via email to