On Fri, Aug 17, 2001 at 10:53:46PM +0200, Herbert Voss wrote:
> Steve Litt wrote:
> > 
> > I ran the preceding on my machine's lyx directory and my personal .lyx
> > directory, and found nothing specifically identifying article.layout.
> > 
> > Also, I have no idea how to make a myarticle.sty file, and where to put it
> > when I've made it. What's the simplest myarticle.sty file I could make that
> > would change something so I know it's having an effect?
> 
> lyx searchs first in the home ~/.lyx/layout for layout files.
> at second in /usr/share/lyx/layouts or any other, if you
> installed it with another dir.
> put the attached article.layout in there and than copy it
> cp article.layout myArticle.layout
> 
> edit in myArticle.layout the first two lines to the
> following
> 
> #% Do not delete the line below; configure depends on this
> #  \DeclareLaTeXClass{article (myArticle)}

  One other option, IIRC is to do:
#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[article]{My Article}

  and from there start to hack the file.
  
  Also if you use article (or any other layout) as the base for your class
you should include that layout file and start modifying things from there.

  In this case it would be:
  
  Input article.layout
  
  The advantage of this approach is that it is easier to maintain between
different version of lyx, since all the improvements to the base class will
be reflected in the derived. (some kind of OO I guess...)

  LyX will search for the file in the two directories that Herbert pointed,
the user and the system layout directories.

  In the layout files if you have multiple declarations the last one
prevails over former ones.

  That means that if you have:
  
  SecNumDepth             3
  SecNumDepth             4

then SecNumDepth will be 4.

  I hope this helps.
  
> 
> this means that your (special) article class dependes
> to the latex article class.
> 
> now run reconfigure and in lyx should all work well,
> you are able to modify the internal structure of myArticle
> 
> Herbert
> 
> -- 
> http://www.educat.hu-berlin.de/~voss/lyx/


-- 
José

Reply via email to