R. Lahaye wrote: > On Thursday 02 May 2002 2:24 pm, Herbert Voss wrote: > >>Philippe Baucour wrote: >> >>>congratulations for Lyx 1.2pre4 I'm impressed, it works well on my >>>mandrake 8.2 and it provides elsart.layout.... >>> >>elseart defines it's own bibstyle so you have to leave >> > > Uh? I have missed an import issue, apparently. > My LyX-CVS has nothing like elsart. I remember a discussion quite some > time ago, where it turned out that LyX was still unable to support all > the elsart gadgets. Has that been dealt with? If so, how do I use elsart > with present LyX? > > BTW: I've got the elsart.cls and the corresponding bst files in place.
with the attached patch you can insert into your elseart.layout ClassOptions FontSize Default # controlled by class BeginTitle "\begin{frontmatter}" EndTitle "\end{frontmatter}" End the defaults are BeginTitle="" and EndTitle="\maketitle", so that all other layouts work as usual Herbert -- http://www.lyx.org/help/
Index: src/buffer.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/buffer.C,v retrieving revision 1.332 diff -u -r1.332 buffer.C --- src/buffer.C 2 May 2002 12:21:41 -0000 1.332 +++ src/buffer.C 2 May 2002 18:02:02 -0000 @@ -2498,6 +2498,10 @@ // make the body. ofs << "\\begin{document}\n"; texrow.newline(); + if (!tclass.opt_begintitle().empty()) { + ofs << tclass.opt_begintitle() << '\n'; + texrow.newline(); + } } // only_body lyxerr[Debug::INFO] << "preamble finished, now the body." << endl; @@ -2581,8 +2585,10 @@ } else was_title = true; } else if (was_title && !already_title) { - ofs << "\\maketitle\n"; - texrow.newline(); + if +(!textclasslist[params.textclass].opt_endtitle().empty()) { + ofs << +textclasslist[params.textclass].opt_endtitle() << '\n'; + texrow.newline(); + } already_title = true; was_title = false; } @@ -2598,8 +2604,10 @@ } // It might be that we only have a title in this document if (was_title && !already_title) { - ofs << "\\maketitle\n"; - texrow.newline(); + if (!textclasslist[params.textclass].opt_endtitle().empty()) { + ofs << textclasslist[params.textclass].opt_endtitle() << '\n'; + texrow.newline(); + } } } Index: src/lyxtextclass.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxtextclass.C,v retrieving revision 1.13 diff -u -r1.13 lyxtextclass.C --- src/lyxtextclass.C 23 Apr 2002 22:34:24 -0000 1.13 +++ src/lyxtextclass.C 2 May 2002 18:02:03 -0000 @@ -48,6 +48,8 @@ defaultfont_ = LyXFont(LyXFont::ALL_SANE); opt_fontsize_ = "10|11|12"; opt_pagestyle_ = "empty|plain|headings|fancy"; + opt_endtitle_ = "\\maketitle"; + opt_useFMBmatter_ = false; provides_ = nothing; loaded = false; } @@ -438,6 +440,10 @@ CO_FONTSIZE = 1, CO_PAGESTYLE, CO_OTHER, + CO_BEGINTITLE, + CO_ENDTITLE, + CO_BEGINAPPENDIX, + CO_USEFMBMATTER, CO_END }; @@ -445,10 +451,14 @@ void LyXTextClass::readClassOptions(LyXLex & lexrc) { keyword_item classOptionsTags[] = { - {"end", CO_END }, - {"fontsize", CO_FONTSIZE }, - {"other", CO_OTHER }, - {"pagestyle", CO_PAGESTYLE } + {"beginappendix", CO_BEGINAPPENDIX }, + {"begintitle", CO_BEGINTITLE }, + {"end", CO_END }, + {"endtitle", CO_ENDTITLE }, + {"fontsize", CO_FONTSIZE }, + {"other", CO_OTHER }, + {"pagestyle", CO_PAGESTYLE }, + {"useFMBmatter", CO_USEFMBMATTER } }; lexrc.pushTable(classOptionsTags, CO_END); @@ -470,6 +480,26 @@ lexrc.next(); opt_pagestyle_ = strip(lexrc.getString()); break; + case CO_BEGINAPPENDIX: + lexrc.next(); + opt_beginappendix_ = strip(lexrc.getString()); + break; + + case CO_BEGINTITLE: + lexrc.next(); + opt_begintitle_ = strip(lexrc.getString()); + break; + + case CO_ENDTITLE: + lexrc.next(); + opt_endtitle_ = strip(lexrc.getString()); + break; + + case CO_USEFMBMATTER: + lexrc.next(); + opt_useFMBmatter_ = lexrc.getInteger(); + break; + case CO_OTHER: lexrc.next(); options_ = lexrc.getString(); @@ -633,6 +663,30 @@ string const & LyXTextClass::options() const { return options_; +} + + +string const & LyXTextClass::opt_beginappendix() const +{ + return opt_beginappendix_; +} + + +string const & LyXTextClass::opt_begintitle() const +{ + return opt_begintitle_; +} + + +string const & LyXTextClass::opt_endtitle() const +{ + return opt_endtitle_; +} + + +bool LyXTextClass::opt_useFMBmatter() const +{ + return opt_useFMBmatter_; } Index: src/lyxtextclass.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxtextclass.h,v retrieving revision 1.5 diff -u -r1.5 lyxtextclass.h --- src/lyxtextclass.h 23 Apr 2002 22:34:24 -0000 1.5 +++ src/lyxtextclass.h 2 May 2002 18:02:03 -0000 @@ -78,6 +78,14 @@ /// string const & opt_pagestyle() const; /// + string const & opt_beginappendix() const; + /// + string const & opt_begintitle() const; + /// + string const & opt_endtitle() const; + /// + bool opt_useFMBmatter() const; + /// string const & options() const; /// string const & pagestyle() const; @@ -148,6 +156,14 @@ string opt_pagestyle_; /// string options_; + /// + string opt_beginappendix_; + /// + string opt_begintitle_; + /// + string opt_endtitle_; + /// + bool opt_useFMBmatter_; /// string pagestyle_; ///